💰Generate Payment Link
This API allows you to generate a secure, one-time PayLater payment link for a specific order. The response includes a URL that must be used to redirect the customer to complete their PayLater transaction. Ideal for web and app checkouts where you want to initiate the PayLater flow externally and return to your platform post-payment.
Endpoint
Sandbox
POST https://connect-sandbox.paylaterapp.com/api/paylater/merchant-portal/web-checkout/
Production
POST https://connect.paylaterapp.com/api/paylater/merchant-portal/web-checkout/
Headers
x-api-key: Your API key (Required)Content-Type:application/json
Request Body
merchantId
String
✅
Unique ID assigned to your business
outletId
Long
✅
Storefront or outlet identifier
currency
String
✅
Must be QAR
amount
Double
✅
Range: 300–25,000
orderId
String
✅
Merchant unique transaction identifier
successRedirectUrl
String
✅
URL to redirect customer on success
failRedirectUrl
String
✅
URL to redirect customer on failure
Sample cURL
curl --location 'https://connect-sandbox.paylaterapp.com/api/paylater/merchant-portal/web-checkout/' \
--header 'x-api-key: a4f9feba-19dd-47b7-8d09-268a25c44a35' \
--header 'Content-Type: application/json' \
--data '{
"merchantId": "138",
"outletId": 1000000061,
"currency": "QAR",
"amount": 350.00,
"orderId": "O-3445",
"successRedirectUrl": "https://test.com/success",
"failRedirectUrl": "https://test.com/fail"
}'Success Response
{
"paymentLinkUrl": "https://payments-sandbox.paylaterapp.com/paylink/uuid?token=xyz&channel=web"
}Error Response (Example)
{
"error": "Merchant ID cannot be null"
}
{
"error": "Order ID must be unique"
}
{
"error": "Amount must be between 300 and 4000"
}Last updated