Rabobank Docs

Store a card

POST
/v1/cards/

Stores card details in the vault and returns a vault_token that represents the card. Use it to authenticate a transaction, and store it for one-click and recurring payments.

Get the setup_token from the payment_method_details of the transaction when you create the order. It works once, within 300 seconds after the order was created.

You need to be PCI DSS compliant to send card data to this endpoint. See Accept a card payment.

Request Body

application/json
  1. body
name?string

Cardholder name as printed on the card, in printable ASCII or Latin-1 characters. Some projects don't allow sending it.

Match^[\x20-\x7E\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+$
Length1 <= length <= 120
pan*string

Card number without spaces. It must pass the Luhn check.

Match^[0-9]{12,19}$
expiry?string

Expiry date in MMYYYY format, such as 012030 for January 2030. Send it when you have it.

Match^(0[1-9]|1[0-2])[0-9]{4}$
setup_token*string

The setup_token from the payment_method_details of the transaction. It works once, within 300 seconds after the order was created.

Formatuuid
transaction_id?string

The id of the transaction the card is for. Optional, it's stored with the card.

Formatuuid

Response Body

The card has been stored.

application/json
  1. response
vault_token?string

Token that represents the card. Store it to use the card again.

Formatuuid
truncated_pan?string

Masked card number.

brand?string

Detected card brand, such as visa.

brands?array<string>

All brands detected for the card.

curl -X POST 'https://tokens.prod.smartpay.gingerpayments.com/v1/cards/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "name": "John Smith",  "pan": "4111111111111111",  "expiry": "012030",  "setup_token": "87f05a5d-1755-48c7-8161-f8a9544e56bf"}'
{  "vault_token": "d972dc43-6a3d-4dcf-b54e-6e9a0fe325e3",  "truncated_pan": "4111********1111",  "brand": "visa",  "brands": [    "visa"  ]}