Pine LabsDOCS

Create a Payment Link

POST/api/pay/v1/paymentlink

Create a payment link for collecting payments. Ensure that your Merchant ID is configured for Pay by Link, split payments, and pre-authorization before creating a payment link.

Requires Bearer token. Get token →

Header Parameters

FieldDetails
Request-Timestamp
stringdate-time

ISO 8601 UTC timestamp of the request. Used for idempotency and audit.

Request-ID
string

Use a global unique identifier [GUID] for the request.

Constraints
Minimum length: 1 characterMaximum length: 50 characters

Request Bodyrequired

FieldDetails
amount
objectrequired2 nested fields

Monetary amount with currency.

description
string

Description corresponding to the payment.

expire_by
stringdate-time

The desired expiration timestamp for the payment link (ISO 8601 UTC). Must be set within a maximum of 180 days from the current date.

allowed_payment_methods
string[]

The type of payment methods you want to offer your customers.

Constraints
Allowed item values:
CARDUPIPOINTSNETBANKINGWALLETCREDIT_EMIDEBIT_EMIBNPL
pre_auth
string

The pre-authorization type. Possible values: "false" (default), "true".

is_mcc_transaction
string

Identifies the Payment Link type. "true": The payment link is processed for a MCC transaction. "false" (default): The payment link is processed for a regular transaction.

failure_callback_url
string

URL specifically used to redirect customers to a failure page. If not provided, customers will be redirected to the callback_url for both successful and failed transactions.

merchant_payment_link_reference
stringrequired

Idempotency Key. Unique identifier for the payment link request. Duplicate requests with the same merchant_payment_link_reference will return the existing payment link instead of creating a new one.

Constraints
Minimum length: 1 characterMaximum length: 50 characters
customer
object10 nested fields

Customer information for payment link.

product_details
PaymentLinkProductDetail[]3 nested fields

An array of objects that contains the list of products associated with the payment.

cart_coupon_discount_amount
object2 nested fields

Monetary amount with currency.

merchant_metadata
object

Arbitrary key-value pairs for merchant use. Maximum 10 pairs, 256 characters each.

Constraints
Maximum properties: 10
Additional properties: string · Maximum length: 256 characters
split_info
object2 nested fields

Split settlement information.

account_details
object1 nested field

Customer's bank account details.

callback_url
string

URL to which your customers are redirected based on the order or product details, leading them to either a success or failure page.

part_payment
boolean

Indicates whether the order is for part payments or full. true: The order created is for a part payment. false: The order is created for a full payment.

cart_details
object1 nested field

Cart details. If provided, cart information will be displayed during checkout.

Status Codes

201Payment link created successfully.
500An unexpected error occurred on the server.
Run
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/api/pay/v1/paymentlink \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
  --data '{
  "amount": {
    "value": 50000,
    "currency": "INR"
  },
  "description": "Payment for Order1",
  "expire_by": "2024-10-28T13:26:06.909140Z",
  "allowed_payment_methods": [
    "CARD",
    "UPI"
  ],
  "pre_auth": "false",
  "is_mcc_transaction": "false",
  "failure_callback_url": "https://sample-failure-callback-url",
  "merchant_payment_link_reference": "1234567890",
  "customer": {
    "email_id": "kevin.bob@example.com",
    "first_name": "Kevin",
    "last_name": "Bob",
    "customer_id": "123456",
    "mobile_number": "9876543210",
    "country_code": "91",
    "billing_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "shipping_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "merchant_customer_reference": "customer_reference",
    "gstin": "27AAEPM1234C1Z5"
  },
  "product_details": [
    {
      "product_code": "redmi_10",
      "product_amount": {
        "value": 50000,
        "currency": "INR"
      },
      "product_coupon_discount_amount": {
        "value": 50000,
        "currency": "INR"
      }
    }
  ],
  "cart_coupon_discount_amount": {
    "value": 50000,
    "currency": "INR"
  },
  "merchant_metadata": {
    "clientId": "DD",
    "transactionReferenceNo": "pine-1223",
    "merchantId": "1234",
    "tid": "9000990",
    "acquirerName": "HDFC_FSS",
    "isOfferDisplayRequired": "true",
    "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
    "tenant_id": "PGATPOS",
    "is_offer_validation_required": "true"
  },
  "split_info": {
    "split_type": "AMOUNT",
    "split_details": [
      {
        "split_merchant_id": "111302",
        "merchant_settlement_reference": "5206071124-aa-mpLhF3-cc-l",
        "split_settlement_id": "71124-aa-mpLhF3-cc-l",
        "amount": {
          "value": 50000,
          "currency": "INR"
        },
        "on_hold": true,
        "status": "RELEASED",
        "updated_at": "2024-07-09T07:57:08.022Z"
      }
    ]
  },
  "account_details": {
    "bank_details": {
      "account_number": "500000004545",
      "ifsc_code": "BANK0000123",
      "bank_name": "Example Bank"
    }
  },
  "callback_url": "https://sample-callback-url",
  "part_payment": true,
  "cart_details": {
    "items": [
      {
        "product_code": "xyz",
        "product_amount": {
          "value": 50000,
          "currency": "INR"
        }
      }
    ]
  }
}'
{
  "payment_link": "https://shortener.v2.pinepg.in/PLUTUS/3rh4jtd",
  "payment_link_id": "pl-v1-250306082755-aa-uT0noy",
  "status": "CREATED",
  "amount": {
    "value": 50000,
    "currency": "INR"
  },
  "amount_due": {
    "value": 50000,
    "currency": "INR"
  },
  "order_id": "v1-250131113650-aa-TUzeRY",
  "merchant_payment_link_reference": "link_ref",
  "description": "Order Payment Link",
  "expire_by": "2024-04-30T08:01:32Z",
  "allowed_payment_methods": [
    "NETBANKING"
  ],
  "pre_auth": false,
  "failure_callback_url": null,
  "is_mcc_transaction": true,
  "customer": {
    "email_id": "kevin.bob@example.com",
    "first_name": "Kevin",
    "last_name": "Bob",
    "customer_id": "123456",
    "mobile_number": "9876543210",
    "country_code": "91",
    "billing_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "shipping_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "merchant_customer_reference": "customer_reference",
    "gstin": "27AAEPM1234C1Z5"
  },
  "product_details": [
    {
      "product_code": "redmi_10",
      "product_amount": {
        "value": 50000,
        "currency": "INR"
      },
      "product_coupon_discount_amount": {
        "value": 50000,
        "currency": "INR"
      }
    }
  ],
  "split_info": {
    "split_type": "AMOUNT",
    "split_details": [
      {
        "split_merchant_id": "111302",
        "merchant_settlement_reference": "5206071124-aa-mpLhF3-cc-l",
        "split_settlement_id": "71124-aa-mpLhF3-cc-l",
        "amount": {
          "value": 50000,
          "currency": "INR"
        },
        "on_hold": true,
        "status": "RELEASED",
        "updated_at": "2024-07-09T07:57:08.022Z"
      }
    ]
  },
  "account_details": {
    "bank_details": {
      "account_number": "500000004545",
      "ifsc_code": "BANK0000123",
      "bank_name": "Example Bank"
    }
  },
  "cart_coupon_discount_amount": {
    "value": 50000,
    "currency": "INR"
  },
  "merchant_metadata": {
    "clientId": "DD",
    "transactionReferenceNo": "pine-1223",
    "merchantId": "1234",
    "tid": "9000990",
    "acquirerName": "HDFC_FSS",
    "isOfferDisplayRequired": "true",
    "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
    "tenant_id": "PGATPOS",
    "is_offer_validation_required": "true"
  },
  "created_at": "2024-07-09T07:57:08.022Z",
  "updated_at": "2024-07-09T07:57:08.022Z"
}