PaymentLink
Payment Link API
The Payment Link API allows users to create encrypted payment links with optional parameters like amount, currency, expiry date, and terminal. It returns a secure URL that customers can use to make payments.
API Endpoint
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_template_id | String | Yes | ID of the payment template to use for this link. * |
amount | Number | No | Payment amount. |
currency | String | No | Currency code (e.g., USD, INR). |
expiry_date | String | No | Expiry date must be in yyyy-mm-dd format. |
terminal_id | String | No | Terminal ID to route the transaction through a specific connector. * |
order_id | String | No | Unique order from merchant side |
Note: Parameters marked with * (payment_template_id and terminal_id) should not be sent 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 Behavior
The behavior of the API response depends on the type of key used in the Authorization header:
- If the Test key is passed, a test payment link will be generated.
- If the Live key is passed, a live payment link will be generated.
This allows you to safely test integrations before going live.
Success Response
If the payment link is created successfully, the API returns the secure link: