Skip to content

Order Creation

An order must be created for each payment transaction to ensure secure and valid processing. This order will have a unique orderId, which must be passed to the transaction initiation process to verify and secure the transaction request, preventing tampering or unauthorized modifications.

Example Payload
{
"amount": 100,
"currency": "OMR",
"description": "Test Purchase",
"customerFields": {
"name": "Jhon Doe",
"email": "johndoe@example.com",
"phone": "1234567890"
},
"uiMode": "checkout"
}
Parameter Mandatory Description Type Example
amount Yes The total amount of the transaction in the specified currency (up to 2 decimals) Numeric 500.00
currency Yes The currency used for the transaction String "OMR"
uiMode Yes UI mode for the transaction String "checkout"
receiptId No Unique identifier for the transaction (up to 40 characters) String 57Kr4ec2qdQMLJ0QVFYZnu1N5y49x0CZz5PlHhp
description No Additional information or notes regarding the transaction String Sample Transactions
phone Yes Customer’s phone number (part of customerFields) String 9912364456
email Yes Customer’s email address (part of customerFields) String example@gmail.com
name Yes Customer’s name (part of customerFields) String Jhon Doe
Example Request
curl -X POST '{{baseUrl}}/order' \
--header 'Authorization: Basic <base64-encoded-clientId:clientSecret>' \
--header 'Content-Type: application/json' \
--header 'X-Signature: <generated_signature>' \
--header 'X-MERCHANT-BROWSER-FINGERPRINT: 8357426ac73fcd60b17355ab7de60421' \
--header 'X-MERCHANT-USER-AGENT: <user-agent>' \
--header 'X-MERCHANT-DOMAIN: https://www.xyz.com' \
--header 'X-MERCHANT-IP: 123.123.123.123' \
--data-raw '{
"amount": 100,
"currency": "OMR",
"description": "Test Purchase",
"customerFields": {
"name": "Jhon Doe",
"email": "johndoe@example.com",
"phone": "1234567890"
},
"uiMode": "checkout"
}'
Success Response
{
"resCode": 200,
"status": "success",
"data": {
"orderId": "wb-70c20048-9dc8-4fc3-858e-0a3a5c742190",
"receiptId": "R12345678910",
"amount": 100,
"currency": "OMR"
}
}
ResCode Status Description
422 failure Incorrect UI Mode
401 failure Missing Authorization header
401 failure Invalid or inactive client credentials
401 failure Internal Server Error