Skip to main content
POST

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 the payment_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 rupees
  • reference_id: Your unique reference for this payment
  • buyer: Buyer details — name, email, phone and address
  • product: What the payment is for
  • invoice: The invoice number

Optional Parameters

  • expiry_date: When the link stops accepting payment. Defaults to one year from today
  • preferred_payment_method: The payment method the buyer should pay with
  • buyer.send_sms / buyer.send_email: Send the link to the buyer as soon as it is created
  • business_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)
Payment links are INR only. There is no 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

Buyer

Address (Buyer.address)

A payment link needs the whole address — line_1, city, state and postal_code. Create Order asks only for postal_code.

Product

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

Letters and numbers only. 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_date in ISO 8601. An offset is honoured — 2026-12-31T23:59:59+05:30 reads back as 2026-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. or Expiry 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:
A value that is not a payment method at all is refused with 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 returns 201 with:
  • link_id: The link’s ID — PR followed by 10 digits. Retrieve and Deactivate take it, and every payment made through the link carries it. See Tracking a payment link
  • payment_id: The same value as link_id, kept for compatibility. Read link_id
  • payment_link: The URL to send to the buyer. Treat it as opaque
  • amount: The amount as a decimal string. A whole amount comes back without decimals ("1500"), any other with two ("1500.50")
  • currency: Always INR
Two IDs are in play: the link’s link_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_SUCCESSFUL when a payment goes through — carry that payment’s own payment_id and the link’s link_id.
  • Refund and reconcile by that payment’s payment_id, not by link_id. Create Refund takes it, and Retrieve Payment Link names the payment that paid the link in paid_payment_id.
On some accounts a link and its payment share one ID, so a webhook’s 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.

Examples

Response Examples

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_id is 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 the reference_id, and the link may appear in List Payment Links as failed. Retry with a fresh reference_id; the invoice number is free to reuse.
  • PSPs send X-Merchant-ID naming the sub-merchant the link is for. Without it the call is refused with a 401.
  • Keep link_id and amount. link_id is what Retrieve and Deactivate take, and Retrieve does not return the link’s amount.

Authorizations

X-Client-ID
string
header
required

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.

X-Client-Secret
string
header
required

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.

X-Merchant-ID
string
header
required

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.

X-API-Version
string
header
required

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

application/json

Payment link creation request

amount
string
required

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.

Pattern: ^[0-9]+(\.[0-9]{1,2})?$
reference_id
string
required

Your reference for this payment. Letters, numbers and hyphens. Unique across all your orders, including one whose link failed to create.

Required string length: 1 - 50
Pattern: ^[A-Za-z0-9-]+$
buyer
object
required
product
object
required
invoice
object
required
expiry_date
string<date-time> | null

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.

preferred_payment_method
enum<string>

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.

Available options:
UPI,
CARD,
CREDIT_CARD,
DEBIT_CARD,
NET_BANKING
business_model
enum<string>

Whether the buyer is a business (B2B) or a consumer (B2C). Optional — derived from the merchant's KYC when omitted.

Available options:
B2B,
B2C
purpose_code
string

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.

Example:

"S0802"

Response

Payment link created

success
boolean
required

Indicates if the request was successful

message
string
required

Response message

data
object
required