Skip to main content

Payment

2 API calls in this section.

Pay For Package

Express Shipping / Payment
POST/express-shipping/pay

Initiates a NASS payment for an express shipping package. Requires tenant context. Request Body: - order_id (string, required): your package order_id - order_desc (string, optional) - back_ref (string, required): where to redirect user after payment (must be http/https) Response: - 200 OK: payment_id, status, redirect_url, transaction_params - 4xx/5xx on error

Send the tenant API key in X-APIKey or X-API-Key after the key is created and approved.
Request
curl
1curl --request POST "$ONDI_BASE_URL/express-shipping/pay" \2  --header "Content-Type: application/json" \3  --header "X-API-Key: {{api_key}}" \4  --header "Content-Type: application/json" \5  --data '{6  "order_id": "ORDER-123",7  "order_desc": "Express shipping payment",8  "back_ref": "https://app.example.com/payment/return"9}'
Request body
json
1{2  "order_id": "ORDER-123",3  "order_desc": "Express shipping payment",4  "back_ref": "https://app.example.com/payment/return"5}

Request body fields

order_idExample
string

Example field from the request body.

order_descExample
string

Example field from the request body.

back_refExample
string

Example field from the request body.

Headers

Content-TypeOptional
header string

application/json

X-API-KeyOptional
header string

{{api_key}}

Static API key for Express Shipping (required)

Responses

Success - Payment Initiated200OK
Response body
json
1{2  "success": true,3  "data": {4    "payment_id": "pay-uuid-123",5    "status": "PENDING",6    "redirect_url": "https://nass.example/redirect",7    "transaction_params": {8      "AMOUNT": "1000",9      "CURRENCY": "368"10    }11  }12}
Error - Package Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Package not found"4}
Error - NASS Transaction Failed502Bad Gateway
Response body
json
1{2  "success": false,3  "message": "NASS transaction failed"4}

Check Payment Status

Express Shipping / Payment
POST/express-shipping/pay/status

Checks NASS transaction status by order_id (NASS ORDER). Updates the payment row and returns minimal status data. Request Body: - order_id (string, required): NASS ORDER returned in transactionParams.ORDER Response: - 200 OK: payment_id, order_id, status, paid, amount, currency, rrn, response_code, status_msg, timestamp - 4xx/5xx on error

Send the tenant API key in X-APIKey or X-API-Key after the key is created and approved.
Request
curl
1curl --request POST "$ONDI_BASE_URL/express-shipping/pay/status" \2  --header "Content-Type: application/json" \3  --header "X-API-Key: {{api_key}}" \4  --header "Content-Type: application/json" \5  --data '{6  "order_id": "1234567890123456"7}'
Request body
json
1{2  "order_id": "1234567890123456"3}

Request body fields

order_idExample
string

Example field from the request body.

Headers

Content-TypeOptional
header string

application/json

X-API-KeyOptional
header string

{{api_key}}

Static API key for Express Shipping (required)

Responses

Success - Status Checked200OK
Response body
json
1{2  "success": true,3  "data": {4    "payment_id": "pay-uuid-123",5    "order_id": "1234567890123456",6    "status": "SUCCESS",7    "paid": true,8    "amount": 5000,9    "currency": "IQD",10    "rrn": "505801383493",11    "response_code": "00",12    "status_msg": "Approved",13    "timestamp": "20250301104625"14  }15}
Error - Payment Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Payment not found"4}