PayOrc
S2S (Seamless API)

CAUTH (Pay by Token)

S2S Card-on-File — charge a saved payment token with class CAUTH.

CAUTH (Pay by Token)

Version: 3.0.0

S2S channel API key required. IP whitelist applies.

CAUTH charges a stored card token (merchant-initiated / card-on-file). Use the same POST /s2s/v1/payment endpoint as standard S2S payment, with class: "CAUTH" and payment_token inside card_details.

This is not a minimal body with only order_id and amount. You must send the full S2S { "data": { ... } } shape (customer, order, billing, shipping, items) plus data.card_details.payment_token.

Prerequisites

  1. CAUTH-enabled MID for the merchant (contact PayOrc support if needed).
  2. Valid payment_token from a prior tokenization flow (e.g. hosted AUTH REVERSAL).
  3. data.customer_details.m_customer_id — must match the customer linked to the token.
  4. Token is validated against merchant_id from your S2S API credentials (merchant-key / merchant-secret).
  5. Tokens are PSP-specific — the PSP is resolved from the stored card’s recurring mandate.

Supported PSPs (MIT drivers)

The PSP is picked from the token’s stored mandate, then routed to:

PSPDriver
TelrtelrOpenCauthDriver
PaymobpaymobOpenCauthDriver
NI (Network International)niOpenCauthDriver

A CAUTH MID must exist for that PSP + currency + test/live mode.

Endpoint

MethodURL
POSThttps://api.payorc.com/s2s/v1/payment

Please use the test credentials for sandbox testing.

Headers

HeaderRequired
merchant-keyYes
merchant-secretYes
Content-Typeapplication/json

Request body (key fields)

FieldRequiredDescription
data.classYesMust be CAUTH
data.typeYesMust be CARD
data.actionYesSALE or AUTH
data.capture_methodYes when AUTHMANUAL or AUTOMATIC
data.card_details.payment_tokenYesEncrypted token from Add Card / tokenization
data.customer_details.m_customer_idYesMust match token’s customer
data.customer_detailsYesname, email, mobile, code
data.order_detailsYesm_order_id, amount, currency, return_url, etc.
data.billing_detailsYes*Required unless valid billing is stored on the token
data.shipping_detailsYesSame shape as S2S Payment
data.itemsYesLine items array
data.urls.webhook_urlNoPer-order webhook URL (HTTPS) — see URLs

* If the token has a saved billing address on file, billing may be loaded automatically; otherwise all mandatory billing fields are required.

Do not put payment_token at the top level of data. It must be inside data.card_details. Do not send raw card number/CVV for CAUTH — only the token.

Example request

{
  "data": {
    "action": "SALE",
    "class": "CAUTH",
    "capture_method": "AUTOMATIC",
    "type": "CARD",
    "customer_details": {
      "m_customer_id": "1234",
      "name": "John Doe",
      "email": "[email protected]",
      "mobile": "9876543210",
      "code": "971"
    },
    "order_details": {
      "m_order_id": "ORD-CAUTH-001",
      "amount": "10",
      "currency": "AED",
      "convenience_fee": "0",
      "description": "Subscription charge",
      "return_url": "https://merchant.example.com/return"
    },
    "items": [
      {
        "title": "Monthly plan",
        "quantity": 1,
        "unit_price": "10.00",
        "discount_amount": "0.00",
        "is_refundable": true
      }
    ],
    "card_details": {
      "payment_token": "YOUR_PAYMENT_TOKEN_FROM_AUTH_REVERSAL"
    },
    "billing_details": {
      "address_line1": "Po Box 12322",
      "address_line2": "",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044"
    },
    "shipping_details": {
      "shipping_name": "John Doe",
      "shipping_email": "[email protected]",
      "shipping_code": "971",
      "shipping_mobile": "9876543210",
      "address_line1": "Po Box 12322",
      "address_line2": "",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044",
      "shipping_currency": "AED",
      "shipping_amount": "0"
    },
    "urls": {
      "success": "",
      "cancel": "",
      "failure": "",
      "webhook_url": "https://merchant.example.com/webhook"
    }
  }
}

Code flow (S2S)

  1. Validation — token + m_customer_id + merchant_id scope check.
  2. Order created (s2s_create) like ECOM.
  3. Card routing / PSP modular path skipped for CAUTH.
  4. cauthPaymentMiddlewareopenCauthStoredTokenService → PSP driver (Telr / Paymob / NI).

Success response

MIT success returns ServerResponse.successdatamsg(webhookPayload) — envelope { status, code, message, data } where data is the full webhook-shaped payload (same as Webhook notifications / hosted Pay by Token).

{
  "status": "success",
  "code": "00",
  "message": "Transaction Successful",
  "data": {
    "action": "CAPTURE",
    "status": "SUCCESS",
    "status_code": "00",
    "order_status": "CAPTURED",
    "m_order_id": "ORD-CAUTH-001",
    "p_order_id": "1000015109",
    "p_request_id": "1000015200",
    "psp_ref_id": "8902217",
    "transaction_id": "1000021941",
    "is_live": false,
    "terminal_label": "",
    "remark": "",
    "reason": "",
    "currency": "AED",
    "amount": "10.00",
    "channel": "S2S",
    "channel_id": "",
    "shipping_fee": "0.00",
    "convenience_fee": "0.00",
    "customer_details": {
      "name": "John Doe",
      "email": "[email protected]",
      "code": "91",
      "mobile": "9876543210",
      "m_customer_id": "1234"
    },
    "billing_address": {
      "address_line_1": "Po Box 12322",
      "address_line_2": "",
      "city": "Dubai",
      "state": "Dubai",
      "country": "AE",
      "pincode": "54044"
    },
    "shipping_address": {
      "address_line_1": "",
      "address_line_2": "",
      "city": "",
      "state": "",
      "country": "",
      "pincode": ""
    },
    "ip_country": "",
    "psp": "PAYMOB",
    "payment_method": "CARD",
    "m_payment_token": "B2JmcS85UDEwZXdTVElxc0swc1JNUT09",
    "transaction_time": "03-08-2026 09:44:40",
    "payment_method_data": {
      "scheme": "VISA",
      "card_country": "POLAND",
      "card_type": "DEBIT",
      "mask_card_number": "4111****1111"
    },
    "apm_name": "",
    "apm_identifier": "",
    "sub_merchant_identifier": "0000001181",
    "parameters": [
      { "alpha": "" },
      { "beta": "" },
      { "gamma": "" },
      { "delta": "" },
      { "epsilon": "" }
    ],
    "custom_data": [
      { "alpha": "" },
      { "beta": "" },
      { "gamma": "" },
      { "delta": "" },
      { "epsilon": "" }
    ],
    "return_url": "https://merchant.example.com/status"
  }
}

MIT failure returns:

{
  "status": "failed",
  "code": "PAYMENT_FAILED",
  "message": "Transaction Failed",
  "data": {
    "action": "SALE",
    "status": "FAILED",
    "order_status": "FAILED",
    "m_order_id": "ORD-CAUTH-001",
    "p_order_id": "1000015109",
    "currency": "AED",
    "amount": "10.00",
    "m_payment_token": "B2JmcS85UDEwZXdTVElxc0swc1JNUT09"
  }
}

Common errors

Message / reasonCause
m_customer_id is required for CAUTH ordersMissing customer ID
Payment token not valid/not suppliedMissing or invalid card_details.payment_token
payment_token must be passed inside card_detailsToken sent at wrong level
recurring_mandate_missingToken has no mandate for Telr/Paymob/NI
cauth_mid_missingNo CAUTH MID for resolved PSP + currency

See also: Pay by Token (hosted) for tokenization prerequisites and field-level detail.

On this page