This reference is based on the Card Payment Instrument
schema
for the payment instrument object returned by Google Pay payment
handler upon
checkout completion inside the payment.instruments array.
{
"id": string,
"handler_id": string,
"type": string,
"selected": boolean,
"display": {
"brand": string,
"last_digits": string,
"description": string,
"card_art": string
},
"billing_address": {
"first_name": string,
"last_name": string,
"street_address": string,
"extended_address": string,
"address_locality": string,
"address_region": string,
"postal_code": string,
"address_country": string,
"phone_number": string
},
"credential": {
"type": "PAYMENT_GATEWAY" | "DIRECT",
"token": string
}
}
Properties
| Property | Type | Always present? | Description |
|---|---|---|---|
id |
string | Yes | A unique identifier for this payment instrument instance, assigned by the platform. |
handler_id |
string | Yes | The unique identifier for the handler instance that produced this instrument. Corresponds to the id field in the payment handler configuration. |
type |
string | Yes | The type of payment instrument, e.g. card. |
selected |
boolean | No | Indicates whether this instrument was selected by the user. |
display |
object | Yes | Display information for the payment instrument. |
display.brand |
string | Yes | The card brand/network (for example, "VISA"). |
display.last_digits |
string | Yes | Last 4 digits of the card number. |
display.description |
string | No | A user-facing description of the card. |
display.card_art |
string | No | A URI to an image representing the card. |
billing_address |
object | No |
The billing address associated with the card.
Only returned if billing_address_required was set to true in the configuration.
|
billing_address.first_name |
string | No | First name of the contact associated with the address. |
billing_address.last_name |
string | No | Last name of the contact associated with the address. |
billing_address.street_address |
string | No | The street address. |
billing_address.extended_address |
string | No | An address extension (for example, apartment or suite number). |
billing_address.address_locality |
string | No | The locality (for example, city). |
billing_address.address_region |
string | No | The region (for example, state or province). |
billing_address.postal_code |
string | No | The ZIP/postal code. |
billing_address.address_country |
string | No | The country code (2-letter ISO 3166-1 alpha-2 format). |
billing_address.phone_number |
string | No |
The phone number.
Only returned if phone_number_required was set to true in the configuration.
|
credential |
object | No | The secure tokenization data returned by Google Pay. |
credential.type |
string | Yes |
The tokenization type. Matches the configured type.
|
credential.token |
string | Yes |
The encrypted payment credential token as a JSON-serialized string.
For PAYMENT_GATEWAY, this contains the encrypted payload to pass to your gateway.
For DIRECT, this contains the encrypted card details (requires decryption using your private key).
See the Payment data cryptography guide for details on the format and decryption process.
|