Generating checkout link for Direct checkout flow
- Use provided checkout domain with https scheme
for example:https://pay.trdworld.com - Add
/payuri
https://pay.trdworld.com/pay - Add query params with payment details
| Parameter | Mandatory | Description | Example |
|---|---|---|---|
merchant_identifier | Required | Merchant id provided upon integration | 1099 |
api_key | Required | API key provided upon integration | 02e1fe3b-b91e-43f7-a030-58b9b785a2b3 |
merchant_order_id | Required | Unique payment id from your system | ORD_CL_773460010 |
payment_method_type | Optional | Code for payment method preselected by customer | BT_AR |
amount | Required | Amount for payment. Minor currency units | 25000 |
currency | Required | Currency code for payment | ARS |
customer.id | Required | Unique customer id from your system | cust_3245242 |
customer.name | Optional | Customer name | John Dow |
customer.email | Optional | Customer's email | john.dow@gmail.com |
customer.phone | Optional | Customer's phone number | +919876543210 |
customer.lang | Optional | Language code for customer checkout | en es hi ar |
customer.kyc_level | Optional | 'TRUSTED' for verified customers | en es hi ar |
callback_url | Optional | Url for webhook notification. You can use unique url for each payment if needed | https://merchant.com/webhook https://merchant.com/webhook/ORD_CL_773460010 |
return_url | Optional | Url to return customer upon payment has been completed | https://merchant.com/payment/return |
https://pay.trdworld.com/pay?amount=250000¤cy=ARS&merchant_order_id=ORD_CL_773460010&customer.id=cust_635001&customer.name=John%20Dow&customer.email=john.dow%40gmail.com&customer.lang=en&payment_method_type=BT_AR&return_url=https%3A%2F%2Fmerchant.com%2Fpayment%2Freturn&callback_url=https%3A%2F%2Fmerchant.com%2Fwebhook%2FORD_CL_773460010&merchant_identifier=1099&api_key=02e1fe3b-b91e-43f7-a030-58b9b785a2b3
-
Calculate signature
- Use generated url with query params as string to sign and calculate hash using HMAC-SHA256 algo with
secret_keyprovided upon integration - Add parameter
signaturewith hexadecimal calculated hash
- Use generated url with query params as string to sign and calculate hash using HMAC-SHA256 algo with
-
Redirect customer to signed url
https://pay.trdworld.com/pay?amount=250000¤cy=ARS&merchant_order_id=ORD_CL_773460010&customer.id=cust_635001&customer.name=John%20Dow&customer.email=john.dow%40gmail.com&customer.lang=en&payment_method_type=BT_AR&return_url=https%3A%2F%2Fmerchant.com%2Fpayment%2Freturn&callback_url=https%3A%2F%2Fmerchant.com%2Fwebhook%2FORD_CL_773460010&merchant_identifier=1099&api_key=02e1fe3b-b91e-43f7-a030-58b9b785a2b3&signature=ba93267add47b4358f6d4059db35efe73be236313222f20415fb7dea527d5afc