Closing a Batch: Finalizing Your External Payouts
After creating a batch and adding the necessary payout requests, the next step in the external payout workflow is to close the batch. Closing a batch ensures that the requests are finalized and processed for distribution to the designated beneficiaries. This is particularly relevant for external payouts, where funds are sent to outside beneficiaries, often via IBANs.
In this manual, weβll guide you through the steps to close a batch and finalize your external payouts. Each request within a batch contains its own beneficiary details, ensuring accurate transfers to the intended recipients.
For more information on how to create a batch and add deposit requests, please refer to our External Payout APIs Workflow manual.
By the end of this manual, youβll understand how to close a batch effectively and ensure that your payout requests are processed without any issues.
You should know that you can close the batch while creating it from the beginging by providing all the needed requests and the "close_batch" parameter within the create batch payload.
Limitationsβ
There are some Limitations that may stop closing batch, check the following:
- Balance:
You should make sure that the deposit account that you choose in the batch, have enough balance to cover the batch amount (all requests amount), or you will face an error. - Count:
Count parameter that mentioned in the request payload, is mandatory and if the batch contains 5 requests and you pass 4 in the count parameter, you will face validation error, so make sure to pass the right count of request in the batch. - Total:
Total parameter that mentioned in the request payload, is mandatory and if the total amount of the batch is 10 SAR and you pass 9, you will face validation error. make sure to pass the total amount of the batch right (total requests amount).
The Endpoint and Related Postman Collectionβ
POST | {{domain}}/payout/batch/close |
---|
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/payout/batch/close
https://secure.paytabs.com/payout/batch/close
https://secure-egypt.paytabs.com/payout/batch/close
https://secure-oman.paytabs.com/payout/batch/close
https://secure-jordan.paytabs.com/payout/batch/close
https://secure-kuwait.paytabs.com/payout/batch/close
https://secure-global.paytabs.com/payout/batch/close
Request Parametersβ
To initiate a query batch request using this API Endpoint, there are specific parameters that need to be passed with valid information. The specification of these parameters is clarified below:
- The Minimum Required Parameters
Parameter | Data Type | Min | Max | Required |
---|---|---|---|---|
| INT | Unique ID of for a batch. | β | |
| ||||
| INT | Unique profile ID associated with the batch. | β | |
| ||||
| INT | Unique ID of the merchant account associated with the batch. | β | |
| ||||
| INT | Number of requests in the batch ( entry ) | β | |
| ||||
| INT | Total payout amount for the batch | β | |
|
Request & Response Payload Samplesβ
This section is dedicated give you a sample API request payload using the above mentioned required parameters, along with showing you the response payload received upon using each request payload.
- Required 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
{
"batch_id": 437,
"profile_id": "47128",
"account_id": "17",
"count": 1,
"total": 1
}
{
"batch_id": 437,
"profile_id": 47128,
"account_id": 17,
"currency": "SAR",
"total": "1",
"count": 1,
"order_id": "Payout-API-20220211",
"status": "Pending",
"requests": [
{
"batch_id": 437,
"entry_id": 952,
"merchant_reference": "7765",
"merchant_reference2": "",
"merchant_reference3": "",
"amount": "1",
"fee": "3.5",
"total": "4.5",
"beneficiary_account_number": "SA2910000005100003144805",
"beneficiary_mobile_number": "+971585436859",
"method": "Iban",
"status": "Pending",
"protocol_message": ""
}
],
"trace": "PMNT0001.66EC22CC.000000C2",
"processing_date_utc": "2024-08-12"
}
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: