curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payment-links/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"amount": "1500.00",
"reference_id": "ORD-2026-000123",
"expiry_date": "2026-12-31T18:29:59Z",
"preferred_payment_method": "UPI",
"buyer": {
"name": "Rahul Sharma",
"email": "[email protected]",
"phone": "+919876543210",
"send_sms": true,
"send_email": true,
"address": {
"line_1": "221B MG Road",
"line_2": "Indiranagar",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": "560038"
}
},
"product": {
"name": "Annual subscription",
"description": "12-month premium plan",
"type_of_goods": "service"
},
"invoice": {
"number": "INV2026000123"
}
}
'{
"success": true,
"message": "Payment Link created successfully",
"data": {
"payment_id": "PR4829301756",
"link_id": "PR4829301756",
"payment_link": "https://api-pacb-uat.eximpe.com/p/Xk3nQ7bT2mWp9vLc4R/",
"amount": "1500",
"currency": "INR"
}
}Create Payment Link
Create a URL you send to a buyer to collect one INR payment. It stays open until it is paid, it expires, or you deactivate it.
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/payment-links/ \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"amount": "1500.00",
"reference_id": "ORD-2026-000123",
"expiry_date": "2026-12-31T18:29:59Z",
"preferred_payment_method": "UPI",
"buyer": {
"name": "Rahul Sharma",
"email": "[email protected]",
"phone": "+919876543210",
"send_sms": true,
"send_email": true,
"address": {
"line_1": "221B MG Road",
"line_2": "Indiranagar",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": "560038"
}
},
"product": {
"name": "Annual subscription",
"description": "12-month premium plan",
"type_of_goods": "service"
},
"invoice": {
"number": "INV2026000123"
}
}
'{
"success": true,
"message": "Payment Link created successfully",
"data": {
"payment_id": "PR4829301756",
"link_id": "PR4829301756",
"payment_link": "https://api-pacb-uat.eximpe.com/p/Xk3nQ7bT2mWp9vLc4R/",
"amount": "1500",
"currency": "INR"
}
}Overview
A payment link is a URL you send to a buyer — over chat, email or SMS — to collect one payment without building a checkout of your own. You create it from your backend with the buyer, product and invoice details. The response carries thepayment_link to send and a link_id to track it by.
A link stays open until it is paid, its expiry_date passes, or you deactivate it. Retrieve Payment Link tells you which.
Request Parameters
Required Parameters
amount: The amount to collect, in rupeesreference_id: Your unique reference for this paymentbuyer: Buyer details — name, email, phone and addressproduct: What the payment is forinvoice: The invoice number
Optional Parameters
expiry_date: When the link stops accepting payment. Defaults to one year from todaypreferred_payment_method: The payment method the buyer should pay withbuyer.send_sms/buyer.send_email: Send the link to the buyer as soon as it is createdbusiness_model: Whether the buyer is a business (B2B) or a consumer (B2C)purpose_code: The FEMA/FETERS purpose code the payment settles under (e.g.S0802)
currency field: amount is read as rupees, and a currency key in the request is ignored.Parameter Definitions
The following tables define the request parameters, including nested objects, types, requirements, and constraints.Top-level
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| amount | string | Yes | Amount to collect, in rupees. | Decimal string, up to two decimal places; greater than 0 and at most 10,000,000.00 |
| reference_id | string | Yes | Your reference for this payment. | 1–50 chars; letters, numbers and hyphens only; unique across all your orders |
| expiry_date | string | No | When the link stops accepting payment. | ISO 8601 date-time; in the future and at most 365 days away; defaults to 365 days from today |
| preferred_payment_method | string | No | The payment method the buyer should pay with. | One of UPI, CARD, CREDIT_CARD, DEBIT_CARD, NET_BANKING, in any case; must be one your account’s payment links can collect |
| business_model | string | No | Whether the buyer is a business or a consumer. | Enum: B2B, B2C; derived from your KYC when omitted |
| purpose_code | string | No | FEMA/FETERS purpose code this payment settles under. | Must be active and enabled on your account (e.g. S0101, S0802); derived from your KYC when omitted |
| buyer | object | Yes | The buyer. | See Buyer object |
| product | object | Yes | Product or service being paid for. | See Product object |
| invoice | object | Yes | Invoice metadata. | See Invoice object |
Buyer
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| name | string | Yes | Full name of the buyer. | Max 255 chars |
| string | Yes | Email of the buyer. | Valid email address | |
| phone | string | Yes | Phone number with country code. | Starts with + and the country code, e.g. +919876543210; 9876543210 is refused |
| send_sms | boolean | No | Send the link to phone by SMS once it is created. | Default false |
| send_email | boolean | No | Send the link to email once it is created. | Default false |
| address | object | Yes | Buyer address. | See Address object |
Address (Buyer.address)
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| line_1 | string | Yes | Address line 1. | |
| line_2 | string | No | Address line 2. | |
| city | string | Yes | City. | Max 255 chars |
| state | string | Yes | State/Province. | Max 255 chars |
| postal_code | string | Yes | PIN code. | A valid 6-digit Indian PIN code |
line_1, city, state and postal_code. Create Order asks only for postal_code.Product
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| name | string | Yes | Product or service name. | |
| description | string | No | Description of the product or service. | Max 1024 chars |
| type_of_goods | string | Yes | Nature of goods/services. | Enum: physical_goods, digital_goods, service |
| hs_code | string | Conditional | 8-digit HS code. | Required for physical_goods; must be a known HS code |
| hs_code_description | string | No | HS code description. |
hs_code is checked, but neither it nor hs_code_description is stored on the link, so Retrieve Payment Link returns both as null.Invoice
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
| number | string | Yes | Invoice number. | Max 50 chars; letters and numbers only; unique across your orders that have not failed |
INV-2026-0123 is refused with Invoice number must contain only alphanumeric characters. — send INV20260123. This is stricter than Create Order’s invoice number. A payment link’s invoice takes no date.Expiry
- Send
expiry_datein ISO 8601. An offset is honoured —2026-12-31T23:59:59+05:30reads back as2026-12-31T18:29:59.000000Z— and a value without one is read as UTC. - It must be in the future and no more than 365 days away. Otherwise the create is refused with
Expiry date cannot be older than the current UTC time.orExpiry date cannot be beyond 1 year from now. - Omit it, or send
null, and the link expires 365 days from today. - The create response does not echo the expiry. Read it back with Retrieve Payment Link.
Preferred payment method
preferred_payment_method names the method you want the buyer to pay with: UPI, CARD, CREDIT_CARD, DEBIT_CARD or NET_BANKING, in any case. Leave it out and the buyer chooses from what your account offers.
Which of these a payment link can collect depends on your account. Name one yours cannot and the create is refused before anything is sent to the buyer:
{
"success": false,
"error": {
"code": "ERR_ORDER_002",
"message": "Validation error",
"details": {
"preferred_payment_method": "Credit card is not supported for payment links on this account"
}
}
}
Invalid preferred payment method. The preference is not echoed back: mop_type on List Payment Links and Retrieve Payment Link is the method the buyer actually paid with.
Response
A successful create returns201 with:
link_id: The link’s ID —PRfollowed by 10 digits. Retrieve and Deactivate take it, and every payment made through the link carries it. See Tracking a payment linkpayment_id: The same value aslink_id, kept for compatibility. Readlink_idpayment_link: The URL to send to the buyer. Treat it as opaqueamount: The amount as a decimal string. A whole amount comes back without decimals ("1500"), any other with two ("1500.50")currency: AlwaysINR
Tracking a payment link
Two IDs are in play: the link’slink_id, and the payment_id of each payment made through it.
- Manage the link by
link_id. Retrieve Payment Link and Deactivate Payment Link take it. - Match payments to the link on
link_id. A buyer may try more than once before a payment goes through. The payment webhooks —PAYMENT_SUCCESSFULwhen a payment goes through — carry that payment’s ownpayment_idand the link’slink_id. - Refund and reconcile by that payment’s
payment_id, not bylink_id. Create Refund takes it, and Retrieve Payment Link names the payment that paid the link inpaid_payment_id.
payment_id and link_id are the same value. Handle both cases the same way: match on link_id, refund by payment_id.
Where each try is a payment of its own, a try that fails sends no webhook: the link stays open and the buyer can pay again through it. If the link closes without being paid — it expires, you deactivate it, or 20 tries have failed — one PAYMENT_FAILED arrives for the link itself, with payment_id equal to link_id. There is nothing to refund on it, and it is not a payment the payments API returns: look the link up by link_id with Retrieve Payment Link.
Errors
Every refusal uses the standard envelope:success is false, and error carries a code, a message and details. A 400 always carries ERR_ORDER_002 — read details to see what failed.
| Status | error.code | When | details |
|---|---|---|---|
400 | ERR_ORDER_002 | A field is missing or invalid | Keyed by field and nested like the request, e.g. {"buyer": {"phone": "Enter a valid phone number."}} |
400 | ERR_ORDER_002 | reference_id is already used by one of your orders | {"reference_id": "Reference ID already exists"} |
400 | ERR_ORDER_002 | invoice.number is already used by one of your orders that has not failed | {"invoice": {"number": "Invoice Number already exists"}} |
400 | ERR_ORDER_002 | expiry_date is in the past, or more than 365 days away | {"expiry_date": "Expiry date cannot be beyond 1 year from now."} |
400 | ERR_ORDER_002 | preferred_payment_method is not a payment method | {"preferred_payment_method": "Invalid preferred payment method"} |
400 | ERR_ORDER_002 | Your account’s payment links cannot collect preferred_payment_method | {"preferred_payment_method": "Credit card is not supported for payment links on this account"} |
400 | ERR_ORDER_002 | The payment method is not enabled on your account | {"mop_type": "CREDIT_CARD is not enabled for this account."} |
400 | ERR_ORDER_002 | purpose_code is unknown or inactive, or not enabled on your account | A string, not an object: "Invalid Purpose code given." or "Purpose code is not enabled for this merchant." |
401 | ERR_AUTH_000, ERR_AUTH_001 | Credentials are missing or wrong, or a PSP left out X-Merchant-ID | {"authentication": "X-Merchant-ID header is required for this endpoint."} |
403 | — | Payment links are not enabled on your account | Not the standard envelope: {"detail": "You do not have permission to perform this action."} |
403 | ERR_AUTH_005 | Your account’s setup does not permit payment links | {"collection_mode": "PAYMENT_LINKS is not enabled for this account."} |
403 | ERR_SERVICE_ERROR_000 | Your account is not configured to collect through payment links | e.g. {"payment_gateway": "Payment gateway not configured"} |
429 | ERR_RATE_LIMIT_EXCEEDED | The payment network is rate limiting requests | Retry after the Retry-After header, when it is sent |
502 | ERR_GATEWAY_UNAVAILABLE, ERR_PAYMENT_003 | The payment network could not be reached, or returned an error | Retry shortly |
500 | ERR_SERVICE_ERROR_000 | Anything unexpected | {"error": "An unexpected error occurred. Please try again later"} |
Examples
{
"amount": "1500.00",
"reference_id": "ORD-2026-000123",
"expiry_date": "2026-12-31T18:29:59Z",
"preferred_payment_method": "UPI",
"buyer": {
"name": "Rahul Sharma",
"email": "[email protected]",
"phone": "+919876543210",
"send_sms": true,
"send_email": true,
"address": {
"line_1": "221B MG Road",
"line_2": "Indiranagar",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": "560038"
}
},
"product": {
"name": "Annual subscription",
"description": "12-month premium plan",
"type_of_goods": "service"
},
"invoice": {
"number": "INV2026000123"
}
}
{
"amount": "2499.50",
"reference_id": "ORD-2026-000124",
"buyer": {
"name": "Priya Nair",
"email": "[email protected]",
"phone": "+919812345678",
"address": {
"line_1": "14 Marine Drive",
"city": "Mumbai",
"state": "Maharashtra",
"postal_code": "400001"
}
},
"product": {
"name": "Wireless Headphones",
"description": "Noise-cancelling wireless headphones",
"type_of_goods": "physical_goods",
"hs_code": "85183000"
},
"invoice": {
"number": "INV2026000124"
}
}
Response Examples
{
"success": true,
"message": "Payment Link created successfully",
"data": {
"payment_id": "PR4829301756",
"link_id": "PR4829301756",
"payment_link": "https://api-pacb-uat.eximpe.com/p/Xk3nQ7bT2mWp9vLc4R/",
"amount": "1500",
"currency": "INR"
}
}
{
"success": false,
"error": {
"code": "ERR_ORDER_002",
"message": "Validation error",
"details": {
"invoice": {
"number": "Invoice number must contain only alphanumeric characters."
},
"buyer": {
"phone": "Enter a valid phone number."
}
}
}
}
Implementation Notes
- Create links from your backend. The call carries your client secret, so never make it from a browser or a mobile app.
- A
reference_idis spent once the request passes validation. It must be unique across all your orders, not only payment links. A create refused after validation — over the payment method, say, or by the payment network — still records a failed order that holds thereference_id, and the link may appear in List Payment Links asfailed. Retry with a freshreference_id; the invoice number is free to reuse. - PSPs send
X-Merchant-IDnaming the sub-merchant the link is for. Without it the call is refused with a401. - Keep
link_idandamount.link_idis what Retrieve and Deactivate take, and Retrieve does not return the link’s amount.
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
Merchant Identifier - The unique ID for the merchant account. This is required for PSP (Payment Service Provider) merchants who manage multiple merchant accounts. You can find merchant IDs in the Merchant Management section of the dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Body
Payment link creation request
Amount to collect, in rupees, as a decimal string (e.g. "1500.00"). Up to two decimal places; greater than 0 and at most 10,000,000.00. Payment links are always INR, so there is no currency field.
^[0-9]+(\.[0-9]{1,2})?$Your reference for this payment. Letters, numbers and hyphens. Unique across all your orders, including one whose link failed to create.
1 - 50^[A-Za-z0-9-]+$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When the link stops accepting payment (ISO 8601). A value without an offset is read as UTC. Must be in the future and at most one year (365 days) away. Omit it, or send null, and the link expires 365 days from today.
The payment method the buyer should pay with. Case-insensitive. Omit it to let the buyer choose. Which methods a payment link can collect depends on your account; one it cannot is refused with a 400.
UPI, CARD, CREDIT_CARD, DEBIT_CARD, NET_BANKING Whether the buyer is a business (B2B) or a consumer (B2C). Optional — derived from the merchant's KYC when omitted.
B2B, B2C FEMA/FETERS purpose code this payment settles under (e.g. S0802). Optional — derived from the merchant's allowed purpose codes when omitted and exactly one is allowed.
"S0802"