Google Pay Response Objects
For complete sample code please refer here
Available Response Objects
PaymentResponse Object
This Object contains Google Pay response.
Name | Type | Always exists | Description |
| Yes | Contains all transaction data. For more details please click on the link | |
| Yes | This is a response object that's returned by Google after a payer approves payment |
TransactionInfo Object
Name | Type | Always exists | Description |
| DisplayItem | Yes | Array of line items describing the charge. For more details please click on the link |
| String | Yes | ISO 3166-1 alpha-2 country code |
| String | Yes | ISO 4217 alphabetic currency code. |
| String | Yes | Set to |
| String | Yes | Total amount consumer should be charged. This is a sum of all DisplayItems |
| String | Yes | A unique ID that identifies a transaction attempt. Can be passed on the Request through billingParameters |
DisplayItem Object
Name | Type | Always exists | Description |
| String | Yes | From Google documentation: The label to be displayed for the given option |
| String | Yes | From Google documentation: Type of displayed line item:
|
| String | Yes | From Google documentation: The monetary value of the cart item with an optional decimal precision of two decimal places. Negative values are allowed. |
| String | Yes | From Google documentation: The following variables define price variance:
Default to |
TransactionInfo example
PaymentData Object
Name | Type | Always exists | Description |
| Number | Yes | From Google documentation: Major API version |
| Number | Yes | From Google documentation: Minor API version |
| Yes | From Google documentation: Data about the selected payment method | |
| String | No | Email address, if |
| No | From Google documentation: The selected shipping option in the payment sheet. | |
| No | Shipping address, if |
SelectionOptionData Object
Name | Type | Always exists | Description |
| String | Yes | Id of the selected Shipping Option |
PaymentMethodData Object
Name | Type | Always exists | Description |
| String | Yes | From Google documentation: User-facing message to describe the payment method that funds this transaction. |
| Yes | From Google documentation: Data about the selected payment method | |
| No | From Google documentation: Payment tokenization data for the selected payment method. | |
| String | Yes | Will be always set to |
CardInfo Object
Name | Type | Always exists | Description |
| String | Yes | From Google documentation: The payment card network of the selected payment. |
| String | Yes | From Google documentation: The details about the card. This value is commonly the last four digits of the selected payment account number. |
| String | Yes | From Google documentation:
This object provides information about the validation performed on the returned payment data if |
| Address | No | From Google documentation:
The billing address associated with the provided payment method, if |
PaymentMethodTokenizationData Object
Name | Type | Always exists | Description |
| String | Yes | Will be always set to |
| String | No | A JSON object string that contains a chargeable token issued by Google |
PaymentData Example
Address Object
Name | Address format | Description |
| MIN | From Google documentation: The full name of the addressee. |
| MIN | From Google documentation: The postal or ZIP code. |
| MIN | From Google documentation: ISO 3166-1 alpha-2 country code. |
| MIN | From Google documentation:
A telephone number, if |
| FULL | From Google documentation: The first line of the address. |
| FULL | From Google documentation: The second line of the address. |
| FULL | From Google documentation: The third line of the address. |
| FULL | From Google documentation: City, town, neighborhood, or suburb. |
| FULL | From Google documentation: A country subdivision, such as a state or province. |
| FULL | From Google documentation: The sorting code. |
Address Example
Full Response Object
Last updated