open menu
axerve docs
Payments/Alternative payments/Google Pay™

Google Pay Google Pay™

SOAP
REST
Web integration

Google Payexternal link is the payment system by Google. Google Pay will securely store the credit card data in the Google Pay account. Paying using the mobile phone (via NFC) or on a website will be matters of seconds, from the moment a user clicks on “pay with Google Pay” to the reception of the payment.

More info on building Google Pay on you app and web sites can be found on Google Developersexternal link.

default

Google Pay at the moment only supports Visa, Mastercard and Maestro payment cards.

How to enable Google Pay™ on Axerve Ecommerce Solutions

Ask Axerve customer care to enable Google Pay with your Axerve Ecommerce Solutions account.

Setup the javascript code on your website

Follow the guide Tutorial on Google Pay | Google Developersexternal link to generate the code that allows to pay via Google Pay.

At step 2, you must define the tokenSpecification obect as follows:

copy
1"tokenizationSpecification": {
2    "type": "PAYMENT_GATEWAY",
3    "parameters": {
4        "gateway": "gestpay",
5        "gatewayMerchantId": "GESPAYXXXXX"
6    }
7}

Change GESPAYXXXXX with your Axerve Ecommerce Solutions Shop Login.

At step 3 define the supported payment card networks. For Axerve Ecommerce Solutions, use:

copy
1const allowedCardNetworks = ["MASTERCARD", "VISA"];
2const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

At step 5, you can set the Google Pay environment. By setting it to test, no real money is involved:

copy
1const paymentsClient =
2    new google.payments.api.PaymentsClient({environment: 'TEST'});
3// other possible value: {environment: 'PRODUCTION'}

If you use the TEST environment, remember to set the gatewayMerchantId to your test Shop Login.

Send the result to Axerve Ecommerce Solutions

At step 9, you register for the user click and perform the payment by calling loadPaymentData():

copy
1function onGooglePaymentButtonClicked() {
2    ...
3    paymentsClient.loadPaymentData(paymentDataRequest)
4      .then(function(paymentData) {
5        // send to Gestpay 
6        processPayment(paymentData);
7      })
8    ...
9}

You must take the paymentData response object and submit to Axerve Ecommerce Solutions, using your favourite method.

Send to Axerve Ecommerce Solutions via SOAP

You can send to Axerve Ecommerce Solutions the result of the payment via callPagamS2Sapi link

copy
1<callPagamS2S>
2  <!-- mandatory data -->
3  <shopLogin>9000002</shopLogin>
4  <uicCode>242</uicCode><!-- code for euro -->
5  <amount>24.21</amount>
6  <shopTransactionId>MYSHOP-0001</shopTransactionId>
7  <!-- attach here the paymentData JSON -->
8  <googlePay>
9    <tokenizationData>
10      <token>{"signature":"MEQCIAqZ1FIJMQmYxxtkUD3bU+qb/TT+GtQcYXhGZbmrYNQJAiB34P05djwyRT++tU8A6HfJy2bxlY6hmjDP+2Dms131jQ\u003d\u003d","protocolVersion":"ECv1","signedMessage":"{\"encryptedMessage\":\"GyRhs5im1clEgsjLYyUErcyA3GV68/Qab5ZsttyU/OrKo+oZjO2M0pyMOvsNX57nZCIPcCD0h1bL7sDZW7Igf6yiieqSbUvHxZHz3vYTitqbHKv9FVK+GhZq9kVk+r7vI/YG5/pi78b85f+hsYCz+JZMxDzIM8lntF8G+d3+8yl3ZW0H2wvRGpJlIP+dMTURv9ilZDlf1IoD7mhWcJcvpPOVS3cr2dyooDfGASA6FQOJu27aNgYDgtbKDcWkUEAUiR2+gg4irHpDYZCzlwmqV7uC8ZUUdyOpRNHOXLVuYou8aGuUp4jG2SlrWcSHaqcJV4o22pi24HUvwqMTRxojcMVpXorpIHS29F7HkQ3YMSjrtWNvmFZa3nYqyMbfh7E49zf+si4Kqd/yXyJDWJzXJoGBrr+8BEHGIcQ5ZFbfpASS1eRLWxJICOsmIMtapT/nZYAdvQTqqynscBu/hRZYP6471w\\u003d\\u003d\",\"ephemeralPublicKey\":\"BFqAUi7Sp0yqHF34Mm51mOlufyl80D/MAbcwXBqRxUmVrsLjrrOft+pa4GRFL9nyx02S1LjnpjNmX2WvMtdqIn0\\u003d\",\"tag\":\"XBpz+yRiJ5VQfdx+qxKTN4haZXGMZYORJsWT2P6jlq0\\u003d\"}"}
11      </token>
12    </tokenizationData>
13  </googlePay>
14  <!-- fill the remaining fields with usual data --> 
15  ...
16</callPagamS2S>

If the callPagamS2S response has success, the payment is completed.

Previous
prevGiropay
Next
iDEALnext

Create your test account to try the service!

Register
© 2007-2024 Axerve S.p.A. Company with Single Shareholder belonging to the Maurizio Sella S.a.a. VAT Group with VAT no. 02675650028 – Tax Code 02686620028 – Biella Court registration no. 71524 – Piazza Gaudenzio Sella 1, 13900 Biella – Share Capital € 4,000,000.00 fully paid-in – Registered in the Reg. Impr. C.C.I.A.A. Monte Rosa Laghi Alto Piemonte – Registered in the Register of Payment Institutions.