Google Pay™
This guide contains the required steps to process Google Pay payments through the API. The main payment actions that can be applied to card transactions will each be described here. A prerequisite is added to each section which is required in order to perform the action.
All examples are done with the minimum required fields, please view the API reference documentation to check up-to-date required fields. Always check the page of the connection you are using to process your payment, most connections have exceptions regarding which payment actions can be performed and other exceptions regarding the currencies, dynamic descriptor formatting, customer object requirements, etc.
Authorize
Action | Authorize |
---|---|
Description | Authorizing a card transaction will reserve the amount on the users card account at the issuer. Money will not yet be deducted from the bank account. It will defer per acquirer and issuer when the authorization is not valid anymore. |
Link to API docs | https://sandbox.omni.verifone.cloud/docs/api#tag/GooglePay |
Prerequisite 1 | A google token object for the token field. |
Prerequisite 2 | An account with a card processor attached to it that accepts Google Pay transactions. The account ID will need to be used for the account field. |
Prerequisite 3 | Check the connection page for the acquirer you are using for any exceptions regarding the dynamic descriptor, currency, customer requirements or other requirements. |
Post the following body to the /transaction/card/googlepay
endpoint:
{
"account": "account.id",
"amount": 1000,
"token": {
"protocalVersion":"ECv1",
"signature": "string",
"signedMessage": "string"
},
"capture_now": false,
"customer_ip": "string",
"dynamic_descriptor": "dynamic_descriptor",
"merchant_reference": "string",
"user_agent": "string",
}
Notice that in the above example the capture_now
field is set to false
. This is the flag that is used to authorize a transaction. Setting this field to true
would attempt to immediately capture the transaction, otherwise known as a sale.
If the transaction is authorized the response should contain the following field:
{
...
"status": "AUTHORIZED"
...
}
The transaction has now been authorized and can be voided or captured.
Authorize & Capture (Sale)
Action | Authorize |
---|---|
Description | Authorizing a card transaction will reserve the amount on the users card account at the issuer. Money will not yet be deducted from the bank account. It will defer per acquirer and issuer when the authorization is not valid anymore. |
Link to API docs | https://sandbox.omni.verifone.cloud/docs/api#tag/GooglePay |
Prerequisite 1 | A google token object for the token field. |
Prerequisite 2 | An account with a card processor attached to it that accepts Google Pay transactions. The account ID will need to be used for the account field. |
Prerequisite 3 | Check the connection page for the acquirer you are using for any exceptions regarding the dynamic descriptor, currency, customer requirements or other requirements. |
Capturing and authorizing a transaction works the same as a regular authorization with one small difference: The capture_now
flag needs to be set to true
.
Post the following body to the /transaction/card/googlepay
endpoint:
{
"account": "account.id",
"amount": 1000,
"token": {
"protocalVersion":"ECv1",
"signature": "string",
"signedMessage": "string"
},
"capture_now": true,
"customer_ip": "string",
"dynamic_descriptor": "dynamic_descriptor",
"merchant_reference": "string",
"user_agent": "string",
}
If the transaction is authorized the response should contain the following field:
{
...
"status": "SETTLEMENT_REQUESTED"
...
}