Tabby Integration
Overview
Tabby is a leading Buy Now Pay Later (BNPL) service provider in the Middle East, enabling customers to make purchases with installment payments. This guide covers the complete technical integration process for accepting Tabby payments through the Onerway payment gateway, from prerequisites to production deployment.
Technical Characteristics:
- Payment flow: Redirect-based
- Service regions: Saudi Arabia (SA) and United Arab Emirates (AE)
- Order currency: SAR (Saudi Riyal) or AED (UAE Dirham)
- Amount limit: SAR transactions range from 0.1 to 10000 SAR
- Settlement currency: USD (US Dollar)
- Transaction type: Real-time
- Integration method: REST API
Supported Features:
- One-time payments
- Physical goods transactions (logistics upload required for settlement)
- Virtual goods transactions (no logistics required)
Not Supported:
- Installment payments
- Subscription payments
Settlement Process Requirements
Tabby has special settlement requirements based on product type:
- Physical Goods Transactions: After successful payment, you must upload signed delivery information to trigger fund settlement
- Virtual Goods Transactions: No logistics information needed; settlement processes automatically after payment success
- Order Status Requirement: Physical goods orders must reach success status before uploading logistics information
- Upload Timing: For physical goods, must upload within 30 days after package delivery
For detailed logistics upload process, see Logistics Information Upload.
Technical Prerequisites
Ensure your system meets these requirements before starting integration:
Infrastructure Requirements
- HTTPS-enabled endpoints (TLS 1.2 or higher)
- Public-accessible webhook endpoint for receiving notifications
- Ability to generate and verify SHA256 signatures
- UTF-8 character encoding support
Integration Requirements
- Onerway merchant account with Tabby enabled
- API credentials (merchant number and secret key)
- Sandbox environment access for testing
- Support for HTTP redirects (302/303 status codes)
Optional Enhancements
- Arabic language support for improved user experience
- Mobile app deep linking support
- Right-to-left (RTL) UI layout
Technical Configuration
Step 1: API Credentials Setup
Obtain the following credentials from Onerway:
merchantNo: Your unique merchant identifiersecretKey: Used for request/response signature generation- API endpoint URLs (sandbox and production)
Step 2: Webhook Configuration
Configure your webhook endpoint to receive payment notifications:
- Endpoint URL: Must be publicly accessible via HTTPS
- Supported methods: POST
- Content-Type: application/json
- Response requirement: Return HTTP 200 with JSON body containing
transactionId
Example webhook configuration:
Webhook URL: https://your-domain.com/api/webhooks/onerway
Method: POST
Timeout: 30 seconds
Retry: 3 attempts (30-minute intervals)2
3
4
Step 3: Return URL Configuration
Set up URLs for customer redirects after payment:
returnUrl: Where customers are redirected after payment (success or failure)- Query parameters will include:
transactionId,status,merchantTxnId
Transaction Status Polling
After receiving the redirect to returnUrl, merchants can actively poll the transaction status by calling the Transaction Query API to verify the final payment status, rather than relying solely on the redirect parameters.
Integration Flow
The Tabby integration follows a redirect-based payment flow:
Payment Flow Diagram
Flow Steps Explained
Phase 1: Payment Initiation
- Customer selects Tabby as payment method
- Merchant sends payment request to Onerway API
- Onerway creates payment session with Tabby
- Onerway returns redirect URL
Phase 2: Customer Authentication
- Merchant redirects customer to Tabby payment page
- Customer enters payment information for authentication
- Customer confirms payment in Tabby
- Tabby redirects back to merchant
Phase 3: Payment Confirmation
- Tabby notifies Onerway of result
- Onerway sends webhook to merchant
- Merchant acknowledges webhook
- Merchant displays result to customer
Phase 4: Settlement Confirmation (Physical Goods)
- Merchant uploads logistics information after package delivery
- Onerway verifies logistics information validity
- Settlement process automatically triggered
Virtual Goods
Virtual goods transactions do not require Phase 4; settlement processes automatically after payment success.
Important
- Always rely on webhook notifications for final payment status
- The redirect back to your site may not accurately reflect the payment outcome
- Physical goods: Logistics information must be uploaded after successful payment to trigger settlement, see Logistics Information Upload
- Virtual goods: Settlement processes automatically after payment success, no additional action needed
Tabby Special Requirements
Tabby payment requires the following configuration and parameters:
lpmsInfo Configuration
Set the lpmsInfo parameter to identify Tabby:
"lpmsInfo": "{\"lpmsType\":\"tabby\"}"Required Parameters
The following parameters are required for Tabby payment:
merchantCustId
Unique customer identifier in merchant system.
txnOrderMsg
Must include the following fields:
customerPlatform - Merchant platform identifier
- Web: Domain name (e.g.,
merchant.example.com) - App: Application name (e.g.,
Merchant iOS App)
- Web: Domain name (e.g.,
products - Product information
- type: Product type (
physicalorvirtual), affects settlement process - productAvatarUrl: Product image URL
- type: Product type (
View Products for complete field definitions
billingInformation
Always required:
- firstName, lastName, email
Required for physical goods:
- phone
View TransactionAddress for complete field definitions
shippingInformation
Required for physical goods:
- firstName, lastName, phone
- country, city, address, postalCode
Virtual goods: Should match billingInformation
View TransactionAddress for complete field definitions
Different Scenarios
{
"merchantCustId": "customer_12345", // Required
"lpmsInfo": "{\"lpmsType\":\"tabby\"}", // Tabby identifier
"billingInformation": "{\"firstName\":\"Ahmad\",\"lastName\":\"Al-Salem\",\"phone\":\"966501234567\",\"email\":\"customer@example.com\"}", // firstName, lastName, email always required; phone required for physical goods
"shippingInformation": "{\"firstName\":\"Ahmad\",\"lastName\":\"Al-Salem\",\"phone\":\"966501234567\",\"country\":\"SA\",\"city\":\"Riyadh\",\"address\":\"King Fahd Road\",\"postalCode\":\"12345\"}", // Required for physical goods
"txnOrderMsg": "{\"customerPlatform\":\"merchant.example.com\",\"products\":\"[{\\\"type\\\":\\\"physical\\\",\\\"productAvatarUrl\\\":\\\"https://cdn.example.com/product.jpg\\\"}]\"}" // type=physical, productAvatarUrl required
}2
3
4
5
6
7
{
"merchantCustId": "customer_12345", // Required
"lpmsInfo": "{\"lpmsType\":\"tabby\"}", // Tabby identifier
"billingInformation": "{\"firstName\":\"Ahmad\",\"lastName\":\"Al-Salem\",\"email\":\"customer@example.com\"}", // firstName, lastName, email always required
"shippingInformation": "{\"firstName\":\"Ahmad\",\"lastName\":\"Al-Salem\"}", // Should match billingInformation
"txnOrderMsg": "{\"customerPlatform\":\"merchant.example.com\",\"products\":\"[{\\\"type\\\":\\\"virtual\\\",\\\"productAvatarUrl\\\":\\\"https://cdn.example.com/product.jpg\\\"}]\"}" // type=virtual, productAvatarUrl required
}2
3
4
5
6
7
Product Type Affects Settlement
- physical (Physical Goods): Logistics information must be uploaded after successful payment to trigger settlement
- virtual (Virtual Goods): Settlement processes automatically after payment success
View StoreProductTypeEnum for type enumeration values
API Request Parameters
Key Parameters
For Tabby integration, you must set:
productType:LPMSlpmsInfo: JSON string containinglpmsTypeset totabbyorderCurrency:SAR(Saudi Riyal) orAED(UAE Dirham)
Standard Request Parameters
For complete standard LPMS parameters, please refer to Local Payment Methods documentation.
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
billingInformation | String | / | Yes | Yes | Transaction billing information in JSON string format. See TransactionAddressfor complete structure. |
lpmsInfo | String | / | Conditional | Yes | Local payment method information in JSON string format. See LpmsInfofor complete structure. |
merchantNo | String | 20 | Yes | Yes | Merchant number assigned by |
merchantTxnId | String | 64 | Yes | Yes | Unique transaction identifier for each customer payment, generated by the merchant system. |
merchantTxnOriginalId | String | 128 | No | Yes | Master transaction ID generated by merchant for grouping related transactions. |
merchantTxnTime | String | / | No | Yes | Transaction timestamp when the merchant initiated the transaction. |
merchantTxnTimeZone | String | 64 | No | Yes | Transaction timezone offset for the merchant transaction time. |
mpiInfo | String | / | Conditional | Yes | 3DS verification result information in JSON string format. See MpiInfofor complete structure. |
orderAmount | String | 19 | Yes | Yes | Transaction amount in the specified currency, formatted as a decimal string. |
orderCurrency | String | 8 | Yes | Yes | |
osType | String | 16 | Conditional | Yes | Operating system type for mobile and app-based transactions. See OsTypeEnumfor available options. |
paymentMode | String | 16 | No | Yes | Payment mode indicating the platform or environment for the transaction. See PaymentModeEnumfor all available options. |
productType | String | 16 | Yes | Yes | Payment method category that determines which payment options are available to customers. See ProductTypeEnumfor all available options. |
risk3dsStrategy | String | 16 | Conditional | Yes | 3DS risk control strategy for fraud prevention. See Risk3dsStrategyEnumfor available options. |
shippingInformation | String | / | Yes | Yes | Transaction shipping information in JSON string format. See TransactionAddressfor complete structure. |
sign | String | / | Yes | No | Digital signature string for request verification and security. Please refer to Signature for signature generation method. |
subProductType | String | 16 | Yes | Yes | Specific implementation method within the selected product type, defining how the payment is processed. See SubProductTypeEnumfor all available options. |
subscription | String | / | Conditional | Yes | Subscription configuration in JSON format including frequency, billing cycle, and subscription type (managed / self-managed). |
txnOrderMsg | String | / | Yes | Yes | Transaction business information in JSON string format. See TxnOrderMsgfor complete structure. |
txnType | String | 16 | Yes | Yes | Transaction type that defines the payment operation to be performed. See TxnTypeEnumfor all available options and detailed usage scenarios. |
lpmsInfo Parameter Details
lpmsInfo is a JSON string for Tabby payment configuration:
| Parameter | Type | Required | Description |
|---|---|---|---|
| lpmsType | String | Yes | Fixed value tabby |
Response
The API returns a JSON response with standard Onerway response fields. For Tabby transactions, pay special attention to the status and actionType fields to determine the next action required.
| Name | Type | Description |
|---|---|---|
respCode | String | Response code from |
respMsg | String | Response message from |
data | Object | Response data. Refer to object data |
data
The data object in the response contains detailed transaction information:
| Name | Type | Description |
|---|---|---|
transactionId | String | Transaction ID created by |
responseTime | String | Response timestamp Format: |
txnTime | String | Transaction initiation time Format: |
txnTimeZone | String | Transaction timezone Format: |
orderAmount | String | Order amount |
orderCurrency | String | |
txnAmount | String | Settlement amount |
txnCurrency | String | |
status | String | Transaction status Refer to TxnStatusEnum |
redirectUrl | String | Payment redirect URL |
contractId | String | Subscription contract ID |
tokenId | String | Payment token |
eci | String | Electronic Commerce Indicator |
periodValue | String | Installment periods |
codeForm | String | Code form See CodeFormEnum |
presentContext | String | Presentation context |
actionType | String | Required action See ActionTypeEnum |
subscriptionManageUrl | String | Subscription management URL |
sign | String |
Response Handling
Tabby transactions typically return status=R with actionType=RedirectURL. You must redirect the customer to complete payment on the Tabby payment page.
API Usage Examples
Standard Payment Request
{
"merchantNo": "800209", // Merchant number from Onerway
"merchantCustId": "1763964617000", // Unique customer identifier
"merchantTxnId": "1763964617000", // Unique transaction ID
"merchantTxnTime": "2025-11-24 14:10:17", // Transaction time
"orderAmount": "250.00", // Order amount
"orderCurrency": "SAR", // Saudi Riyal or UAE Dirham
"productType": "LPMS", // Local payment method
"subProductType": "DIRECT",
"lpmsInfo": "{\"lpmsType\":\"tabby\"}", // Tabby configuration
"billingInformation": "{\"firstName\":\"xxx\",\"lastName\":\"xxx\",\"phone\":\"966501234567\",\"email\":\"abel.wang@onerway.com\",\"postalCode\":\"35802\",\"address\":\"test\",\"country\":\"SA\",\"province\":\"AS\",\"city\":\"city\",\"street\":\"Amsterdam Ave\",\"number\":10}", // Complete billing information
"shippingInformation": "{\"firstName\":\"xxx\",\"lastName\":\"xxx\",\"phone\":\"966501234567\",\"email\":\"abel.wang@onerway.com\",\"postalCode\":\"35802\",\"address\":\"test\",\"country\":\"SA\",\"province\":\"AS\",\"city\":\"city\",\"street\":\"Amsterdam Ave\",\"number\":10}", // Complete shipping information (required for physical goods)
"txnOrderMsg": "{\"returnUrl\":\"https://merchant.com/return\",\"notifyUrl\":\"https://www.merchant-store-website.com/\",\"appId\":\"1727880846378401792\",\"customerPlatform\":\"merchant.example.com\",\"products\":\"[{\\\"name\\\":\\\"iPhone 15\\\",\\\"price\\\":\\\"250.00\\\",\\\"num\\\":\\\"1\\\",\\\"currency\\\":\\\"SAR\\\",\\\"type\\\":\\\"physical\\\",\\\"productAvatarUrl\\\":\\\"https://cdn.merchant.com/iphone15.jpg\\\"}]\"}", // Tabby required fields
"txnType": "SALE",
"sign": "179d299253e855720478929e3fec06ae0c1498b2d490364df03112724b0fb64f" // Request signature
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"respCode": "20000", // Success code
"respMsg": "Success",
"data": {
"transactionId": "1992838164129386496", // Onerway transaction ID
"responseTime": "2025-11-24 14:10:18",
"txnTime": "2025-11-24 14:10:18",
"txnTimeZone": "+08:00",
"orderAmount": "250.00",
"orderCurrency": "SAR",
"txnAmount": null,
"txnCurrency": null,
"status": "R", // Redirect required
"redirectUrl": "https://cashier-dev.gccpay.cn/en-US/order/ORD251124091018581291044", // Tabby payment page URL
"contractId": null,
"tokenId": null,
"eci": null,
"periodValue": null,
"codeForm": null,
"presentContext": null,
"actionType": "RedirectURL", // Action type: Redirect
"subscriptionManageUrl": null,
"sign": "6bfb11551a2de1d659c8f1ee217db8081c8fc5b6d5ee118ced64fa40edff2e24"
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"notifyType": "TXN",
"transactionId": "1992838164129386496", // Onerway transaction ID
"txnType": "SALE",
"merchantNo": "800209",
"merchantTxnId": "1763964617000",
"responseTime": "2025-11-24 14:11:58",
"txnTime": "2025-11-24 14:10:18",
"txnTimeZone": "+08:00",
"orderAmount": "250.00",
"orderCurrency": "SAR",
"status": "S", // Success status
"reason": "{\"respCode\":\"20000\",\"respMsg\":\"Success\"}",
"sign": "f16f83d18b72fd1c067f49027de0b62ed70a16f636c9dc1e659b4d13a7bda71a", // Verify signature
"paymentMethod": "tabby", // Payment method
"walletTypeName": "tabby", // Wallet type name
"channelRequestId": "8002091992838165840396289"
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Technical Integration Checklist
Before deploying to production:
API Integration
- Payment request API implemented and tested
- Request signature generation working correctly
- Error response handling implemented
- Redirect flow implemented (handle
status=R)
Tabby Special Requirements
- Product information includes
typefield (physical or virtual) - Product information includes
productAvatarUrlfield (HTTPS image URL) - txnOrderMsg includes
customerPlatformfield (domain for web, app name for app) - Physical goods: Logistics information upload API implemented
- Physical goods: Package delivery status verification implemented
- Physical goods: Order final status checking implemented
- Physical goods: Logistics upload timing control implemented (within 30 days)
Webhook Implementation
- Webhook endpoint publicly accessible via HTTPS
- Webhook signature verification implemented
- Idempotent webhook processing implemented
- Webhook acknowledgment returns HTTP 200 with
transactionId - Asynchronous processing for webhook payload
Security
- TLS 1.2 or higher enabled
- API credentials stored securely
- Signature verification tested
- No sensitive data logged in plain text
Testing Validation
- Successful payment scenario tested
- Failed payment scenario tested
- Timeout scenario tested
- Webhook delivery tested
- Duplicate transaction prevention tested
- Redirect flow tested on mobile devices
Monitoring & Operations
- API request/response logging implemented
- Error monitoring and alerting configured
- Transaction status tracking implemented
- Webhook retry mechanism implemented
Technical Support
For technical integration assistance, contact Onerway technical support with your merchantNo and specific technical questions.