PayOrc
Payment Link

Update Payment Link

Update an existing payment link with new amount, expiry, quantity limits, or customer details.

Version: 3.0.0

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

Update an existing payment link's configuration — adjust the amount, set or change expiry, update quantity limits, modify customer details, or toggle split bill and tip options. Use the data_id returned from the create endpoint to identify the link.

Only active payment links can be updated. If a link has expired or been completed, create a new one instead.

Endpoint

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

Please use the test credentials for sandbox testing.

Authentication

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

Request Body

FieldTypeRequiredDescription
data_idStringYesData ID of the payment link to update
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)

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 on update. Omit it to leave existing URLs unchanged. Include it to replace the stored redirect and webhook URLs for this link.

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). Must use HTTPS (localhost allowed for testing)

Response (200 OK)

FieldTypeDescription
qr_codeStringQR code as a base64 image
linkStringUpdated payment link URL
messageStringResponse message
statusStringResponse status
codeStringResponse code (00 on success)

Code Examples

curl -X POST https://api.payorc.com/payment-links/v1/update \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "lnk_8x7kP2mN4qR",
    "amount": {
      "currency": "USD",
      "value": 7999
    },
    "description": "Updated product price",
    "shipping_fee": 750,
    "convenience_fee": 150,
    "no_quantity_per_transaction": "10",
    "no_of_transactions_per_user": {
      "no_limit": "no",
      "quantity": 5,
      "frequency": "per_month"
    },
    "total_quantity_allowed": {
      "no_limit": "no",
      "quantity": 1000,
      "frequency": "till_expiry"
    },
    "link_expiry": {
      "end_date": "2026-12-31",
      "is_expiry": "yes"
    },
    "customer_name": "Jane Smith",
    "customer_email": "[email protected]",
    "product_details": "Wireless Bluetooth Headphones Pro",
    "m_order_id": "ORD-2026-002",
    "m_customer_id": "CUST-456",
    "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

{
  "qr_code": "data:image/png;base64,...",
  "link": "https://checkout.payorc.com/checkout/qr/65b20e7974234cffb37ce9c199e3ab4d",
  "message": "Payment link updated successfully",
  "status": "success",
  "code": "00"
}

Error Response

{
  "error": {
    "message": "Payment link not found",
    "code": "404"
  }
}

On this page