1
Send a code
KetaPay sends a one-time code to the customer’s email, or to their phone (WhatsApp, falling back to SMS).
2
Verify it
Your UI collects the code and your server exchanges it for a token.
3
Use it
Send it with your secret key. The libraries put it in the
KetaPay-Customer-Token header.Rules
- A token is valid for 15 minutes, only for escrows where that person is the buyer or the seller, and only with the secret key that created it.
- KetaPay checks the role: only the buyer releases, only the seller delivers. Anyone else gets
403 customer_not_allowed. - Wrong codes return
code_invalid; after too many tries,too_many_attempts. Codes expire (code_expired). - In the sandbox no code is sent and every code is
123456.