PayOrc
Payment Link

Create Payment Link

Create shareable payment links with custom amounts, expiry, quantity limits, and customer details.

Version: 3.0.0

Generate an API Key for the Payment Link channel before making requests.

Payment links let you create shareable URLs that customers can use to make one-time payments. Configure the amount, expiry, quantity limits, and customer details to tailor each link to your use case — whether it's for donations, product sales, or service payments.

Payment links are one-time use by default. Each link generates a unique URL you can share via email, SMS, chat, or embed in your website.

Endpoint

MethodURL
POSThttps://api.payorc.com/payment-links/v1/add

Please use the test credentials for sandbox testing.

Authentication

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

Request Body

FieldTypeRequiredDescription
amountObjectYesAmount details
amount.currencyStringYesISO 4217 currency code (3 characters, e.g., USD, AED)
amount.valueNumberYesPayment amount (1 – 99999999)
descriptionStringYesDescription shown to the customer (max 100 characters)
error_msgStringYesCustom error message shown on validation failure (max 100 characters). Send an empty string if not needed
no_quantity_per_transactionNumberYesMaximum quantity per transaction (1 – 9999999)
shipping_feeNumberYesShipping fee (0 – 99999). Send an empty string for none
convenience_feeNumberYesConvenience fee (0 – 99999). Send an empty string for none
no_of_transactions_per_userObjectYesTransaction limits per user
no_of_transactions_per_user.no_limitStringYesyes for unlimited transactions per user, no to enforce a limit
no_of_transactions_per_user.quantityNumberConditionalRequired when no_limit is no (1 – 9999999)
no_of_transactions_per_user.frequencyStringYesFrequency: per_day, per_month, or till_expiry
total_quantity_allowedObjectYesTotal quantity limits across all users
total_quantity_allowed.no_limitStringYesyes for unlimited total quantity, no to enforce a limit
total_quantity_allowed.quantityNumberConditionalRequired when no_limit is no (1 – 9999999)
total_quantity_allowed.frequencyStringYesFrequency: per_day, per_month, or till_expiry
link_expiryObjectYesExpiry configuration
link_expiry.is_expiryStringYesyes to enable expiry, no to disable
link_expiry.end_dateStringConditionalRequired when is_expiry is yes. Format YYYY-MM-DD, today or later
customer_nameStringYesCustomer name in Firstname Lastname format (max 50 characters). Send an empty string if not needed
customer_emailStringYesCustomer email (max 50 characters). Send an empty string if not needed
product_detailsStringYesProduct or service details (max 200 characters). Send an empty string if not needed
split_billStringYes0 to disable split bill, 1 to enable
tipStringYes0 to disable tip, 1 to enable
m_order_idStringNoOrder ID provided by merchant (max 50 characters)
m_customer_idStringNoMerchant's customer ID (max 50 characters)
customer_mobileStringNoCustomer mobile number (digits only, optional leading +). When customer_mobile_code is supplied, the number length must match the digit length configured for that country code.
customer_mobile_codeStringNoMobile country dialing code (1-9 chars, e.g. 91). Must be a valid dialing code supported by PayOrc.
urlsObjectNoOptional redirect and webhook URLs — see URLs
urls.successStringNoURL to redirect after successful payment
urls.failureStringNoURL to redirect if payment fails
urls.cancelStringNoURL to redirect if customer cancels
urls.webhook_urlStringNoPer-order webhook URL (HTTPS). Used when a customer pays via this link

Fields marked Yes must be present in the request body. Where noted, you may send an empty string ("") to leave the value blank.

URLs

The urls object is optional. Omit it entirely if you do not need custom redirect or webhook URLs.

FieldTypeRequiredDescription
successStringNoURL to redirect after successful payment
failureStringNoURL to redirect if payment fails
cancelStringNoURL to redirect if customer cancels
webhook_urlStringNoPer-order webhook URL (HTTPS). Overrides dashboard webhook for orders created from this link

When a customer opens the payment link and pays, these URLs are copied to the order. Redirect URLs fall back to MID defaults when empty. webhook_url must use HTTPS (localhost is allowed for testing).

Response (200 OK)

FieldTypeDescription
data_idStringData ID of the payment link, used for update, details, activate, and deactivate
link_idStringHuman-readable link reference number
qr_codeStringQR code as a base64 image
linkStringPayment link URL
messageStringResponse message
statusStringResponse status
codeStringResponse code (00 on success)

Code Examples

curl -X POST https://api.payorc.com/payment-links/v1/add \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "amount": {
      "currency": "USD",
      "value": 4999
    },
    "description": "Wireless Headphones",
    "shipping_fee": 500,
    "convenience_fee": 100,
    "no_quantity_per_transaction": "5",
    "no_of_transactions_per_user": {
      "no_limit": "no",
      "quantity": 3,
      "frequency": "per_month"
    },
    "total_quantity_allowed": {
      "no_limit": "no",
      "quantity": 500,
      "frequency": "till_expiry"
    },
    "link_expiry": {
      "end_date": "2026-12-31",
      "is_expiry": "yes"
    },
    "customer_name": "Jane Doe",
    "customer_email": "[email protected]",
    "product_details": "Wireless Bluetooth Headphones",
    "m_order_id": "ORD-2026-001",
    "m_customer_id": "CUST-123",
    "customer_mobile": "9876543210",
    "customer_mobile_code": "91",
    "split_bill": "1",
    "tip": "1",
    "urls": {
      "success": "https://merchant.example.com/success",
      "failure": "https://merchant.example.com/failure",
      "cancel": "https://merchant.example.com/cancel",
      "webhook_url": "https://merchant.example.com/webhook"
    },
    "error_msg": "Invalid request"
  }'

Example Response

{
  "data_id": "6a1d4f160b1b43999539e9ad1cc9565d",
  "link_id": "0000002058",
  "qr_code": "data:image/png;base64,...",
  "link": "https://checkout.payorc.com/checkout/qr/6a1d4f160b1b43999539e9ad1cc9565d",
  "message": "Payment link generated successfully",
  "status": "success",
  "code": "00"
}

Expired payment links cannot be reactivated. Create a new link if the previous one has expired.


The list endpoint returns a final_status field that reflects the link's overall lifecycle state:

StatusDescription
ActiveLink is live and can accept payments
ExpiredLink has passed its expiry date
DeactivatedLink was manually deactivated

The list response also includes status (Active / Deactivated) and expiry_status (Expired / Not Expired / No expiry date). The details response returns status as Activated or Deactivated.

On this page