Stay organized with collections
Save and categorize content based on your preferences.
The following are some of the fields contained in the Google Pay response.
Field keys
Description
txnid
UPI transaction ID. Deprecated
responseCode
UPI response code. Deprecated
ApprovalRefNo
UPI approval reference number (optional).Deprecated
Status
Transaction status, will be {SUBMITTED/SUCCESS/FAILURE}. Deprecated
txnRef
Transaction reference ID (from input).Deprecated
tezResponse
A JSON string containing all response fields and some critical request fields. If the transaction is unsuccessful, some fields may not be set. Fields included are:
toVpa - VPA that receives money.
txnId - UPI transaction ID.
responseCode - UPI response code.
Status - Transaction status.
amount - Order amount.
txnRef - Transaction reference ID.
The following example shows possible keys and values: {"Status":"SUCCESS","amount":"10.01","txnRef":"reference ID","toVpa":"test@axis","txnId":"AXI1234567890","responseCode":"00"}. This string is used for signing into the Google Pay Server and should be used for signature verification.
signature
The signature field is provided to verify the authenticity of a Google Pay response. It is the signed response from the Google Pay server. The signature exists if the payment is successful. If the payment fails, it may not exist.
signatureKeyId
The ID of the public key used for signature verification.
The fields txnId,responseCode, ApprovalRefNo,status,txnRef are deprecated.
These fields are replaced with a fieldtezResponse.
Handle Google Pay response
After you receive the Google Pay response, check the transaction ID against
the APIs provided by your payment service provider (PSP) or payment aggregators.
This is to ensure that the transaction is successful before you deliver the
goods or services.
Google Pay provides a feature called signature verification
that lets you verify that the response is coming from Google Pay and that
it hasn't been modified. After you receive the response from Google Pay,
verify it with the signature.
If the response status is submitted, check with your PSP or payment
aggregator about the transaction status before processing the order.
Note that the amount in the Google Pay response might not be the amount you
requested, so you must use your requested amount for verification with your
PSP or payment aggregator.
If the response status is failure, you can either retry or abort. It is not
required to send an additional PSP query.
Handle the response code
If the payment doesn’t go through, it won’t be successful with the PSP.
Google Pay responses return a response code which can be used to improve the
payment flow. When the response code appears, you can either display the
corresponding error message to the user or implement a retry mechanism.
Based on our statistics, the response codes that appear most frequently are:
ZM: Payment failure due to invalid MPIN.
Z9: Payment failure due to insufficient funds.
91: Payment failure due to transaction timeout or connection issue.
The three response codes above make up more than 50% of all payment failures.
[null,null,["Last updated 2024-10-16 UTC."],[[["\u003cp\u003eGoogle Pay responses now include a \u003ccode\u003etezResponse\u003c/code\u003e field containing transaction details like status, amount, and UPI ID, replacing previously deprecated fields.\u003c/p\u003e\n"],["\u003cp\u003eAlways verify Google Pay transactions with your payment processor to confirm success and prevent fraud before fulfilling orders.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Pay's signature verification feature ensures response authenticity and should be implemented for security.\u003c/p\u003e\n"],["\u003cp\u003eHandle various response codes, such as \u003ccode\u003eZM\u003c/code\u003e, \u003ccode\u003eZ9\u003c/code\u003e, and \u003ccode\u003e91\u003c/code\u003e, to address common payment failures and improve user experience.\u003c/p\u003e\n"],["\u003cp\u003eMonitor transaction status through your payment processor if the Google Pay response status is "submitted".\u003c/p\u003e\n"]]],["Google Pay's response includes fields like `tezResponse`, `signature`, and `signatureKeyId`. Deprecated fields include `txnid`, `responseCode`, `ApprovalRefNo`, `Status`, and `txnRef`, all replaced by `tezResponse`. Upon receiving a response, verify the transaction ID with your payment service provider (PSP). Signature verification ensures authenticity. For a `SUBMITTED` status, query the PSP; for `FAILURE`, retry or abort. Response codes like `ZM`, `Z9`, and `91` indicate common failure reasons (e.g. invalid MPIN, insufficient funds).\n"],null,["# Google Pay response\n\nThe following are some of the fields contained in the Google Pay response.\n\n| Field keys | Description |\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| txnid | UPI transaction ID. **Deprecated** |\n| responseCode | UPI response code. **Deprecated** |\n| ApprovalRefNo | UPI approval reference number (optional).**Deprecated** |\n| Status | Transaction status, will be {SUBMITTED/SUCCESS/FAILURE}. **Deprecated** |\n| txnRef | Transaction reference ID (from input).**Deprecated** |\n| tezResponse | A JSON string containing all response fields and some critical request fields. If the transaction is unsuccessful, some fields may not be set. Fields included are: - toVpa - VPA that receives money. - txnId - UPI transaction ID. - responseCode - UPI response code. - Status - Transaction status. - amount - Order amount. - txnRef - Transaction reference ID. \u003cbr /\u003e The following example shows possible keys and values: {\"Status\":\"SUCCESS\",\"amount\":\"10.01\",\"txnRef\":\"reference ID\",\"toVpa\":\"test@axis\",\"txnId\":\"AXI1234567890\",\"responseCode\":\"00\"}. This string is used for signing into the Google Pay Server and should be used for signature verification. |\n| signature | The signature field is provided to verify the authenticity of a Google Pay response. It is the signed response from the Google Pay server. The signature exists if the payment is successful. If the payment fails, it may not exist. |\n| signatureKeyId | The ID of the public key used for signature verification. |\n\nThe fields `txnId`,`responseCode`, `ApprovalRefNo`,`status`,`txnRef` are deprecated.\nThese fields are replaced with a field`tezResponse`.\n\nHandle Google Pay response\n--------------------------\n\nAfter you receive the Google Pay response, check the transaction ID against\nthe APIs provided by your payment service provider (PSP) or payment aggregators.\nThis is to ensure that the transaction is successful before you deliver the\ngoods or services.\n| **Important:** Checking the transaction against your PSP Bank is crucial to avoid fraud. Therefore, your server (not your mobile app or website) must check that Virtual Payment Address, transaction reference ID, and the expected amount for the purchased goods or services in the response are correct.\n\nGoogle Pay provides a feature called [signature verification](/pay/india/api/web/sign-verify)\nthat lets you verify that the response is coming from Google Pay and that\nit hasn't been modified. After you receive the response from Google Pay,\nverify it with the signature.\n\n- If the response status is submitted, check with your PSP or payment\n aggregator about the transaction status before processing the order.\n Note that the amount in the Google Pay response might not be the amount you\n requested, so you must use your requested amount for verification with your\n PSP or payment aggregator.\n\n- If the response status is failure, you can either retry or abort. It is not\n required to send an additional PSP query.\n\nHandle the response code\n------------------------\n\nIf the payment doesn't go through, it won't be successful with the PSP.\nGoogle Pay responses return a response code which can be used to improve the\npayment flow. When the response code appears, you can either display the\ncorresponding error message to the user or implement a retry mechanism.\n\nBased on our statistics, the response codes that appear most frequently are:\n\n- `ZM`: Payment failure due to invalid MPIN.\n- `Z9`: Payment failure due to insufficient funds.\n- `91`: Payment failure due to transaction timeout or connection issue.\n\nThe three response codes above make up more than 50% of all payment failures."]]