The Payment Company Logo

PaymentLink

Payment Link API

The Payment Link API generates encrypted payment links with optional fields such as amount, currency, expiry date, and terminal. The endpoint returns a secure URL for payment completion.

SectionPaymentLink
Topics05
PathpaymentLink / paymentLinkApi

API Endpoint

POSThttps://api.thepayment.company/api/v1/payment-link

Request Body Fields

ParameterTypeRequiredDescription
payment_template_idStringYesID of the payment template used for the link. *
amountNumberNoPayment amount.
currencyStringNoCurrency code, for example USD or INR.
expiry_dateStringNoExpiry date in yyyy-mm-dd format.
terminal_idStringNoTerminal ID used to route the transaction through a specific connector. *
order_idStringNoMerchant-side unique order reference.

Note: Do not send fields marked with * (payment_template_id and terminal_id) when using a Test key.


Headers

Header NameDescription
Content-TypeSet to application/json.
AuthorizationBearer token (your Secret key or Test key).

Environment Rules

The API response behavior depends on the key used in the Authorization header:

  • If a Test key is used, the API generates a test payment link.
  • If a Live key is used, the API generates a live payment link.

This behavior supports integration validation prior to production deployment.


Sample Responses

{
"message": "Payment link created successfully.",
"data": "https://portal.thepayment.company/pay/PAY_LINK_88331144264007292"
}

On this page