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.

Response

  • 200 OK: payment_id, status, redirect_url, transaction_params

  • 4xx/5xx on error

Headers

ParameterTypeDescription
Content-Typestring

Example: application/json

X-API-KeyRequiredstring

Static API key for Express Shipping (required)

Example: {{api_key}}

Body parameters

ParameterTypeDescription
order_idRequiredstring

(string, required): your package order_id

order_descOptionalstring—
back_refRequiredstring

(string, required): where to redirect user after payment (must be http/https)

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/pay" \2  --header "Content-Type: application/json" \3  --header "X-API-Key: ${ONDI_TENANT_API_KEY}" \4  --data-raw '{5  "order_id": "ORDER-123",6  "order_desc": "Express shipping payment",7  "back_ref": "https://app.example.com/payment/return"8}'

Response examples

200OK
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}

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.

Response

  • 200 OK: payment_id, order_id, status, paid, amount, currency, rrn, response_code, status_msg, timestamp

  • 4xx/5xx on error

Headers

ParameterTypeDescription
Content-Typestring

Example: application/json

X-API-KeyRequiredstring

Static API key for Express Shipping (required)

Example: {{api_key}}

Body parameters

ParameterTypeDescription
order_idRequiredstring

(string, required): NASS ORDER returned in transactionParams.ORDER

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/pay/status" \2  --header "Content-Type: application/json" \3  --header "X-API-Key: ${ONDI_TENANT_API_KEY}" \4  --data-raw '{5  "order_id": "1234567890123456"6}'

Response examples

200OK
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}