Rabobank Docs

Store a Google Pay payment token

POST
/tokens/

Decrypts the Google Pay payment token and stores the card in the vault. Call it with the token from paymentData.paymentMethodData.tokenizationData.token, as the string Google returns it, and the setup_token and id of the Google Pay transaction. Only for a server-to-server integration with your own checkout: with the hosted payment page you don't call this endpoint.

No API key is needed, the setupToken identifies the transaction.

Test environment: for a token from Google's test environment, when your Google Pay payment request has environment set to TEST, send the same request to https://google-pay.rabobank.example.com/test/tokens/ instead. Google encrypts those tokens with other keys, and their test cards are mapped to Rabobank test cards, so the payment can be completed in a test project.

Request Body

application/json
  1. body
googlePayMessage*string

The payment token from Google, paymentData.paymentMethodData.tokenizationData.token, as the JSON string Google returns it.

setupToken*string

The setup_token from the payment_method_details of the Google Pay transaction.

Formatuuid
transactionId*string

The id of the Google Pay transaction.

Formatuuid

Response Body

The card has been stored. The response contains what you need to execute the payment.

application/json
  1. response
vaultToken*string

Token of the card in the vault.

Formatuuid
cryptogram?string

The cryptogram of the payment. Absent when the card was returned as PAN_ONLY.

eciIndicator?|

The Electronic Commerce Indicator (ECI). Absent or null when Google didn't provide it.

curl -X POST 'https://google-pay.rabobank.example.com/tokens/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "googlePayMessage": "{\"signature\":\"MEUCIQDXc...03d\",\"protocolVersion\":\"ECv2\",\"signedMessage\":\"...\"}",  "setupToken": "c6d0a22b-df22-41a2-aac1-d647173ff219",  "transactionId": "59f5866a-c216-472e-b803-8a4e83c4578a"}'
{  "vaultToken": "d972dc43-6a3d-4dcf-b54e-6e9a0fe325e3",  "cryptogram": "AgAAAAAABk4DWZ4C28yUQAAAAAA=",  "eciIndicator": "05"}