PaymentLink
Payment Link API
The Payment Link API generates encrypted payment links with optional fields such as amount, currency, expiry date, and terminal. The endpoint returns a secure URL for payment completion.
API Endpoint
POST
https://api.thepayment.company/api/v1/payment-linkRequest Body Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_template_id | String | Yes | ID of the payment template used for the link. * |
amount | Number | No | Payment amount. |
currency | String | No | Currency code, for example USD or INR. |
expiry_date | String | No | Expiry date in yyyy-mm-dd format. |
terminal_id | String | No | Terminal ID used to route the transaction through a specific connector. * |
order_id | String | No | Merchant-side unique order reference. |
Note: Do not send fields marked with * (payment_template_id and terminal_id) when using a Test key.
Headers
| Header Name | Description |
|---|---|
Content-Type | Set to application/json. |
Authorization | Bearer token (your Secret key or Test key). |
Environment Rules
The API response behavior depends on the key used in the Authorization header:
- If a Test key is used, the API generates a test payment link.
- If a Live key is used, the API generates a live payment link.
This behavior supports integration validation prior to production deployment.