POST /v1/transactions/bank-cashout/inquiryPOST /v1/transactions/bank-cashout/initiatePOST /v1/transactions/bank-cashout/completehttps://api.dev.pynil.com/v1.Authorization: Basic <BASE64(username:password)>X-Signature: <HMAC_SHA256_UPPERCASE_HEX>X-Timestamp: <UNIX_TIMESTAMP_SECONDS>Content-Type: application/jsonHTTP_METHOD + "\n" + REQUEST_PATH + "\n" + UNIX_TIMESTAMP/v1/transactions/bank-cashout/inquiryPOST /v1/transactions/bank-cashout/inquiry{
"walletNumber": "101000001",
"amount": 100,
"timestamp": "2026-01-08",
"notes": "Test request"
}walletNumber, amounttimestamp, notes{
"success": true,
"message": "Success.",
"statusCode": 200,
"data": {
"wallet": {
"branchCode": "MAIN",
"currencyCode": "SDG",
"walletName": "Marwa Omar",
"status": "Active"
},
"charges": [
{
"name": "Custody Cashout",
"amount": 20.0
}
],
"totalFees": 20.0
}
}400: validation error or Insufficient funds404: Wallet account not foundPOST /v1/transactions/bank-cashout/initiate{
"walletNumber": "101000001",
"amount": 100,
"timestamp": "2026-01-08",
"notes": "Test request"
}walletNumber, amounttimestamp, notes{
"success": true,
"message": "OTP sent successfully",
"statusCode": 200,
"data": {
"nilpayTranRef": "333"
}
}400/404/500) plus OTP delivery failures.POST /v1/transactions/bank-cashout/complete{
"transactionRef": "333",
"otp": "1632",
"bankReference": "BANK-41128"
}transactionRef, otp, bankReferenceotp must be exactly 4 digits.bankReference max length is 100 chars.{
"success": true,
"message": "Transaction was Completed successfully.",
"statusCode": 200,
"data": {
"transactionId": "333-1",
"reference": 333,
"date": "2026-02-03",
"direction": "Debit",
"amount": 100.0,
"description": "Bank Cashout - Marwa Omar"
}
}{
"success": false,
"message": "The transaction has already been completed",
"statusCode": 400,
"data": null
}{
"success": false,
"message": "Invalid or Wrong OTP",
"statusCode": 400,
"data": null
}{
"success": false,
"message": "OTP has expired, please request a new one",
"statusCode": 400,
"data": null
}{
"success": false,
"message": "The transaction was not found",
"statusCode": 404,
"data": null
}401 from HMAC/auth filters returns ProblemDetails style:{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid signature"
}| HTTP Code | Error Type | Description | Action Required |
|---|---|---|---|
| 400 | Validation / Business Rule Error | Invalid request, insufficient funds, OTP or state errors | Fix request/OTP/state and retry |
| 401 | Authentication Failed | Invalid Basic Auth, signature, timestamp, or replay validation | Verify credentials, signature payload, and timestamp |
| 404 | Not Found | Wallet, bank wallet, or transaction not found | Verify identifiers |
| 500 | Internal Server Error | Unrecoverable server error | Retry later and contact support if persistent |