PayOrc
S2S (Seamless API)

S2S Payment

Server-to-Server (S2S) payment processing using the standard Payment method with card details.

S2S Payment

Version: 3.0.0

Generate API Key for S2S channel. Navigate to Developers → API Keys → Add new API key → Select S2S in the Channel Dropdown.

The S2S Payment endpoint allows merchants to process card payments directly from their server to PayOrc's API. This is the standard card payment integration for server-to-server scenarios (type: "CARD").

For wallet payments, use type: "APPLE_PAY" or type: "GOOGLE_PAY" with the wallet token in data.token instead of card_details — see Apple Pay and Google Pay. Wallet flows do not require raw card data on your server.

S2S (Server-to-Server) integration requires PCI DSS compliance. You must be certified to handle raw card data directly. If you are not PCI DSS certified, consider using the PayOrc SDKs or hosted payment pages instead.

Endpoint

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

Please use the test credentials for sandbox testing.

Headers

HeaderTypeRequiredDescription
merchant-keyStringYesYour merchant API key
merchant-secretStringYesYour merchant API secret
Content-TypeStringYesMust be application/json

Request Body

FieldTypeRequiredDescription
data.actionStringYesTransaction action: AUTH (auth only), SALE (auth + capture)
data.classStringYesPayment class: ECOM for e-commerce
data.capture_methodStringYesAUTOMATIC or MANUAL
data.payment_tokenStringNoPayment token (leave empty for new card)
data.typeStringYesPayment type: CARD, APPLE_PAY, GOOGLE_PAY, etc.
data.customer_details.m_customer_idStringNoYour internal customer ID
data.customer_details.nameStringYesCustomer full name
data.customer_details.emailStringYesCustomer email address
data.customer_details.mobileStringYesCustomer mobile number
data.customer_details.codeStringYesCountry dial code (e.g., 91 for India)
data.order_details.m_order_idStringYesYour unique order ID
data.order_details.amountStringYesTransaction amount
data.order_details.currencyStringYesISO 4217 currency code
data.order_details.convenience_feeStringNoConvenience fee amount
data.order_details.descriptionStringNoOrder description
data.order_details.return_urlStringYesURL to redirect after 3DS (HTTPS)
data.urlsObjectNoRedirect and webhook URLs — see URLs
data.itemsArrayYesArray of order items
data.billing_detailsObjectYesBilling address details
data.card_details.card_holder_nameStringYesName on card
data.card_details.card_numberStringYesCard number
data.card_details.cvvStringYesCard CVV
data.card_details.expiryStringYesCard expiry (MM/YYYY)
data.card_details.tokenizeStringNo1 to save token, 0 not to
data.shipping_detailsObjectNoShipping address details
data.parametersArrayNoCustom parameters
data.custom_dataArrayNoCustom data key-value pairs

URLs

Optional per-order redirect and webhook overrides. Empty strings fall back to MID defaults where applicable.

FieldTypeRequiredDescription
data.urls.successStringNoSuccess redirect URL
data.urls.cancelStringNoCancel redirect URL
data.urls.failureStringNoFailure redirect URL
data.urls.webhook_urlStringNoPer-order webhook URL (HTTPS). Overrides dashboard webhook when set

Code Examples

curl --location --globoff 'https://api.payorc.com/s2s/v1/payment' \
--header 'merchant-key: YOUR_MERCHANT_KEY' \
--header 'merchant-secret: YOUR_MERCHANT_SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
  "data": {
    "action": "AUTH",
    "class": "ECOM",
    "capture_method": "AUTOMATIC",
    "payment_token": "",
    "type": "CARD",
    "customer_details": {
      "m_customer_id": "1234",
      "name": "John Doe",
      "email": "[email protected]",
      "mobile": "9876543210",
      "code": "91"
    },
    "order_details": {
      "m_order_id": "123456",
      "amount": "100",
      "currency": "AED",
      "convenience_fee": "0",
      "description": "Order description",
      "return_url": "http://localhost/status"
    },
    "items": [
      {
        "title": "Product Name",
        "description": "Product description",
        "quantity": 1,
        "unit_price": "100.00",
        "discount_amount": "0.00",
        "reference_id": "REF001",
        "is_refundable": true
      }
    ],
    "billing_details": {
      "address_line1": "Po Box 12322",
      "address_line2": "Jebel Ali Free Zone",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044"
    },
    "shipping_details": {
      "shipping_name": "John Doe",
      "shipping_email": "[email protected]",
      "shipping_code": "",
      "shipping_mobile": "",
      "address_line1": "Po Box 12322",
      "address_line2": "Jebel Ali Free Zone",
      "city": "Dubai",
      "province": "Dubai",
      "country": "AE",
      "pin": "54044",
      "location_pin": "",
      "shipping_currency": "AED",
      "shipping_amount": "0"
    },
    "parameters": [
      { "alpha": "" },
      { "beta": "" },
      { "gamma": "" },
      { "delta": "" },
      { "epsilon": "" }
    ],
    "custom_data": [
      { "alpha": "" },
      { "beta": "" },
      { "gamma": "" },
      { "delta": "" },
      { "epsilon": "" }
    ],

    "card_details": {
      "card_holder_name": "John Doe",
      "card_number": "4111111111111111",
      "cvv": "123",
      "expiry": "04/2026",
      "tokenize": "0"
    },
    "urls": {
      "success": "",
      "cancel": "",
      "failure": "",
      "webhook_url": "https://merchant.example.com/webhook"
    }
  }
}'

Success Response

Card and MOTO initiate responses use the S2S envelope { status, code, message, data }. On 3DS, data is webhook-shaped (same fields as Webhook notifications) plus redirect_url for the PayOrc checkout page.

{
    "status": "success",
    "code": "00",
    "message": "Redirection URL generated successfully",
    "data": {
        "action": "AWAIT_3DS",
        "status": "SUCCESS",
        "status_code": "",
        "order_status": "AWAIT_3DS",
        "m_order_id": "123456",
        "p_order_id": "1000011841",
        "p_request_id": "1000012174",
        "psp_ref_id": "",
        "transaction_id": "1000012174",
        "is_live": false,
        "terminal_label": "",
        "remark": "",
        "reason": "",
        "currency": "AED",
        "amount": "100.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": "Jebel Ali Free Zone",
            "city": "Dubai",
            "state": "Dubai",
            "country": "AE",
            "pincode": "54044"
        },
        "shipping_address": {
            "address_line_1": "Po Box 12322",
            "address_line_2": "Jebel Ali Free Zone",
            "city": "Dubai",
            "state": "Dubai",
            "country": "AE",
            "pincode": "54044"
        },
        "ip_country": "",
        "psp": "PAYMOB",
        "payment_method": "CARD",
        "m_payment_token": "",
        "transaction_time": "03-08-2026 09:44:40",
        "payment_method_data": {
            "scheme": "",
            "card_country": "",
            "card_type": "",
            "mask_card_number": ""
        },
        "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",
        "redirect_url": "https://checkout.payorc.com/s2s/payment/{checkout_token}"
    }
}

Redirect the customer to data.redirect_url to complete 3DS. Final payment status is delivered via webhook. After completion, data matches the full webhook payload (action, order_status, m_payment_token, payment_method_data, etc.).

Error Response

Validation errors (HTTP 4xx) use:

{
  "message": "Type not valid/not supplied",
  "status": "fail",
  "code": "E0021"
}

Payment initiation failures return the webhook envelope with status: "failed":

{
  "status": "failed",
  "code": "PAYMENT_FAILED",
  "message": "Redirection URL generation failed",
  "data": {
    "action": "FAILED",
    "status": "FAILED",
    "order_status": "FAILED",
    "m_order_id": "123456",
    "p_order_id": "1000011841",
    "currency": "AED",
    "amount": "100.00",
    "redirect_url": ""
  }
}

Response Fields

FieldTypeDescription
statusStringAPI envelope: success or failed (validation errors use fail)
codeString00 on success; E0021 validation; PAYMENT_FAILED on payment failure
messageStringHuman-readable message
dataObjectWebhook-shaped payload — see Webhook notifications
data.actionStringe.g. AWAIT_3DS, AUTH, CAPTURE, FAILED
data.statusStringSUCCESS or FAILED (inside data)
data.order_statusStringe.g. AWAIT_3DS, AUTHORISED, CAPTURED, FAILED
data.m_order_idStringYour merchant order ID
data.p_order_idStringPayOrc order ID
data.p_request_idStringPayOrc request ID
data.transaction_idStringPayOrc transaction ID
data.amountStringAmount (e.g. "100.00")
data.currencyStringISO currency code
data.return_urlStringReturn URL from the request
data.redirect_urlStringPayOrc checkout URL for 3DS (present on initiate success)
data.m_payment_tokenStringPresent after successful auth/capture when tokenized
data.payment_method_dataObjectCard metadata (scheme, card_country, card_type, mask_card_number)
data.parameters / data.custom_dataArrayEchoed from request (array of alphaepsilon objects)

On this page