Ginger Payments
Transactions

Authenticate a transaction

POST
/v1/orders/{order_id}/transactions/{transaction_id}/authenticate/

Starts a card payment with a card from the vault.

  • 3-D Secure by Ginger Payments: send the vault_token and cvc. Redirect your customer to the redirect_url in the response, so they can authenticate with their bank. Afterwards, they return to your return_url.
  • External 3-D Secure: also send the result of your own 3-D Secure provider in cavv, 3ds_version, 3ds_method_used and ds_transaction_id. The payment is processed right away and the response contains the order. See External 3-D Secure.
  • Payouts: send only the vault_token to execute a payout.

Authorization

apiKey
headerAuthorizationBasic <token>

Use your project's API key as the username and leave the password empty. Only use the API key from your server: it gives full access to your project.

Path Parameters

order_id*string

The id of the order.

Formatuuid
transaction_id*string

The id of the transaction, from the transactions of the order.

Formatuuid

Request Body

application/json
  1. body
vault_token*string

The vault_token from the vault.

Formatuuid
cvc?string

The card's CVC or CVV. Optional for payouts and recurring charges.

Match^[0-9]{3,4}$
cavv?string

External 3-D Secure only. Base64-encoded authentication value from your 3-D Secure provider.

3ds_version?string

External 3-D Secure only. 3-D Secure protocol version used.

Value in"2.1.0""2.2.0"
3ds_method_used?string

External 3-D Secure only. Authentication flow used.

Value in"challenge""frictionless"
ds_transaction_id?string

External 3-D Secure only. Transaction ID assigned by the directory server (DS).

Response Body

Authentication has started. Without external 3-D Secure values, the response contains the redirect_url for your customer. With external 3-D Secure values, the response contains the order.

application/json
  1. response
redirect_url*string

Where to redirect your customer to authenticate with their bank. Can be relative to https://api.dev.gingerpayments.com.

curl -X POST 'https://api.dev.gingerpayments.com/v1/orders/8078d78f-8700-4cfe-94b1-4a777d3400f2/transactions/a5dac3de-d304-4570-922b-373d478b8b3a/authenticate/' \  -H 'Content-Type: application/json' \  -d '{  "vault_token": "d972dc43-6a3d-4dcf-b54e-6e9a0fe325e3",  "cvc": "123"}'
{  "redirect_url": "https://api.dev.gingerpayments.com/pay/8078d78f-8700-4cfe-94b1-4a777d3400f2/a5dac3de-d304-4570-922b-373d478b8b3a/authenticate-3ds/"}