PayOrc
Payment Link

Bulk Upload

Create multiple payment links at once by uploading an Excel or CSV file.

Version: 3.0.0

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

Bulk upload lets you create multiple payment links in a single request by uploading an Excel or CSV file. This is useful when you need to generate a large number of links for campaigns, product launches, or batch customer billing.

Each row in the file creates one payment link. Validation is all-or-nothing: if any row fails validation, the entire batch is rejected and no links are created.

Endpoint

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

Authentication

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

Request Body (multipart/form-data)

FieldTypeRequiredDescription
payment_link_fileFileYesExcel (.xlsx) file containing payment link details (max 2 MB)

Only .xlsx files are accepted (max 2 MB). The file must use the exact column headers described below. Rows with missing required fields or invalid data will cause the entire upload to fail.

File Format

The upload file must use the following column headers (exact spelling and casing):

ColumnTypeRequiredDescription
CurrencyStringYesISO 4217 currency code (e.g., USD, AED, SAR)
AmountNumberYesPayment amount (1 – 99999999)
Shipping FeeNumberYesShipping fee (0 – 99999)
Convenience FeeNumberYesConvenience fee (0 – 99999)
Qty Per TransactionNumberYesMaximum quantity per transaction (1 – 9999999)
No Of TransactionsNumberYesNumber of transactions allowed per user (1 – 9999999)
No Limit Per UserStringNo1 for unlimited transactions per user, 0 otherwise (defaults to 0)
Total CollectionStringYesPer-user frequency: per_day, per_month, or till_expiry
Overall Qty AllowedNumberYesOverall quantity allowed (1 – 9999999)
No Limit Over AllStringNo1 for unlimited overall quantity, 0 otherwise (defaults to 0)
Qty FrequencyStringYesOverall frequency: per_day, per_month, or till_expiry
Is ExpiryNumberYes1 to enable expiry, 0 to disable
End DateStringConditionalRequired when Is Expiry is 1. Format YYYY-MM-DD, today or later
DescriptionStringNoDescription shown to the customer (max 100 characters)
Error MessageStringNoCustom error message on validation failure (max 100 characters)
Customer NameStringNoCustomer name in Firstname Lastname format (max 50 characters)
Customer EmailStringNoCustomer email (max 50 characters)
Product DetailsStringNoProduct or service details (max 200 characters)
Split PaymentStringNo0 to disable split payment, 1 to enable (defaults to 0)
TipStringNo0 to disable tip, 1 to enable (forced to 0 unless Split Payment is 1)

Code Examples

curl -X POST https://api.payorc.com/payment-links/v1/bulk-upload \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -F "payment_link_file=@/path/to/payment-links.xlsx"

Response — Success (200)

{
  "data": {
    "total_records": 1,
    "links_created": 1,
    "links_failed": 0,
    "links": [
      {
        "payment_link": "https://checkout.payorc.com/checkout/qr/6a1d4f160b1b43999539e9ad1cc9565d",
        "qr_id": "6a1d4f160b1b43999539e9ad1cc9565d",
        "link_id": "0000002058",
        "amount": 100,
        "currency": "AED"
      }
    ]
  },
  "message": "Bulk payment links processed",
  "status": "success",
  "code": "00"
}

Response Fields

FieldTypeDescription
statusStringResponse status
messageStringResponse message
codeStringResponse code
dataObjectBulk upload result
data.total_recordsNumberTotal rows processed from the file
data.links_createdNumberNumber of payment links created
data.links_failedNumberNumber of rows that failed
data.uploaded_file_urlStringURL of the uploaded file
data.linksArrayList of created payment links
data.links[].payment_linkStringPayment link URL
data.links[].qr_idStringQR code identifier
data.links[].link_idStringUnique link ID
data.links[].amountNumberPayment amount
data.links[].currencyStringISO 4217 currency code
data.failed_rowsArrayRows that failed during creation (present only when links_failed > 0)

Response — Error (4xx)

{
  "status": "fail",
  "message": "Invalid file format. Expected .xlsx or .csv",
  "code": "E0035"
}

All rows must pass validation before any links are created. If a row fails while links are being created (for example, a database error), it is reported in failed_rows and successfully created links are not rolled back.

Example Column Layout

The first row of the .xlsx file must contain these exact headers. Each subsequent row creates one payment link:

CurrencyAmountShipping FeeConvenience FeeQty Per TransactionNo Of TransactionsNo Limit Per UserTotal CollectionOverall Qty AllowedNo Limit Over AllQty FrequencyIs ExpiryEnd DateDescriptionError MessageCustomer NameCustomer EmailProduct DetailsSplit PaymentTip
AED1005020930per_day100per_day12026-12-31Wireless HeadphonesError messageJohn Doe[email protected]Product description00

On this page