Google Pay™ Web =============== .. toctree:: :maxdepth: 2 .. contents:: :local: .. role:: ex .. role:: code Introduction ------------ | Google Pay™ is an electronic wallet system that allows you to make one-click payment using a card stored securely on Google side. There is no need to enter card details during Google Pay™ transaction. | Access to the payment mechanism is possible from any device, which supports Google Pay™. | After choosing Google Pay™ payment method, the payer will see the form on which he confirms his Google account and card he is going to use to pay for order. If payer doesn’t have a previously registered card, he may do it while making payment. | | See terms definitions in :ref:`Glossary`. | | Integrate Google Pay™ in App with the following steps: | | 1. Read and accept :ref:`Terms of Service`. | 2. Follow :ref:`Google Pay™ Account Setup`. | 3. Get the :ref:`Required Parameters for Google Pay™ Integration`. | 4. Check the possible :ref:`accsetupgooglepayweb`, and :ref:`Google Pay™ Allowed NetworksWeb`. | 5. Follow the transaction flow instructions: :ref:`transactionflowappgoogleWeb`. How to integrate Google Pay through Payneteasy ----------------------------------------------------- .. only:: google_pay_contacts_enabled .. raw:: html
Already our client   Not our client yet
If you are Payneteasy client, you can get in touch with your manager or contact us here.   Contact our sales team and we’ll create a test account for you and help to integrate Google Pay in a week.
.. only:: google_pay_contacts_disabled Please contact Payneteasy support manager to get help with Google Pay test account. .. _Terms of ServiceWeb: Terms of Service ---------------- | The following rules must be complied to use Google Pay™: * `Google Pay™ API terms of service `_ * `Google Pay™ APIs Acceptable Use Policy `_ | The following rules must be complied to use Google Pay™ on websites: * `Google Pay™ for websites overview `_ * `Integration checklist for website integration `_ * `Google Pay™ Web Brand Guidelines `_ .. _accsetupgooglepay_web: Google Pay™ Account Setup ------------------------- 1. Connecting Party must register in |google_console_link|. Instead of gmail, you can use a corporate email address. .. |google_console_link| raw:: html Google Console .. image:: ../_static/images/Gpay/gpay-1.png :scale: 60 % :align: center .. image:: ../_static/images/Gpay/gpay-2.png :scale: 60 % :align: center 2. Then, from the account screen in the console, save the Merchant ID and proceed to the registration of the website in the Google Pay API section. .. image:: ../_static/images/Gpay/gpay-3.png :scale: 60 % :align: center 3. Add a website using the "Add website" button. .. image:: ../_static/images/Gpay/gpay-4.png :scale: 60 % :align: center 4. Specify screenshots of the checkout and payment form in the website settings, as well as integration type = Gateway and the address of the Connecting Party's website from where the purchase starts. .. image:: ../_static/images/Gpay/gpay-5.png :scale: 60 % :align: center 5. Send the website address and Merchant ID to Payneteasy support managers. Google Pay™ Integration in a Connecting Party Website ----------------------------------------------------- .. _accsetupgooglepayweb: Google Pay™ Authentication Types ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Connecting Party can independently choose the card types in Google Pay™ that will be available for payment. The card type is specified in the :code:`allowedAuthMethods` Google request parameter. | There are two card types (authentication methods): #. | **PAN_ONLY** (non-tokenized) - cards stored in payer`s Google account. These cards available on any device of the payer. | The token contains the number and expiration date of the physical card. That is why 3-D Secure authentication is required for these cards. 3DS is required for PAN_ONLY cards. It can be indicated by the :code:`Success==3DS` in Google payment response. 3-D Secure authentication does not differ from the standard 3-D Secure. #. | **CRYPTOGRAM_3DS** (tokenized) - cards that are stored tokenized on the payer's device. Tokenized cards are only available on the device where the card was added to the Google Pay™ app. | The token contains the number and expiration date of the virtual card as well as the 3-D Secure cryptogram. Customer 3-D Secure verification for tokenized cards is not required. .. _Google Pay™ Allowed NetworksWeb: Google Pay™ Allowed Networks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Payment Gateway supports all networks specified in the :code:`allowedCardNetworks` Google request parameter, such as: :ex:`VISA`, :ex:`MASTERCARD`, etc. For the complete list of allowed networks refer to Payneteasy support. .. _web_requiredgooglepayparameters: Required Parameters for Google Pay™ Integration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1. :ref:`Register with Google`, accept :ref:`Google Terms of Service`, and receive a :code:`Google merchant ID` after website passes a Google review. 2. :code:`ENDPOINT` or :code:`ENDPOINGROUPID` received from Payneteasy support. 3. Control-key and Connecting Party login received from Payneteasy support. .. _transactionflowappgoogleWeb: Google Pay™ Web Flow ^^^^^^^^^^^^^^^^^^^^^ .. uml:: :align: center autonumber skinparam roundcorner 20 skinparam sequenceArrowThickness 2 skinparam ParticipantPadding 30 actor Payer as Customer participant "Merchant\nwebsite" as Merchant participant Payneteasy as g participant "Google Pay™ service" as gps Customer -> Merchant: checkout activate Merchant == Purchase payment request == Merchant -> g: sale-form/ENDPOINTID activate g Merchant -> g: **OR** preauth-form/ENDPOINTID g --> Merchant: status=processing,\nredirect-url deactivate g Merchant -> Customer: redirect to payment-form redirect-url deactivate Merchant activate Customer Customer -> g: GET redirect-url deactivate Customer activate g g --> Customer: payment-form deactivate g activate Customer Customer -> Customer: press Google Pay™ button Customer -> Customer: choosing card Customer -> gps: Submit Google Pay™ form deactivate Customer activate gps gps -> Customer: cryptogram deactivate gps activate Customer Customer -> g: submit payment data\ncryptogram deactivate Customer activate g g -> g: decrypt\ncryptogram CHD alt CRYPTOGRAM_3DS g -> g: authorise payment\ntoken, expiry date, 3DS fields else PAN_ONLY g->g: retrieve\nIssuer ACS URL g->Customer: redirect to Issuer ACS URL activate Customer Customer->Customer:pass 3DS authentication Customer->g: redirect back\n3DS fields deactivate Customer g->g:authorise payment\nPAN, expiry date, 3DS fields end == Final redirect of customer == g -> Customer: Merchant website redirect-url deactivate g activate Customer Customer -> Merchant: POST redirect-url\nstatus, orderid deactivate Customer activate Merchant group Get Final Status == Receive Connecting Party Callback == g -> Merchant: Callback with Final Status activate g Merchant --> g: HTTP 200 deactivate g == Order status request == Merchant -> g: status/ENDPOINTID activate g g --> Merchant: response\nstatus, order-stage deactivate g end Merchant --> Customer: Show result deactivate Customer deactivate Merchant Below we can see Google Pay™ Purchase Flow and Integration steps: | (2) To implement sale-form payment request see :ref:`/api/v2/sale/`. | (3) Instead of sale-form it is possible to implement preauth-form payment request see :ref:`/api/v2/preauth-form/`. Preauth allows to hold the specified amount in the Payer’s card account for a limited time. Preauth can be followed by :ref:`Capture` or :ref:`Cancel`. | (20) To implement Final Redirect see :ref:`final_redirect`. | (22) To implement callback with final status handling see :ref:`Connecting Party Callbacks`. | (24) To implement order status request see :ref:`/api/v2/status/`. Status should be requested multiple times with 3-5 seconds interval until final status will be received in response. .. _capture-form_request_url_web: Capture Flow ^^^^^^^^^^^^ Capture is a transaction followed after preauth which deducts the locked amount from Payer's card. It is important to know that the block remains for a definite period of time depending on whether this is a debit or a credit card (usually the maximum block period is 7 days for debit cards and 28 days for credit cards). .. uml:: :align: center skinparam roundcorner 20 skinparam sequenceArrowThickness 1 skinparam maxmessagesize 100 skinparam sequenceParticipant underline actor Payer participant "Connecting party" as A participant "Payneteasy" as B hnote over A,B : Successful Preauth Transaction autonumber group Optional Payer -> A: Initiate Capture activate A end == Capture == A -> B: api/v2/capture activate B B --> A: Order ID B -> B: Process Capture group Get Final Status == Receive Callback == A <- B: Callback with Final Status A --> B: HTTP 200 deactivate B == Order Status Request == A -> B: Get Status by Order ID api/v2/status activate B B --> A: Response with Status, Order-stage deactivate B end group Optional A --> Payer: Final Status deactivate A end | (1) Capture can be initiated by Connecting Party based on internal business model or Payer’s request. | (2) To implement capture request see :ref:`/api/v2/capture/`. | (5) Callback for Capture will be sent only if :ex:`notify_url` was provided in initial transaction request or additional callback URL for Capture transactions is specified on the endpoint level. If :ex:`server_callback_url` was provided in initial transaction request, callback for Capture will not be sent. To implement callback with final status handling see :ref:`Connecting Party Callbacks`. | (7) To implement order status request see :ref:`/api/v2/status/`. Status should be requested multiple times with 3-5 seconds interval until final status will be received in response. | (9) Final Status can be sent by Connecting Party based on internal business model or by Payer’s request. .. _cancel-form_request_url_web: Cancel Flow ^^^^^^^^^^^ Cancel is opposite of Capture which cancels the deduction and returns locked amount back to Payer's card. It is important to know that the block remains for a definite period of time depending on whether this is a debit or a credit card (usually the maximum block period is 7 days for debit cards and 28 days for credit cards). .. uml:: :align: center skinparam roundcorner 20 skinparam sequenceArrowThickness 1 skinparam maxmessagesize 100 skinparam sequenceParticipant underline actor Payer participant "Connecting party" as A participant "Payneteasy" as B hnote over A,B : Successful Preauth Transaction autonumber group Optional Payer -> A: Initiate Cancel activate A end == Cancel == A -> B: api/v2/cancel activate B B --> A: Order ID B -> B: Process Cancel group Get Final Status == Receive Callback == A <- B: Callback with Final Status A --> B: HTTP 200 deactivate B == Order Status Request == A -> B: Get Status by Order ID api/v2/status activate B B --> A: Response with Status, Order-stage deactivate B end group Optional A --> Payer: Final Status deactivate A end | (1) Cancel can be initiated by Connecting Party based on internal business model or Payer’s request. | (2) To implement cancel request see :ref:`/api/v2/return/`. | (5) Callback for Cancel will be sent only if :ex:`notify_url` was provided in initial transaction request or additional callback URL for Cancel transactions is specified on the endpoint level. If :ex:`server_callback_url` was provided in initial transaction request, callback for Cancel will not be sent. To implement callback with final status handling see :ref:`Connecting Party Callbacks`. | (7) To implement order status request see :ref:`/api/v2/status/`. Status should be requested multiple times with 3-5 seconds interval until final status will be received in response. | (9) Final Status can be sent by Connecting Party based on internal business model or by Payer’s request.