Vayapay Docs

External 3-D Secure

Send the results of your own 3-D Secure provider to Vayapay, and skip authentication by Vayapay.

If you already authenticate cardholders with your own 3-D Secure provider (MPI), you can send its results to Vayapay and skip authentication by Vayapay. This works only for card payments in your own checkout.

Create the order and store the card

Follow the card payment guide: create the order with a credit-card transaction, and store the card in the vault to get a vault_token.

Authenticate with your provider

Run 3-D Secure authentication with your own provider and keep the values it returns.

Send the authentication values

Add the values to the authenticate request of the transaction:

curl https://api.secure.vayapay.com/v1/orders/$ORDER_ID/transactions/$TRANSACTION_ID/authenticate/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "vault_token": "d972dc43-6a3d-4dcf-b54e-6e9a0fe325e3",
    "cvc": "123",
    "cavv": "jD8Ynh4EG+KCCBEFfTanAoQAAAA=",
    "3ds_version": "2.2.0",
    "3ds_method_used": "challenge",
    "ds_transaction_id": "bcde185e-91a9-4e06-8fed-c733b11e00ad"
  }'

cavv, 3ds_version, 3ds_method_used and ds_transaction_id are required. See Authenticate a transaction in the API reference.

The result

The payment is processed directly with the values you sent: there's no redirect_url, and the response contains the order. The order shows the values under external_authentication_details:

{
  "id": "6bf8a727-bef2-4420-8d41-af82f6f19f3d",
  "currency": "EUR",
  "amount": 100,
  "description": "External 3-D Secure",
  "status": "completed",
  "transactions": [
    {
      "id": "59f5866a-c216-472e-b803-8a4e83c4578a",
      "payment_method": "credit-card",
      "payment_method_details": {
        "card_expiry": "012030",
        "external_authentication_details": {
          "authenticationValue": "jD8Ynh4EG+KCCBEFfTanAoQAAAA=",
          "dsTransID": "bcde185e-91a9-4e06-8fed-c733b11e00ad",
          "methodUsed": "challenge",
          "protocolVersion": "2.2.0"
        },
        "truncated_pan": "4111********1111",
        "vault_token": "d972dc43-6a3d-4dcf-b54e-6e9a0fe325e3"
      },
      "status": "accepted"
    }
  ]
}

As with any payment, confirm the payment before you deliver.