Google Pay™
Google Pay allows your customers to store payment methods in their own Google account for faster and more secure payments.
How it works
When the customer clicks the Google Pay payment button, the payment methods saved to their Google account are displayed. The customer can quickly select the desired payment method and optionally fill in additional purchase information. After this interaction with Google Pay, these same data will be sent / processed by the e-SiTef for payment flow.
Google Pay is supported by e-SiTef, however it is not supported by all acquirers and is not enabled by default in your account. Contact a member of our support team for more information.
Attention: By using Google Pay through e-SiTef, the merchant must be aware of and adhere to the Acceptable Use Policy and accept the Google Pay API Terms of Service.
REST Payment
Integrate with Google Pay
To start processing payments with Google Pay, you need to integrate with Google via Web or Android. During the integration you will see that some parameters are required to process Google Pay through e-SiTef:
- The
gatewayMerchantId
parameter must be populated with the merchant's merchant_id in e-SiTef; - The
gateway
parameter must be filled withsoftwareexpress
;
Below is an excerpt of integration via web that needs to be configured with e-SiTef data:
const tokenizationSpecification = {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'softwareexpress',
'gatewayMerchantId': '<ESITEF_MERCHANT_ID>'
}
};
Below is an excerpt of integration via Android that needs to be configured with e-SiTef data:
.setPaymentMethodTokenizationType(WalletConstants.PAYMENT_METHOD_TOKENIZATION_TYPE_PAYMENT_GATEWAY)
.addParameter("gateway", "softwareexpress")
.addParameter("gatewayMerchantId", "<ESITEF_MERCHANT_ID>")
The following card networks available on Google Pay are supported by e-SiTef: VISA
, ELECTRON
, MASTERCARD
, MAESTRO
, ELO
, ELO_DEBIT
, AMEX
, DISCOVER
and JCB
. The following authorization methods available on Google Pay are supported by e-SiTef: PAN_ONLY
and 3DS_CRYPTOGRAM
. Contact our support team to activate the proper settings for your merchant.
In addition, the store must follow Google Pay layout guidelines. See the Google Pay documentation for brand guidelines.
The screens below shows a Web buy flow recommended by Google Pay.
The screens below shows an Android buy flow recommended by Google Pay.
Send data to e-SiTef
When you complete your integration with Google, you will have all the information you need to make a payment with e-SiTef.
Google will respond with the PaymentData response, which includes the encrypted load (token).
From the Google response containing the customer information, extract the token, following the API reference to properly extract the token from the response. Currently, the token can be extracted from paymentData.paymentMethodData.tokenizationData.token
. Use this token on payment effectuation request in the card.wallet_transaction_id
field. Additionally this, will be necessary to send the field paymentData.paymentMethodData.info.cardNetwork
to the field wallet_returned_card_brand
. Below is an example of this request:
The content of
paymentData.paymentMethodData.tokenizationData.token
is equivalent to a JSON, but there is no need to handle this content. Pass the value obtained without performing any treatment to thecard.wallet_transaction_id
field.
curl -X POST \
https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/payments/<NIT> \
--header "Content-Type: application/json" \
--header "merchant_id: <MERCHANT_ID>" \
--header "merchant_key: <MERCHANT_KEY>" \
--data-binary '{
"authorizer_id": "405",
"card": {
"wallet_transaction_id": "{\"signatures\":\"MEUCIH1PBdMmbWMvaR/ArH08R/OT41Or2yfLqbzj2JG9VGfJAiEA+6NPKT6sAKZeaLacm29wIS8v2tUwPE281JuRBf81imo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEm1j1auejJXFzexs/H3TasImWFERsifrx93W7wxZb0dpLxk/FaK8hQN6Ypwep8DaYrEKSp6zvxeE4ezDrssf/Bg\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1576347458323\\\"}\",\"signatures\":[\"MEYCIQCbAolg3/K2yD0/p3K7gRFhXva79STrj+rZcYp/3vi6ogIhANGT/9GkO9S1lJtnu3C6QQ/kFSR2wxtPJRGfuqSKs9FE\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"Dcm8wxtB6Bp7CyHV1OBqTskStqX3K5x7I0fV/2V0KsMLkZHP5nn+IXC+HBLkZtPF0Ov6uBD1eLbOB2KQd1cVmBPm7f4xSsB4DaYTktfk2AaLpR0BZlb9errv4jl4QAxSLdxw8Hk3EKicSmvsUNE2SzFBOONPrvv1qe03ZnzB3Q0ID1ocsBJ09PQ/2jft0WY/Py6iAA4sccZKmxLdo83NJJc1VrfcGLcqwy5InUV4nSxmXrnr/eNQDIx9p4Yf3RSVlS6/t+bEpUjpUSwSNoHwzhlWOve3/Gm+yt+OKheXOWSsXiHJL1rV1ENgDroR2uMUb85OZCF1ulStb6U8xocRVKSKkhAxFVUehz568huQdlEjns+5MMWdZkNgH3cXMgTQxZ6DiUYxMthUhdT8HINXCUYxaT/od/Njh2JZHJb2R4u4HsfViUoIVRHojSaepXP3KI2z4G9hPwKX/MWeEMyiZRUiCHHe0VJoU/8xxg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BG0eCJ8xbPN55ht7b3oDZgFgwG4rZxkRWrOFnmW9wwxUrZS0A6oeMAySLKThMydaGuoTbbiAwK38zx8pnNKgirA\\\\u003d\\\",\\\"tag\\\":\\\"uPvitOn+aGk48RlrwzYSKgDicO5oYtmMEWXzj5rUewo\\\\u003d\\\"}\"}"
},
"wallet_returned_card_brand" : "MASTER"
}'
In the example above, it was set authorizer_id
field with the value 405
, which corresponds to select Google Pay as payment method; and was set wallet_transaction_id
field with the value of the Google Pay token. Successful execution of the above command will return a JSON similar to the one below.
{
"code":"0",
"message":"OK. Transaction successful.",
"payment":{
"authorizer_code":"000",
"authorizer_message":"Transacao OK",
"status":"CON",
"nit":"<NIT>",
"order_id":"13034649671",
"customer_receipt":"====RECEIPT BUYER====",
"merchant_receipt":"====RECEIPT MERCHANT====",
"authorizer_id":"405",
"acquirer_id":"1005",
"acquirer_name":"Redecard",
"authorizer_date":"28/02/2020T08:57",
"authorization_number":"132030",
"merchant_usn":"13034649671",
"esitef_usn":"170713097340300",
"sitef_usn":"132030",
"host_usn":"999132030",
"payment_date":"13/07/2017T15:52",
"amount":"1000",
"payment_type":"C",
"issuer":"2",
"authorizer_merchant_id":"<MERCHANT_ID>"
}
}
For more details, see e-SiTef REST payment.
REST Card Storage (Vault)
Card storage is possible, with some exceptions depending on how the Google Pay * token * was generated. Contact our support team to make the necessary configurations to enable this storage.
REST card storage works just like storing any other card, but with the following precautions:
- Instead of sending card numbers, send the
wallet_transaction_id
field. - The
authorizer_id
field must be sent according to the card network. See the table below to submit the correct value:
Google Pay Card Network | authorizer_id |
---|---|
VISA | 1 |
ELECTRON | 221 |
MASTERCARD | 2 |
MAESTRO | 286 |
ELO | 41 |
ELO_DEBIT | 288 |
AMEX | 3 |
DISCOVER | 44 |
JCB | 43 |
For more details, see e-SiTef REST store.
HTML Payment
To use Google Pay with HTML payment, please contact a member of our support team to perform the necessary setup. You can determine which card networks will be accepted on Google Pay in HTML integration.