POST
/
collections
/
requestToPay
/
initiate
cURL
curl -X POST "https://dev.api.onekhusa.com/sandbox/v1/collections/requestToPay/initiate" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "Accept-Language: en" \
  -d '{
    "merchantAccountNumber": 12345678,
    "transactionAmount": "8375000.00",
    "transactionDescription": "Samsung 85inch TV purchase",
    "referenceNumber": "1020XDFS76GS777",
    "capturedBy": "username@example.com"
  }'
{
  "merchantAccountNumber": 12345678,
  "timedAccountNumber": "11005533",
  "expiryDate": "2026-01-05T10:01:56.412Z",
  "expiryInMinutes": 15
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your access token.

Headers

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
merchantAccountNumber
integer
required

An active account number for the merchant registered on OneKhusa for accepting payments.

Example:

12345678

transactionAmount
string
required

The total transaction (checkout) amount the customer is supposed to pay, and this is created by the merchant system.

Example:

"8375000.00"

transactionDescription
string
required

The description generated by the merchant system for the service/product(s) purchased by the customer.

Example:

"Samsung 85inch TV purchase"

referenceNumber
string
required

The unique reference number generated by the merchant system to easily identify and reconcile a request-to-pay transaction through webhook. The allowed alpha-numeric characters is a range of 5 to 25.

Required string length: 5 - 25
Example:

"1020XDFS76GS777"

capturedBy
string<email>
required

The background user registered under the merchant account being used, initiated on behalf of a customer.

Example:

"username@example.com"

Response

200 - application/json

Success Response (200)

merchantAccountNumber
integer
required

An account number for the merchant used for initiating a request-to-pay transaction.

Example:

12345678

timedAccountNumber
string
required

A random and unique temporary (short-lived) account number tied to an initiated request-to-pay transaction. This account number will always start with "1".

Example:

"11005533"

expiryDate
string<date-time>
required

The time assigned to TAN to expire.

Example:

"2026-01-05T10:01:56.412Z"

expiryInMinutes
integer
required

Number of minutes TAN will expire after creation.

Example:

15