PayOrc
S2S (Seamless API)

Apple Pay

Accept Apple Pay on S2S with type APPLE_PAY — pass the device wallet token in data.token, no card_details required.

Apple Pay

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. IP whitelist applies.

Apple Pay lets customers pay with cards stored in their Apple Wallet. On S2S, your mobile app or website collects the Apple Pay token on the client; your server sends that token to PayOrc with type: "APPLE_PAY" — you never handle raw card number or CVV.

When to use

  • Native iOS checkout with Apple Pay button
  • Web checkout using Apple Pay on the Web (Safari / supported browsers)
  • You want wallet payments without PCI scope for card data on your server

How it works

  1. Customer authorizes payment in Apple Pay on the device.
  2. Your client receives the Apple Pay payment object.
  3. Your server calls POST /s2s/v1/payment with class: "ECOM", type: "APPLE_PAY", and the token in data.token (plus standard order fields).
  4. PayOrc routes to Telr or Paymob (based on MID / routing).
  5. Payment completes synchronously — no customer redirect. Result is returned in the API response and via webhook if urls.webhook_url is set.

Use data.token for the Apple Pay object. Do not use card_details or top-level payment_token.

Supported PSPs

PSPS2S support
TelrYes
PaymobYes

PSP is selected from merchant routing / MID configuration for the order currency.

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.actionStringYesSALE or AUTH
data.classStringYesMust be ECOM
data.capture_methodStringYes when AUTHAUTOMATIC or MANUAL
data.typeStringYesMust be APPLE_PAY
data.tokenObjectYesApple Pay token from the device — see Token object
data.customer_detailsObjectYesSame as S2S Payment
data.order_detailsObjectYesm_order_id, amount, currency, return_url, etc.
data.itemsArrayYesLine items
data.billing_detailsObjectYesBilling address
data.shipping_detailsObjectYesShipping address
data.urlsObjectNoRedirect and webhook URLs — see S2S Payment URLs

Do not send card_details with APPLE_PAY. Only data.token is used for the wallet payload.

Token object

data.token must match the Apple Pay payment object:

FieldRequiredDescription
paymentData.dataYesEncrypted payment data
paymentData.signatureYesApple Pay signature
paymentData.header.publicKeyHashYesPublic key hash
paymentData.header.ephemeralPublicKeyYesEphemeral public key
paymentData.header.transactionIdYesTransaction ID in header
paymentData.versionYesToken version
paymentMethod.displayNameYesCard display name
paymentMethod.networkYesCard network (e.g. Visa)
paymentMethod.typeYescredit or debit
transactionIdentifierYesApple transaction identifier

Example request

{
  "data": {
    "action": "SALE",
    "class": "ECOM",
    "capture_method": "AUTOMATIC",
    "type": "APPLE_PAY",
    "customer_details": {
      "m_customer_id": "1234",
      "name": "John Doe",
      "email": "[email protected]",
      "mobile": "9876543210",
      "code": "971"
    },
    "order_details": {
      "m_order_id": "ORD-APPLE-001",
      "amount": "100",
      "currency": "AED",
      "convenience_fee": "0",
      "description": "Apple Pay order",
      "return_url": "https://merchant.example.com/return"
    },
    "items": [
      {
        "title": "Product",
        "quantity": 1,
        "unit_price": "100.00",
        "discount_amount": "0.00",
        "is_refundable": true
      }
    ],
    "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"
    },
    "token": {
      "paymentData": {
        "data": "BASE64_ENCRYPTED_DATA",
        "signature": "BASE64_SIGNATURE",
        "header": {
          "publicKeyHash": "HASH",
          "ephemeralPublicKey": "BASE64_KEY",
          "transactionId": "TXN_ID"
        },
        "version": "EC_v1"
      },
      "paymentMethod": {
        "displayName": "Visa 1234",
        "network": "Visa",
        "type": "credit"
      },
      "transactionIdentifier": "APPLE_TXN_ID"
    },
    "urls": {
      "success": "",
      "cancel": "",
      "failure": "",
      "webhook_url": "https://merchant.example.com/webhook"
    }
  }
}

Success response

Apple Pay completes synchronously (no customer redirect). The API returns the standard S2S envelope with a webhook-shaped data object (same fields as Webhook notifications).

For action: "SALE" on success, order_status is typically CAPTURED and data.action is CAPTURE. For action: "AUTH", expect order_status: "AUTHORISED" and data.action: "AUTH".

{
  "status": "success",
  "code": "00",
  "message": "Payment completed successfully.",
  "data": {
    "action": "CAPTURE",
    "status": "SUCCESS",
    "status_code": "00",
    "order_status": "CAPTURED",
    "m_order_id": "ORD-APPLE-001",
    "p_order_id": "1000015109",
    "p_request_id": "1000015200",
    "psp_ref_id": "8902217",
    "transaction_id": "1000021941",
    "is_live": false,
    "currency": "AED",
    "amount": "100.00",
    "payment_method": "APPLE_PAY",
    "apm_name": "APPLE_PAY",
    "apm_identifier": "apple_pay",
    "customer_details": {
      "name": "John Doe",
      "email": "[email protected]",
      "code": "971",
      "mobile": "9876543210",
      "m_customer_id": "1234"
    },
    "payment_method_data": {
      "scheme": "VISA",
      "mask_card_number": "Visa 1234"
    }
  }
}

data also includes billing_address, shipping_address, channel, remark, parameters, custom_data, and other fields documented in Webhook notifications. Omitted here for brevity.

Response fields (key)

FieldDescription
statusAPI envelope: success or failed
codeResponse code (e.g. 00 on success)
messageHuman-readable message
data.statusTransaction execution status: SUCCESS or FAILED
data.order_statusOrder state: CAPTURED, AUTHORISED, or FAILED
data.actionEvent action: CAPTURE, AUTH, etc.
data.transaction_idPayOrc transaction ID (string) — use for capture/void/refund
data.apm_nameAPPLE_PAY
data.redirect_urlNot returned for Apple Pay (no redirect flow)

Common errors

MessageCause
token is missing or not a valid object for APPLE_PAYMissing or invalid data.token
card_details is not required for APPLE_PAYSent card_details with wallet type
webhook_url must be passed inside urlswebhook_url sent under order_details

On this page