Step 2: Initiating a Split Payout Request
The Split Payout feature empowers merchants to allocate funds from a single transaction to multiple beneficiaries. This is ideal for businesses operating in marketplaces, commission-based services, or platforms managing multiple parties. In this guide, we will walk you through the key steps to successfully initiate split payouts using PayTabs APIs.
For a better understanding of the requirements and the whole split payout cycle, we highly recommend you to check our Workflow, Prerequisites & Configurations manuals
The Endpoint and Related Postman Collectionβ
POST | {{domain}}/payment/request |
---|
Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.
- KSA
- UAE
- Egypt
- Oman
- Jordan
- Kuwait
- Global
https://secure.paytabs.sa/payment/request
https://secure.paytabs.com/payment/request
https://secure-egypt.paytabs.com/payment/request
https://secure-oman.paytabs.com/payment/request
https://secure-jordan.paytabs.com/payment/request
https://secure-kuwait.paytabs.com/payment/request
https://secure-global.paytabs.com/payment/request
Request Parametersβ
To initiate a payment request using this integration type, there are minimum required parameters that need to be passed with valid information. The specification of these required parameters is clarified below:
- The Minimum Required Parameters
- The Available Optional Parameters
Parameter |
| |||
---|---|---|---|---|
Description | The merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT2 Dashboard? solution article. To know more about this parameter please click here. | |||
Data Type | INT | |||
Required | β | |||
Validation Rules | Accept only valid profile number. | |||
Sample |
| |||
Parameter |
| |||
Description | The identification of the type of the transaction. To know more about these types please check our What is the "tran_type" (transaction type)? solution article. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Validation Rules | Valid string from this enum list: sale auth void release capture refund register | |||
Sample |
| |||
Parameter |
| |||
Description | The identification of the category/class this transaction will follow, such as eCommerce, Recurring, etc. To know more about these types please check our What is the "tran_class" (transaction class)? solution article. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Validation Rules | Valid string from this list ecom recurring moto | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the cart/order id at the merchant end, to easily relate the PayTabs transaction to. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Min | 1 | |||
Max | 64 | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the cart/order description at the merchant end, to easily relate the PayTabs transaction to. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Min | 1 | |||
Max | 128 | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the transaction currency, which the customer will be charged with. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Min | 1 | |||
Max | 128 | |||
Validation Rules | Valid string from the following list: SAR AED BHD EGP EUR GBP HKD IDR INR IQD JOD JPY KWD MAD OMR PKR QAR USD Accepts both upper/lower case characters | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the amount of the transaction the customer is about to be charged. Both min and max values are subjected to the merchant transaction limits. To know more about this parameter please click here. | |||
Data Type | DECIMAL | |||
Required | β | |||
Min | 0.01 | |||
Max | 9999999999.99 | |||
Sample |
|
| OBJECT | - | ||
The Split Object which contains, the stakeholders of current transaction. If it is defined at least two entities should be provided. | ||||
| ||||
| INT | β | ||
Unique Entity Id, defined by the merchant | ||||
| ||||
| STRING | β | ||
Entity name | ||||
| ||||
| STRING | β | ||
A brief description for the item. | ||||
| ||||
| STRING | β | ||
The amount that should be paid for related entity. | ||||
| ||||
| STRING | one of the following values:F = Full MSC is applied to this itemP = Proportional MSC is applied to this itemZ = Zero MSCR = Remainder of MSC | β | |
| ||||
| ||||
| OBJECT | β | ||
Beneficiary details. | ||||
| ||||
| DECIMAL | β | ||
Beneficiary Name as defined in the bank. | ||||
| ||||
| INT | β | ||
Beneficiary account (IBAN, VIBAN) . | ||||
| ||||
| STRING | Only valid country code is accepted. | β | |
Beneficiary Bankβs country. | ||||
| ||||
| STRING | β | ||
The name of Beneficiary bank. | ||||
| ||||
| STRING | β | ||
The bank branch. | ||||
| ||||
| STRING | β | ||
Beneficiary Phone number. | ||||
| ||||
| STRING | β | ||
Beneficiary email. | ||||
| ||||
| STRING | β | ||
Beneficiary address. | ||||
| ||||
| DECIMAL | β | ||
Beneficiary additional address. | ||||
|
Parameter |
| |||
---|---|---|---|---|
Description | The return URL is the URL that PayTabs will redirect the customer to after he finishes the payment process (whether it's authenticated or not). It will redirect the customer with a POST response that is sent with the client/cardholder redirection through his browser containing the basic transaction information once the payment process ends (whether the customer cancels, paid, or failed to pay). It depends on the customer's actions, which means if the customer closes the browser right after the payment without waiting to be redirected back to your system, you will not receive this response. What is the Return URL vs the Callback URL? To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Min | N/A | |||
Max | 255 Characters (Valid URL) | |||
Validation Rules |
| |||
Sample |
| |||
Parameter |
| |||
Description | The callback response is a server-to-server POST response that is sent (to a pre-defined HTTPS URL) with the full detailed transaction information once the payment process has ended (whether the customer cancels, paid, or failed to pay). It does not depend on the customer's actions; the response will be sent anyway. What is the Return URL vs the Callback URL? To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Min | N/A | |||
Max | 255 Characters (Valid URL) | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates whether to hide shipping and billing information or not from the payment page. Note: The customer details are still required and must be passed in case any of the details are missing or passed with invalid values; the hide_shipping option will be ignored, and the cardholder will be required to enter any of the missing details on the payment page. To know more about this parameter please click here. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the customer details for this payment. If provided, the payment page will be prefilled with the provided data. To know more about this parameter please click here. | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | 3 | 128 | β |
| STRING | 3 | 128 | β |
| STRING | 2 | 2 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
Parameter |
| |||
Description | Indicates the customer shipping details for this payment. If provided, the payment page will be prefilled with the provided data.. | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | 3 | 128 | β |
| STRING | 3 | 128 | β |
| STRING | 2 | 2 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
Parameter |
| |||
Description | Indicates whether to preview the payment page within the current check page instead of redirection or not. If β, preview the redirect URL sent in the response in '<iframe>' HTML tag, which will preview the whole payment page within this frame. To know more about this parameter please click here. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates whether to reload the whole page on redirections or just reload the current frame. To know more about this parameter please click here. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates whether to reload the main base (could be div or another iFrame tag) that contained the payment page framed element. To know more about this parameter please click here. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | If you didn't have a return URL, PayTabs default return page (return: 'None'), to receive the message after the payment is done using the javascript, which gives your system the ability to close the iFrame after payment | |||
Data Type | URI | |||
Required | β | |||
Validation Rules | A valid HTTPS website URL of your domain (the recipient) that will receive the event. In order for the event to be dispatched, this domain must match exactly (including scheme, hostname, and port). | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the payment page displaying language. To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Validation Rules | Either en or ar | |||
Sample |
| |||
Parameter |
| |||
Description | Allows you to choose between your list of themes that have been created on your PayTabs dashboard. This chosen theme will be applied to the created payment page. | |||
Data Type | INT | |||
Required | β | |||
Validation Rules | Valid Theme ID (from PayTabs dashboard) | |||
Sample |
| |||
Parameter |
| |||
Description | For more customizations, you can pass to the Transaction API request your own "user-defined fields" up to 9 fields, and accordingly, you would receive those fields in the callback response. To know more about this parameter please click here. | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
| STRING | 1 | 255 | β |
Parameter |
| |||
Description | To provide discounts for specific customers. To know more about this parameter please click here. | |||
Data Type | Array | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
Provide a comma-separated list of card prefixes (usually first 6, can be up to first 11) To know more about this parameter please $1. | ||||
| STRING | N/A | N/A | β |
Description of the discount that will be displayed for the customer on the hosted payment page. To know more about this parameter please $1. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
The actual discount should be deducted from the cart_amount . To know more about this parameter please $1. | ||||
| DECIMAL | 0.01 | 100 | β |
The discount percentage that will be displayed for the customer on the hosted payment page. To know more about this parameter please $1. | ||||
Parameter |
| |||
Description | card_filter is one of the optional parameters that the request may have, which will allow you to accept only cards that start with a specific number/identifier/BIN code you want. | |||
Data Type | STRING | |||
Required | β | |||
Min | N/A | |||
Max | 255 character | |||
Validation Rules |
| |||
Sample |
| |||
Parameter |
| |||
Description | The tokenization format the generated token should follow. Hosted Payment Page APIs | Token Based Transactions . To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Validation Rules | Pass one of the following list:
| |||
Sample |
| |||
Parameter |
| |||
Description | For showing the βsave this cardβ option on the payment page. To know more about this parameter please click here. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | This parameter is required only if donation_mode property is present to represent the minimum amount that the customer can enter | |||
Data Type | DECIMAL | |||
Required | β | |||
Min | 0.01 | |||
Max | 9999999999.99 | |||
Sample |
| |||
Parameter |
| |||
Description | This parameter is required only if donation_mode property is present to represent the maximum amount that the customer can enter. | |||
Data Type | DECIMAL | |||
Required | β | |||
Min | 0.01 | |||
Max | 9999999999.99 | |||
Sample |
| |||
Parameter |
| |||
Description | This parameter will define whether this payment has a predefined amount or the customer will be entering the amount based on the passed cart_min and cart_max. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates an alternative currency that you want to display your amount with it in your payment page. This will allow you to display the approximate amount of the payment cart amount in this alternative currency for this transaction.. | |||
Data Type | STRING | |||
Required | β | |||
Min | 3 Characters | |||
Max | 3 Characters | |||
Validation Rules |
| |||
Sample |
| |||
Parameter |
| |||
Description | To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Validation Rules | Pass one or more of the following list: click here | |||
Sample |
| |||
Parameter |
| |||
Description | To know more about this parameter please click here. | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the Transaction Reference on the PayTabs side check details on [Response Parameters | tran_ref] | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | This is the main object that holds other parameters related to invoice creation. Including this in your request is considered the main flag to be treated as an Invoice creation request, not a normal hosted payment page request. | |||
Data Type | OBJECT | |||
Required | β | |||
Validation Rules | At least line_items must be included. | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
This is parameter will define the invoice page languages. | ||||
| ||||
| BOOLEAN | N/A | N/A | β |
This parameter will disable editing the invoice through the merchant dashboard. | ||||
| ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
Indicates the shipping charges that the merchant would add to the total invoice amount if he or she has shippable items. | ||||
| ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
Indicates any extra charges that the merchant would add to the total invoice amount. | ||||
| ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
Indicates an extra discount that the merchant would exclude from the total invoice amount. | ||||
| ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
Indicates the total amount of the invoice which equals the total price of line_items plus shipping_charges + extra_charges minus extra_discount . Notes that if left as 0 or null it will be auto-calculated. | ||||
| ||||
| DATE | N/A | N/A | β |
Indicates the invoice activation date, which will make the invoice unavailable before this date. | ||||
| ||||
| DATE | N/A | N/A | β |
Indicates the invoice expiry date which will make the invoice unavailable after this date. | ||||
| ||||
| DATE | N/A | N/A | β |
Indicates the invoice due date which will make the invoice unavailable before this date. | ||||
| ||||
| OBJECT | N/A | N/A | β |
This is an array of the invoice objects/items that your customer purchased. Each item will be an object that holds its specific details. | ||||
| ||||
Nested Parameter | Data Type | Min | Max | Required |
| DECIMAL | 0.01 | 9999999999.99 | β |
Indicates this invoice item cost. It must be in the same currency passed already in the Initial Request Parameters. | ||||
| INT | 1 | 9999999999 | β |
Indicates the purchased quantity of this invoice item. | ||||
| STRING | N/A | N/A | β |
Indicates the SKU of a certain item to be included with item details. | ||||
| STRING | N/A | N/A | β |
Indicates the item description to be included with the item details. | ||||
| STRING | N/A | N/A | β |
Indicates the item URL to be included with the item details. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the net price of the current item without applying tax or discount. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the discount rate for the current item. The rate is a percentage value that will be multiplied by the net price of the item and will be included in the total price of the item. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the discount amount for the current item. This amount will be excluded. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the tax rate for the current item to be included in the total price of the item. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the tax total for the current item to be included in the total price of the item. | ||||
| DECIMAL | 0.01 | 9999999999.99 | β |
This parameter indicates the total price of the current item to be included with the item details. | ||||
Parameter |
| |||
Description | If you set this parameter to true you will get a QR code image as encoded Base64 code within the response payload. | |||
Data Type | BOOLEAN | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | To provide more customization on token, and modify it if you don't like to use the default one | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
it shows if the token will be used in monthly subscription or will be used in unscheduled time, or subscription but not fixed time | ||||
| STRING | N/A | N/A | β |
This is a response parameter that would specifics the payment frequency plan depending on how it's configured by the merchant. | ||||
| DECIMAL | 1 | 9999999999.99 | β |
indicates the minimum amount per transaction using the token created, it will be declined if the amount is less than this limit | ||||
| DECIMAL | 1 | 100 | β |
indicates the maximum amount per transaction using the token created, it will be declined if the amount is greater than this limit | ||||
| INT | 1 | 999 | β |
indicates the payment iteration/cycle number among it's valid/configured maximum rounds/counts it should be. Note that this value is validated on the processor/bank side, PayTabs has no upper hand to validate the credibility of such information. | ||||
| INT | 1 | 999 | β |
indicates the maximum payments integration/cycles number. Note that this value is validated on the processor/bank side, PayTabs has no upper hand to validate the credibility of such information. | ||||
| DATE | N/A | N/A | β |
indicates the date of starting using the token, the token cannot be used before this date | ||||
| DATE | N/A | N/A | β |
Indicates the expiry date of the token | ||||
Parameter |
| |||
Description | this field detect shows which channel of integration/dashboard makes this transaction, this field will be returned in the IPN, callback and query transaction | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | This object will contain 3Ds details of the card | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| INT | N/A | N/A | β |
This parameter indicates the agreement description which you can use to distinguish your agreements and you can also use it as a title for your agreement. | ||||
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
CAVV is a cryptographic value generated during a 3D Secure transaction (e.g., Visa Secure, Mastercard Identity Check, AMEX SafeKey). It proves that authentication was performed by the cardholder. | ||||
| STRING | N/A | N/A | β |
UCAF is a security field used to pass authentication data between merchants, payment processors, and card issuers. | ||||
| STRING | N/A | N/A | β |
This parameter shares 3Ds version which vary from card to another | ||||
Parameter |
| |||
Description | Trace code (trace) is the parameter that Indicates the code that PayTabs can trace this response with | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Trace code (trace) is the parameter that Indicates the code that PayTabs can trace this response with | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | This parameter is a status code, that shows the code of the error and will be followed with message field that clarify the error | |||
Data Type | INT | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | This parameter is showing error message which is always shown after code parameter shown in the response | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the same as Transaction Reference on the PayTabs side check details on [Response Parameters | tran_ref], but it's used for forsa refund transactions | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | it transaction reference related to forsa provider( payment method, it's differs from paytabs reference | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the same as Transaction Reference on the PayTabs side check details on [Response Parameters | tran_ref], but it's in the response of the refund of forsa #TODO#ADDFORSA ENDOINTHERE# | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | indicate the refunded amount from the normal detected transaction, means that you may partial refund not full | |||
Data Type | DECIMAL | |||
Required | β | |||
Min | 0.01 | |||
Max | 99999999.99 | |||
Sample |
| |||
Parameter |
| |||
Description | boolean field indicates if the refund is done or not | |||
Data Type | #boolean | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the customer reference that is provided from the merchant side. | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the form of payment information in detail. | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
The type of payment method used (e.g., 'Visa', 'Mastercard', 'ApplePay', 'Amex', etc). | ||||
| STRING | N/A | N/A | β |
Specifies whether the card is a 'Credit' or 'Debit' card. For all payments other than bank cards, this parameter will not be present. | ||||
| STRING | N/A | N/A | β |
The card network or brand (e.g., 'Visa', 'Mastercard', 'Amex'). For all payments other than bank cards, this parameter will be empty. | ||||
| STRING | N/A | N/A | β |
A masked representation of the card number for security purposes. For all payments other than bank cards, this parameter will shows the payment method name. | ||||
| INT | N/A | N/A | β |
The expiration month of the card (1-12). For all payments other than bank cards, this parameter will not be present. | ||||
| INT | N/A | N/A | β |
The expiration year of the card (e.g., 2027). For all payments other than bank cards, this parameter will not be present. | ||||
| STRING | N/A | N/A | β |
The two-letter country code (ISO 3166-1 alpha-2) of the payment method issuer (e.g., 'SA' for Saudi Arabia). | ||||
| STRING | N/A | N/A | β |
The name of the financial institution that issued the card, or funded the installment plan (for example, 'Valu', 'Arab National Bank', etc) | ||||
Parameter |
| |||
Description | The main object containing contact transaction details. | |||
Data Type | OBJECT | |||
Required | β | |||
Sample |
| |||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
A unique identifier for the transaction session. | ||||
| STRING | N/A | N/A | β |
The invoice number for tracking the payment plan. | ||||
| STRING | N/A | N/A | β |
The unique identifier of the client (customer ID). | ||||
| DECIMAL | N/A | N/A | β |
The total price of all items in the installment plan. | ||||
| DECIMAL | N/A | N/A | β |
The total down payment amount for all items. | ||||
| Array | N/A | N/A | β |
A list of items included in the contact transaction. | ||||
Nested Parameter | Data Type | Min | Max | Required |
| STRING | N/A | N/A | β |
The unique identifier of the item being purchased. | ||||
| DECIMAL | N/A | N/A | β |
The total price of the item in the installment plan. | ||||
| DECIMAL | N/A | N/A | β |
The initial amount paid upfront. | ||||
| INT | N/A | N/A | β |
The number of months (or installments) for repayment. | ||||
| DECIMAL | N/A | N/A | β |
Any administrative fees associated with the plan. | ||||
| BOOLEAN | N/A | N/A | β |
Indicates if the item qualifies for a bonus offer. | ||||
Parameter |
| |||
Description | Indicates whether a URL link of the payment page or the 3D Secure, where the customer need to redirect to complete the payment process. | |||
Data Type | STRING | |||
Required | β | |||
Sample |
| |||
Parameter |
| |||
Description | Indicates the Hosted Payment Page's session expiry in minutes. | |||
Data Type | INT | |||
Required | β | |||
Min | 1 | |||
Max | 20 Minutes by default. | |||
Validation Rules | The PayPage link will expire once the TTL period expires, regardless of whether the link has been generated but not accessed before the TTL expires. | |||
Sample |
|
Request & Response Payload Samplesβ
This section is dedicated give you a sample API request payload using both the above mentioned required and optional parameters, along with showing you the response payload received upon using each request payload.
- Required Parameters Sample Payloads
- Optional Parameters Sample Payloads
The below sample request payload will show you how you can pass the above-mentioned required parameter/s, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.
- Sample Request Payload
- Sample Response Payload
{
"profile_id": **Your profile ID**,
"tran_type": "sale",
"tran_class": "ecom",
"cart_id": "cart_11123",
"cart_currency": "SAR",
"cart_amount": 158.56,
"cart_description": "Description of the items/services",
"split_payout":
[
{
"entity_id": 1000,
"entity_name": "Restaurant",
"item_description": "Meal",
"item_total": "133.56",
"msc_flag": "p",
"beneficiary":
{
"name": "Customer Name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
},
],
"callback": "none",
"return": "none"
}
{
"tran_ref": "TST22********159",
"tran_type": "Sale",
"cart_id": "CART#1001",
"cart_description": "Description of the items/services",
"cart_currency": "AED",
"cart_amount": "500.00",
"return": "none",
"redirect_url": "https://secure.paytabs.com/payment/page/59945B6B********************B481788688",
"serviceId": 2,
"profileId": 9*****4,
"merchantId": 1*****7,
"trace": "PMN****4.63****A8.00****C4"
}
The below sample request payload will show you how you can pass the above-mentioned optional parameter/s, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.
- Sample Request Payload
- Sample Response Payload
{
"profile_id": **Your profile ID**,
"tran_type": "sale",
"tran_class": "ecom",
"cart_description": "Description of the items/services",
"cart_id": "Unique order reference00",
"cart_amount": 25000.2,
"cart_currency": "SAR",
"paypage_lang": "en",
"return":"** Valid Return URL **",
"callback":"** Valid callback URL **",
"split_payout":
[
{
"entity_id": 1000,
"entity_name": "Restaurant",
"item_description": "Meal",
"item_total": "133.56",
"msc_flag": "p",
"beneficiary":
{
"name": "Customer Name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
},
{
"entity_id": 1001,
"entity_name": "Agency",
"item_description": "Delivery Fee",
"item_total": "15.00",
"msc_flag": "Z",
"beneficiary":
{
"name": "customer name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
},
{
"entity_id": 1002,
"entity_name": "Tip",
"item_description": "Tip",
"item_total": "10.00",
"msc_flag": "Z",
"beneficiary":
{
"name": "customer name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "Bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
}
],
"customer_details": {
"name": "FirstName LastName",
"email": "[email protected]",
"phone": "0522222222",
"street1": "address street",
"city": "cc",
"state": "C",
"country": "AE",
"zip": "12345"
},
"shipping_details": {
"name": "FirstName LastName",
"email": "[email protected]",
"phone": "971555555555",
"street1": "street2",
"city": "dubai",
"state": "dubai",
"country": "AE",
"zip": "54321"
},
"user_defined": {
"test": "UDF1 Test",
"test2": "UDF2 Test",
"udf3": "UDF3 Test",
"udf4": "UDF4 Test",
"udf5": "UDF5 Test",
"udf6": "UDF6 Test",
"udf7": "UDF7 Test",
"udf8": "UDF8 Test",
"udf9": "UDF9 Test"
},
"card_discounts":
[
{
"discount_cards" : "41111,520000",
"discount_amount" : "30.00",
"discount_percent" : "25",
"discount_title" : "30.00 SAR and 25% discount on cards starts with 41111, 520000",
}
],
"config_id": 2188,
"card_filter": "411111",
"card_filter_title": "Only accept cards start with 41111",
"tokenise": 2,
"show_save_card": true,
"hide_shipping":true,
"donation_mode":true,
"cart_min":5,
"cart_max":10,
"framed": true,
"framed_return_top": true,
"framed_return_parent": true
}
{
"tran_ref": "TST223XXXXXXXXXX",
"tran_type": "Sale",
"cart_id": "Unique order reference00",
"cart_description": "Description of the items/services",
"cart_currency": "USD",
"cart_amount": "0.00",
"tran_currency": "",
"tran_total": "0",
"callback": "** callback URL **",
"return": "** return URL **",
"redirect_url": "https://secure.paytabs.com/payment/page/595AXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"customer_details": {
"name": "first last",
"email": "[email protected]",
"phone": "0522222222",
"street1": "address street",
"city": "cc",
"state": "AZ",
"country": "AE",
"ip": "197.47.93.193"
},
"shipping_details": {
"name": "name1 last1",
"email": "[email protected]",
"phone": "971555555555",
"street1": "street2",
"city": "dubai",
"state": "DU",
"country": "AE"
},
"split_payout":
[
{
"entity_id": 1000,
"entity_name": "Restaurant",
"item_description": "Meal",
"item_total": "133.56",
"msc_flag": "p",
"beneficiary":
{
"name": "Customer Name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
},
{
"entity_id": 1001,
"entity_name": "Agency",
"item_description": "Delivery Fee",
"item_total": "15.00",
"msc_flag": "Z",
"beneficiary":
{
"name": "customer name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
},
{
"entity_id": 1002,
"entity_name": "Tip",
"item_description": "Tip",
"item_total": "10.00",
"msc_flag": "Z",
"beneficiary":
{
"name": "customer name",
"account_number": "SAXX0X0000XXX000XXXXX000",
"country": "SA",
"bank": "Bank name",
"bank_branch": "",
"email": "[email protected]",
"mobile_number": "+966XXXXXXXXX",
"address_1": "Riyadh",
"address_2": ""
}
}
],
"serviceId": 2,
"profileId": 100181,
"merchantId": 46656,
"trace": "PMNT0403.63A99D49.0003A345"
}
The Payment Flow Experienceβ
Reaching this point, you are now able to initiate a Split Payout request and as you now, the process involves several key steps that ensure a smooth payment and tracking experience for both you and customers. Hereβs how it works:
-
Initiating the Request:
Once you initiate a split payout request, you will receive a response that includes a redirect URL. This URL is crucial for guiding your customer through the payment process.
"redirect_url": "https://secure.paytabs.com/payment/page/599452E5B6B********************B4817688",
-
Redirecting the Customer:
You should redirect your customer to this URL as you normally would in a payment transaction. This step allows the customer to complete their payment securely and efficiently. PayTabs then will handle the transaction and ensure that the funds are collected as specified in your split payout request.
-
Tracking in the Merchant Dashboard:
After the payment is completed, the transaction will be displayed in your Merchant Dashboard. You can view the details of the split payout in the transaction view. The dashboard will provide a dedicated Split Payout section, showing a comprehensive breakdown of how the funds have been distributed among the designated beneficiaries.
This process ensures that you have full visibility and control over your split payouts, from initiating the transaction to tracking its completion in the dashboard.