// API Reference

Payments

Charge a card at capture time, or charge a vaulted card by token.

POST /v1/payments/charge/token

The workhorse: charge a previously vaulted card using its charge token.

REQUESTHTTP
POST /v1/payments/charge/token
Authorization: Bearer <session JWT>
Content-Type: application/json

{
  "token":    "<charge token>",  // required
  "amount":   25.00,             // required, decimal > 0
  "currency": "USD",             // required
  "ref":      "INV-2026-0042",   // your reference, echoed in logs
  "processorId": "...",          // optional; defaults to the token's gateway
  "storedCredentialType": 5      // optional; how this charge is initiated
}
Amounts are decimal. 25.00 means twenty-five dollars. Do not send minor units -- 2500 would charge $2,500.00.

Stored-credential behavior

For recurring cards, Card Vault manages the stored-credential chain with the card networks. If you flag a charge as merchant-initiated before the card has an established chain (an approved cardholder-present charge), the API refuses it:

Gateway routing

The charge runs on the gateway configured for the token's segment. Passing a processorId that conflicts with it fails closed:

Other errors

POST /v1/payments/charge

At-capture charge ("card on hand"): charge the card in the same call that captures it, with optional vault-on-success. Card fields arrive through SDK secure-field encryption, like the vault call.

REQUESTHTTP
POST /v1/payments/charge
Authorization: Bearer <session JWT>
Content-Type: application/json

{
  "encryptedPan":    "<SDK secure field>",  // required
  "encryptedCvv":    "<SDK secure field>",  // required
  "encryptedExpiry": "<SDK secure field>",  // required, MM/YY
  "encryptedName":   "<SDK secure field>",
  "amount":          25.00,           // required, decimal > 0
  "currency":        "USD",           // required
  "transactionType": 0,               // 0 = charge, 1 = pre-authorization
  "vaultOnSuccess":  true,            // store the card if the charge approves
  "ref":             "INV-2026-0042",
  "postal":          "T8V 4E9",       // optional, for AVS
  "processorId":     "..."            // optional
}

Vault on success: when vaultOnSuccess is true and the charge approves, the card is vaulted in the same operation and the response includes its token -- the approved charge doubles as the cardholder-present transaction that establishes the stored-credential chain for future token charges.

If your CardVault subscription is 30 or more days past due, the charge still runs and returns its normal outcome, but the card is not vaulted and the response carries no token (new cards are suspended until the subscription is paid; cards already in the vault keep working).

Errors

Charge outcome: 200 or 202

Every charge, pre-authorization and completion call waits for the processor's answer (up to about 25 seconds) and returns it. The response carries txStatus and txId:

When vaultOnSuccess is true, the card is vaulted only when the call itself returns approved. A 202 answer does not vault the card.

GET /v1/payments/{txId}

Returns the outcome of a payment by its txId. Call it from your server with an API key that has Virtual Terminal Log View. SDK session tokens are single-use, so a device cannot poll with one.

RESPONSEJSON
{
  "data": {
    "txId":          "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
    "txStatus":      "approved",  // approved | declined | failed | processing | unknown
    "approved":      true,
    "txRef":         "...",
    "authCode":      "...",
    "declineReason": null,
    "preAuthId":     null,         // set for an approved pre-authorization
    "txType":        216,          // 216 charge, 217 pre-auth, 218 completion, 220 cancel
    "amount":        25.00,
    "ref":           "INV-2026-0042",
    "correlationId": "..."
  }
}

It answers 200 for a final outcome, 202 while the payment is processing or unknown, and 404 when the id does not belong to your account.