Loading…
arrow_backMerchant API Reference

Errors

For validation/business failures on /vend, return success: false with a clear message (and, where it helps, an error_code):

{ "success": false, "message": "Incorrect PIN", "error_code": "invalid_pin" }

error_code: "invalid_pin" lets WhatsApp offer the customer another PIN attempt (on /wallet-transfer too). error_code: "account_not_found" tells us the payer has no account, so we offer them the sign-up above (implement /register for this; without it we just report no account). Any other failure ends the transaction with your message. For unexpected failures, return HTTP 4xx/5xx with a JSON body:

{ "error": { "message": "Meter is inactive" } }

We surface message / error.message to the customer; never leak internal details.