Skip to main content
POST
/
payment-link
/
generate
Generate Payment Link
curl --request POST \
  --url https://sandbox.omnispay.com/api/payment-link/generate \
  --header 'Content-Type: application/json' \
  --header 'Time-Zone: <time-zone>' \
  --header 'X-HMAC-Signature: <api-key>' \
  --header 'accountId: <api-key>' \
  --header 'apiKey: <api-key>' \
  --data '{
  "FullName": "John Doe",
  "Address": "123 Street, City, Country",
  "City": "Dubai",
  "Country": "UAE",
  "Email": "user@example.com",
  "Phone": "+971501234567",
  "invoiceAmount": 100.5,
  "notes": "Payment for order #12345",
  "isTermsAndConditionsAccepted": true,
  "currency": "AED",
  "Is_QR_needed": true,
  "Is_invoice_generated": true,
  "expiryOn": "2023-11-07T05:31:56Z",
  "Invoice_Id": "INV123456",
  "Product_Id": "<string>",
  "callback_url": "https://example.com/callback"
}'
{
  "status": "<string>",
  "message": "<string>",
  "response": {}
}

Generate Payment Link

This endpoint allows merchants to generate a payment link with customer-specific details such as name, amount, and notes.

Request Body

  • FullName (string, required): The full name of the customer. Must be between 2 to 50 characters and match the pattern [a-zA-Z./' ]+.
  • Email (string, required): The email address of the customer. Must be between 3 to 45 characters.
  • Phone (string, required): The phone number of the customer.
  • invoiceAmount (number, required): The amount for the payment, should be equal to or greater than 10.
  • notes (string, required): Any additional information or description for the payment.
  • isTermsAndConditionsAccepted (boolean, required): Whether the customer accepts the terms and conditions.
  • currency (string, optional): The currency for the payment, must be “AED”.
  • expiryOn (string, required): The expiry date of the payment link in yyyy-MM-dd HH:mm:ss format AND recommended expiry date should be 30 days from the payment link generation date.
  • Is_QR_needed (boolean, required): Whether a QR code is needed.
  • Is_invoice_generated (boolean, required): Whether an invoice is generated.
  • Address (string, optional): The address of the customer.
  • City (string, optional): The city of the customer.
  • Country (string, optional): The country of the customer.
  • Invoice_Id (string, optional): The unique ID of the invoice.
  • Product_Id (string, optional): The unique ID of the product.
  • callback_url (string, optional): The callback URL for payment updates.

Example Request

{
  "FullName": "John Doe",
  "Email": "john.doe@example.com",
  "Phone": "1234567890",
  "invoiceAmount": 50.00,
  "notes": "Payment for services rendered",
  "isTermsAndConditionsAccepted": true,
  "currency": "AED",
  "expiryOn": "2025-03-01 12:00:00",
  "Is_QR_needed": true,
  "Is_invoice_generated": true,
  "Address": "123 Main Street",
  "City": "Dubai",
  "Country": "UAE",
  "Invoice_Id": "INV123456",
  "Product_Id": "PROD7890",
  "callback_url": "https://example.com/callback"
}

Authorizations

apiKey
string
header
required
X-HMAC-Signature
string
header
required
accountId
string
header
required

Headers

Time-Zone
string
required
User-Agent
string

Body

application/json

Request payload for generating payment link

FullName
string
required

User's full name (only alphabets, dot, slash, apostrophe, and space allowed)

Required string length: 2 - 50
Example:

"John Doe"

Email
string
required

User email address

Required string length: 3 - 60
Example:

"user@example.com"

Phone
string
required

User phone number

Example:

"+971501234567"

invoiceAmount
number
required

Invoice amount (minimum 10)

Required range: x >= 10
Example:

100.5

notes
string
required

Notes related to payment

Required string length: 2 - 150
Example:

"Payment for order #12345"

isTermsAndConditionsAccepted
boolean
required

Must be true to accept terms and conditions

Example:

true

Is_QR_needed
boolean
required

Specify if a QR code is required

Example:

true

Is_invoice_generated
boolean
required

Specify if an invoice should be generated

Example:

true

expiryOn
string<date-time>
required

Expiry date of the payment link

Address
string

User's address

Example:

"123 Street, City, Country"

City
string

City name

Example:

"Dubai"

Country
string

Country name

Example:

"UAE"

currency
string

Currency (only AED is allowed)

Example:

"AED"

Invoice_Id
string

Invoice ID

Example:

"INV123456"

Product_Id
string

Product ID

callback_url
string

Callback URL for payment notifications

Example:

"https://example.com/callback"

Response

OK. Payment link generated successfully

status
string
message
string
response
object