POST////
Use this endpoint to add a card to Google Wallet via a web application using the Unified Push Provisioning (UPP) flow.
You need to configure Google Unified Push Provisioning (UPP) first. See Configuring Google Unified Push Provisioning (UPP).
Header parameter
| Fields | Description |
|---|---|
| req-sys-id string Required | Identifier generated by the card program. These identifiers are used for troubleshooting requests between the card program and Marqeta. Allowable Values: 36 char max |
Request body
| Fields | Description |
|---|---|
| card_setting integer Required | Determines if Google Opaque Payment Card (OPC) Object will be returned. Google OPC is used to save funding primary account number (FPAN) to a Google account. - 1 - Return Google OPC in the response. - 0 - Do not return Google OPC in the response. Allowable Values: 0, 1 |
| card_token string Required | Unique identifier of the card resource to use for the provisioning request. Allowable Values: 1–36 characters |
| device_id string Optional | Unique identifier of the user’s Android device, as provided by Google Wallet. Required if the value of the token_setting field is 1.Allowable Values: 1–24 characters |
| wallet_id string Optional | Identifier of the device-scoped Google Wallet that will receive the digital wallet token, as provided by Google Wallet. Required if the value of the token_setting field is 1.Allowable Values: 1–50 characters |
| server_session_id string Optional | Unique identifier of the backend session, as provided by Google Wallet. Required for Google OPC generation. Allowable Values: 1–50 characters |
| token_setting integer Required | Indicates if tokenization will be attempted by card programs. - 1 - Tokenization will be attempted. - 0 - Tokenization will not be attempted. Allowable Values: 0, 1 |
Sample request body
JSON
{
"card_token": "e9419ecb-f317-4fe7-a6c1-e33989b3576f",
"device_id": "device-hardware-id",
"wallet_id": "google-wallet-id",
"server_session_id": "abc123",
"token_setting": 1,
"card_setting": 1
}
Response body
| Fields | Description |
|---|---|
| display_name string Conditionally returned | Name of the card as displayed in the digital wallet. Allowable Values: 255 char max |
| last_digits string Conditionally returned | Last four digits of the primary account number of the physical or virtual card. Allowable Values: 4 characters |
| user object Conditionally returned | Contains the cardholder’s name and address details returned for the provisioning request. Allowable Values: name, address_lines, locality_name, administrative_area_name, postal_code_number, country_code, phone |
| user.name string Conditionally returned | Name of the cardholder. Allowable Values: 255 char max |
| user.address_lines array of strings Conditionally returned | Street address lines of the cardholder. Allowable Values: 255 char max |
| user.locality_name string Conditionally returned | City of the cardholder. Allowable Values: 255 char max |
| user.administrative_area_name string Conditionally returned | State or province of the cardholder. Allowable Values: 255 char max |
| user.postal_code_number string Conditionally returned | Postal code of the cardholder. Allowable Values: 255 char max |
| user.country_code string Conditionally returned | Country of the cardholder. Allowable Values: Valid ISO 3166-1 alpha-2 country code, such as US, CA, or GB. |
| user.phone string Conditionally returned | Phone number of the cardholder. Allowable Values: 255 char max |
| token_credentials object Conditionally returned | Contains the Token Service Provider (TSP) data used to provision the digital wallet token into Google Wallet. This object is returned if the value of the token_setting field in the request is 1.Allowable Values: card_network, token_service_provider, opaque_payment_card |
| token_credentials.card_network string Returned | Card network associated with this token. Allowable Values: PAYMENT_NETWORK_MASTERCARD, PAYMENT_NETWORK_VISA |
| token_credentials.token_service_provider string Returned | Specifies the network that provides the digital wallet token service. Allowable Values: TOKEN_PROVIDER_VISA, TOKEN_PROVIDER_MASTERCARD |
| token_credentials.opaque_payment_card string Returned | Encrypted data field created by the issuer and passed to Google Wallet during the push provisioning process. Allowable Values: Encrypted string |
| card_credentials object Conditionally returned | Contains Google’s Opaque Payment Card (OPC) data, which is used to save the funding primary account number (FPAN) to a Google account. This object is returned if the value of the card_setting field in the request is 1.Allowable Values: google_opaque_payment_card |
| card_credentials.google_opaque_payment_card string Returned | Encrypted data field created by the issuer and passed to Google Wallet during the push provisioning process. Allowable Values: Encrypted string |
Sample response body
JSON
{
"display_name": "My Visa Card",
"last_digits": "1234",
"user": {
"name": "Jane Doe",
"address_lines": [
"123 Main St"
],
"locality_name": "San Francisco",
"administrative_area_name": "CA",
"postal_code_number": "94105",
"country_code": "US",
"phone": "+14155550100"
},
"token_credentials": {
"card_network": "PAYMENT_NETWORK_VISA",
"token_service_provider": "TOKEN_PROVIDER_VISA",
"opaque_payment_card": "my_opc_base64..."
},
"card_credentials": {
"google_opaque_payment_card": "google_opc_base64..."
}
}