Endpoints
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
| POST | /v1/payment-link | Create a new payment link | 50 req/min |
| GET | /v1/payment-link/:id | Get payment link details | 100 req/min |
| GET | /v1/payment-link/list | List payment links | 100 req/min |
| DELETE | /v1/payment-link/:id | Deactivate a payment link | 50 req/min |
Create Payment Link
Create a new payment link.Example Request
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the payment link. |
description | string | No | Description of the payment. |
amount | number | No* | Fixed amount. Required if allowCustomAmount is false. |
currency | string | Yes | Currency code (e.g., USDT, LKR). |
allowCustomAmount | boolean | Yes | Whether to allow customers to enter a custom amount. Default: false. |
minAmount | number | No* | Minimum amount for custom payments. Required if allowCustomAmount is true. |
maxAmount | number | No* | Maximum amount for custom payments. Required if allowCustomAmount is true. |
allowQuantityBuy | boolean | No | Allow customers to purchase multiple quantities. Default: false. |
maxQuantity | number | No* | Maximum quantity allowed per purchase. Required if allowQuantityBuy is true. |
reusable | boolean | No | Whether the link can be used multiple times. Default: true. |
expirationDate | string | No | Expiration date in ISO 8601 format. |
successUrl | string | No | URL to redirect customers after successful payment. |
cancelUrl | string | No | URL to redirect customers if they cancel the payment. |
webhookUrl | string | No | Webhook URL to receive payment notifications. |
merchantTradeNo | string | No | Unique merchant trade number for tracking. |
branchId | string | No | Branch ID to associate with. |
Example Response (201 Created)
Get Payment Link
Get details of a specific payment link.Example Request
Example Response (200 OK)
List Payment Links
Retrieve a paginated list of payment links.Example Request
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1). |
pageSize | number | Items per page (default: 20). |
branchId | string | Filter by branch ID. |
search | string | Search by name or description. |
Example Response (200 OK)
Deactivate Payment Link
Deactivate (soft delete) a payment link. It will no longer accept new payments.Example Request
Example Response (200 OK)
Error Codes
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid data. |
| 401 | Unauthorized - Invalid signature. |
| 403 | Forbidden - Access denied. |
| 404 | Not Found - Payment link not found. |
| 429 | Too Many Requests - Rate limit exceeded. |