Payment Links
Run in PostmanCreate and manage reusable payment links for your customers.
Base URL:
staginghttps://staging-api.xepeng.com/openapi/payment-linksPOST
Generate Link
Generate a new payment link.
Endpoint: /openapi/payment-links/generate
Parameters
| Property | Type | Description |
|---|---|---|
| amount | number | The amount to be paid (required). |
| order_ref | string | Your internal reference ID (required). |
| description | string | Description for the user. |
| expiry | integer | Expiry time in minutes (optional). |
Example Request
curl --request POST "https://staging-api.xepeng.com/openapi/payment-links/generate" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{api_key}}" \
--data-raw '{
"amount": 50000,
"order_ref": "INV-2023-001",
"description": "Payment for INV-001"
}'GET
Get Link
Retrieve details of a specific payment link.
Endpoint: /openapi/payment-links/:payment_link_uid
Example Request
curl --request GET "https://staging-api.xepeng.com/openapi/payment-links/pl_98765" \
--header "Authorization: Bearer {{api_key}}"GET
List Links
List generated payment links with pagination.
Endpoint: /openapi/payment-links
Query Parameters
| Parameters | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1). |
| limit | integer | Items per page (default: 10). |
Example Request
curl --request GET "https://staging-api.xepeng.com/openapi/payment-links?page=1&limit=10" \
--header "Authorization: Bearer {{api_key}}"PUT
Inactivate Link
Inactivate (disable) an existing payment link so it can no longer be used.
Endpoint: /openapi/payment-links/:payment_link_uid/inactivate
Example Request
curl --request PUT "https://staging-api.xepeng.com/openapi/payment-links/pl_98765/inactivate" \
--header "Authorization: Bearer {{api_key}}"