Skip to content
Last updated

Process a payment transaction with a stored token

Prerequisites

  • A valid API key — see Obtain API credentials
  • A token value — obtained from a previous transaction response or from POST /v1/payment_tokens

Step 1: Build the request

Set payment_method.type to token and include the token.

FieldRequiredDescription
typeYessale, auth, payment, payout
amountYesAmount in cents
payment_method.typeYestoken
payment_method.payment_tokenYesToken from a prior transaction or the Payment Tokens API
recurringTesSet to true for merchant-initiated recurring charges

Step 2: Send the request

curl -X POST \
  https://api.dev.paradisegateway.net/v1/transactions \
  -H "Content-Type: application/json" \
  -H "APIKEY: YOUR-API-KEY" \
  -d '{
    "type": "sale",
    "amount": 15000,
    "tip": 0,
    "payment_method": {
      "type": "payment_token",
      "payment_token": "PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA"
    },
    "recurring": true,
    "purchase_description": "Monthly subscription"
  }'

Step 3: Handle the response

The response is identical in structure to a raw-card sale. The payment_method section echoes the token and masked card details.

{
  "id": "TRANSACTION-01JMRSPCK7XVNP3KS8F2W4T6Y",
  "object": "transaction",
  "type": "sale",
  "transaction_state": "authorized",
  "response_status": "Approved",
  "response_code": "00",
  "amount": 15000,
  "tip": 0,
  "payment_method": {
    "type": "token",
    "payment_token": "PAYMENT_TOKEN-01JMRSPCK8WLXDPRMW3SNPVQEA",
  },
  "correlation_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
CVV not required for tokens

When using a stored token, CVV is not sent (PCI-DSS prohibits storing CVV). AVS results may not be available on tokenized transactions unless address data was stored with the token.

When to use tokens

ScenarioSet recurring
Returning customer checks out againfalse
Subscription or scheduled billingtrue
One-click reorderfalse
Installment paymentstrue

Setting recurring: true flags the transaction as merchant-initiated, which meets card network rules and can improve authorization rates.

Next steps