Initiating The Payment
PayTabs Technical Portal provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages.
PayLinks integration type is suitable for merchants with PCI SAQ A or merchants does not have any PCI levels. To customize the UI of the PayPage, check thisHow to customize the PayPage (Hosted Payment Page) UI?, and to know more about the Hosted Payment Page PCI DSS merchant requirements, please check this article.
In this manual, we will walk you through how to initiate a payment request via this integration type. You will be introduced to the required parameters that need to be passed to initiate the request, along with all the possible optional parameters as well. We highly recommend that you and your team check our PayLinks | Payment Workflow manual first to understand the business/logic this integration type relay on.
The Endpoint and Related Postman Collection
In this tutorial, we will rely on the PayTabs Hosted Payment Page API Endpoint, mentioned on PayTabs API endpoints postman collection, which you can access from po_link. The endpoint will need to be accessed with a POST request on the below-mentioned URL
POST | {{domain}}/payment/link/create |
---|
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/link/create
https://secure.paytabs.com/payment/link/create
https://secure-egypt.paytabs.com/payment/link/create
https://secure-oman.paytabs.com/payment/link/create
https://secure-jordan.paytabs.com/payment/link/create
https://secure-kuwait.paytabs.com/payment/link/create
https://secure-global.paytabs.com/payment/link/create
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 |
| Data Type | INT |
---|---|---|---|
Required | ✔ | ||
Validation Rules | Accept only valid profile number | ||
Description | The merchant Profile ID you can get from your PayTabs dashboard. For more information please check ourHow to get your account information from PT2 Dashboard?tutorial article. To know more about this parameter pleaseclick here. | ||
Code Sample |
| ||
Parameter |
| Data Type | STRING |
Required | ✔ | ||
Validation Rules | |||
1 character | |||
128 character | |||
Description | The title will be displayed in the PayLink list in your Dashboard so it will be easy to find. So it's preferred to use a shortened title with a semantic meaning. To know more about this parameter pleaseclick here. | ||
Code Sample |
| ||
Parameter |
| Data Type | STRING |
Required | ✔ | ||
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- and lower-case characters. | ||
Description | Indicates the transaction currency, which the customer will be charged with. To know more about this parameter pleaseclick here. | ||
Code Sample |
| ||
Parameter |
| Data Type | DECIMAL |
Required | ✔if | ||
Validation Rules | |||
0.01 | |||
9999999999.99 | |||
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 pleaseclick here. | ||
Code Sample |
|
Parameter | Data Type | Min | Max | Required |
---|---|---|---|---|
| STRING | ❌ | ||
Indicates the cart/order id at the merchant end to easily relate the transaction to. To know more about this parameter pleaseclick here. | ||||
| ||||
| STRING | ❌ | ||
Indicates the cart/order description at the merchant end to easily relate the transaction to. To know more about this parameter pleaseclick here. | ||||
| ||||
| BOOLEAN | ❌ | ||
This mode is for donation , this gives you the ability to let the customer add the amount by himself , with a range ( min , max ) you will add | ||||
| ||||
| DECIMAL | ❌ | ||
Minimum amount allowed in the cart for Donation mode. To know more about this parameter pleaseclick here. | This field is required if the donation_mode is true | |||
| ||||
| DECIMAL |