Skip to main content
POST
/
pg
/
payment-links
Create Payment Link
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": 123,
  "reference_id": "<string>",
  "buyer": {
    "name": "<string>",
    "email": "[email protected]",
    "phone": "<string>",
    "address": {
      "line_1": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal_code": "<string>",
      "line_2": "<string>"
    },
    "send_sms": false,
    "send_email": false
  },
  "product": {
    "name": "<string>",
    "type_of_goods": "physical_goods",
    "description": "<string>",
    "hs_code": "<string>",
    "hs_code_description": "<string>"
  },
  "invoice": {
    "number": "<string>"
  },
  "expiry_date": "2023-11-07T05:31:56Z"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "payment_id": "<string>",
    "payment_link": "<string>",
    "amount": "<string>",
    "currency": "<string>"
  }
}

Overview

The Create Payment Link endpoint allows you to generate a unique URL that you can share with your customers to collect payments. This is ideal for businesses that don’t have a full website integration or want to collect payments via chat, email, or SMS.

Key Features

  • Customizable Expiry: Set how long the link remains valid.
  • Buyer Information: Pre-fill buyer details to simplify their checkout experience.
  • Product Details: Include what the payment is for.
  • Instant Sharing: Get a link that can be shared immediately.

Request Parameters

The request body follows the same structure as the Create Order API, but it’s specifically optimized for generating shareable links.

Required Fields

  • amount: The amount to collect.
  • currency: Currently supports INR.
  • reference_id: Your internal reference for this payment.
  • buyer: Customer details (name, email, phone, address).
  • product: Details of the item or service.
  • invoice: Invoice number and date.

Optional Fields

  • expiry_date: When the link should expire (ISO 8601 format). Defaults to 1 year if not provided.

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' or '2.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
amount
number<float>
required
reference_id
string
required

Unique identifier for the order

buyer
object
required
product
object
required
invoice
object
required
expiry_date
string<date-time>

Expiry date in UTC

Response

Payment link created successfully

success
boolean
message
string
data
object