Learn how to create middlewares for Terminals
Scenario | Action Type | Mode |
---|---|---|
Payout | pre-payout-auth | Synchronous |
Balance Check | pre-balance-check-auth | Synchronous |
pre-payout-auth
: Triggered when a user is about to initiate a payout transaction, immediately after the terminal requests a PIN. This allows you to validate the transaction, apply rules, or reject it before processing.Payout Transaction Flow (pre-payout-auth)
pre-balance-check-auth
: Triggered when a user attempts to check their wallet or account balance. This provides an opportunity to authorize or restrict access based on custom logic.Balance Check Flow (pre-balance-check-auth)
reasonCode
that indicates the outcome of your custom logic and guides the terminal on what to do next.
These codes help standardize system responses, making them easy to interpret programmatically.
reasonCode
?reasonCode
is a status flag returned in your response to indicate whether the transaction should proceed or not, and why It is paired with shouldActionProceed: true/false
to clearly guide the terminal’s next step.
Code | Meaning | Description |
---|---|---|
00 | SUCCESS | The action passed all checks — proceed with the transaction. |
01 | FAILED | A generic failure occurred — stop the transaction. |
02 | BLACKLISTED | The terminal or customer is blacklisted and cannot perform this action. |
03 | TERMINAL_NOT_FOUND | The terminal making the request does not exist in your system. |
04 | ACCOUNT_NOT_FOUND | The associated account could not be located. |
05 | INVALID_PIN | The PIN provided is incorrect or unauthorized. |
06 | LIMIT_EXCEEDED | The transaction amount exceeds the allowable limit. |
07 | INSUFFICIENT_BALANCE | The account does not have enough funds to complete the transaction. |