Rehydrate a card security code
This endpoint attaches a newly collected security code to a saved card's token, so the
token can be used for a customer-initiated payment (CIT). It returns the same token.
The security code is never saved with the card. It covers only the payment made right after it's entered, so every customer-initiated payment on a saved card needs a newly entered security code:
- Collect the security code from the customer.
- Call
rehydrate-cardwith the saved card'stokenand the security code. - Right after, call
select-payment-methodwith the sametokenand start the payment.
If the payment fails, collect the security code and call this endpoint again before retrying.
The browser SDK calls this endpoint for you in saved-card mode. Merchant-initiated payments
(MIT) through the merchant request-payment endpoint don't need it.
merchant_id
string
Required. Your merchant ID that uniquely identifies your account.
security_code
string
Required. The card's security code (CVV/CVC). This is typically a 3-digit number on the back of the card, or 4 digits on the front for American Express.
token
string
Required. The saved card's token.
NOT_FOUND
This error occurs when we cannot find the merchant account with the IDs provided. Double check that you are using the correct IDs.
UNHANDLED_ERROR
This error occurs when the server encounters an unexpected internal error that it cannot handle gracefully. This typically happens due to bugs, infrastructure issues, or edge cases that weren't anticipated during development.
INVALID_ARGUMENTS
This error occurs when the request contains invalid or missing parameters. Common cases include missing required fields, or values that don't match the expected format or type.
BAD_VERSION
This error occurs when making requests to an API version that is either deprecated or not yet released. This commonly happens when using an outdated SDK or when the API version specified in the request URL is incorrect.
curl "https://api.reservepay.com/sdk/rehydrate-card" \
-X POST
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"merchant_id": "123456789012",
"security_code": "123",
"token": "IC3949UCOE6U93"
}'
