S2S (Seamless API)
Tabby
Process Buy Now, Pay Later payments via Tabby integration.
Tabby
Version: 3.0.0
Enable Tabby Payments on your checkout. Navigate to Developers → API Keys → Add new API key → Select S2S in the Channel Dropdown.
Tabby is a Buy Now, Pay Later (BNPL) payment method. Customers can split their purchase into installments. The API returns a redirection URL that the customer follows to complete the Tabby checkout flow.
Endpoint
| Method | URL |
|---|---|
| POST | https://api.payorc.com/s2s/v1/payment |
Please use the test credentials for sandbox testing.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
merchant-key | String | Yes | Your merchant API key |
merchant-secret | String | Yes | Your merchant API secret |
Content-Type | String | Yes | Must be application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
data.action | String | Yes | Transaction action: AUTH |
data.class | String | Yes | Must be ECOM |
data.capture_method | String | Yes | AUTOMATIC |
data.payment_token | String | No | Leave empty for Tabby |
data.type | String | Yes | Must be TABBY |
data.customer_details.m_customer_id | String | No | Your internal customer ID |
data.customer_details.name | String | Yes | Customer full name |
data.customer_details.email | String | Yes | Customer email address |
data.customer_details.mobile | String | Yes | Customer mobile number |
data.customer_details.code | String | Yes | Country dial code (e.g., 966 for Saudi Arabia, 971 for UAE) |
data.order_details.m_order_id | String | Yes | Your unique order ID |
data.order_details.amount | String | Yes | Transaction amount |
data.order_details.currency | String | Yes | ISO 4217 currency code (AED or SAR) |
data.order_details.return_url | String | Yes | URL to redirect after payment |
data.items | Array | Yes | Array of order items (required for Tabby) |
data.billing_details | Object | Yes | Billing address details |
data.shipping_details | Object | No | Shipping address details |
data.urls | Object | No | Redirect and webhook URLs — see S2S Payment URLs |
Tabby requires the items array to include product details such as title, quantity, and unit_price. This information is used by Tabby for installment calculations.
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": "TABBY",
"customer_details": {
"m_customer_id": "1234",
"name": "John Doe",
"email": "[email protected]",
"mobile": "594393608",
"code": "966"
},
"order_details": {
"m_order_id": "123456",
"amount": "200",
"currency": "AED",
"convenience_fee": "0",
"description": "Tabby BNPL payment",
"return_url": "http://localhost/status"
},
"items": [
{
"title": "Product Name",
"description": "Product description",
"quantity": 1,
"unit_price": "200.00",
"discount_amount": "0.00",
"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": "" }
],
"urls": {
"success": "",
"cancel": "",
"failure": "",
"webhook_url": "https://merchant.example.com/webhook"
}
}
}'Success Response
{
"data": {
"order_status": "SUCCESS",
"order_id": 1000011320,
"amount": "200.00",
"currency": "AED",
"return_url": "http://localhost/status",
"redirection_url": "https://nodeserver.payorc.com/api/v1/tabby/redirection/1000011320/test"
},
"message": "Tabby redirection link created successfully",
"status": "success",
"code": "00"
}Error Response
{
"data": {
"order_status": "FAILED",
"order_id": 1000011321,
"amount": "200.00",
"currency": "AED",
"return_url": "http://localhost/status",
"message": "Sorry, Tabby is unable to approve this purchase, please use an alternative payment method."
},
"status": "fail",
"code": "E0021"
}Response Fields
| Field | Type | Description |
|---|---|---|
data.order_status | String | Order status: SUCCESS or FAILED |
data.order_id | Number | PayOrc order ID |
data.amount | String | Transaction amount |
data.currency | String | Currency code |
data.return_url | String | Return URL provided in request |
data.redirection_url | String | URL to redirect customer to Tabby checkout |
status | String | Overall status: success or fail |
code | String | Response code |
message | String | Response message |