Quickstart
This flow creates a sandbox user, verifies OTP, logs in, and calls an authenticated endpoint.
Sandbox Plane A auth is tenant-scoped. POST /auth/otp/issue, POST /auth/otp/verify, POST /auth/register, and POST /auth/login all require businessEntityId. The sandbox deployment id documented in the sandbox manifest and mobile brand config is heritagepay. Other programmes must use the id issued in Partner Console / Plane B — do not invent a tenant id.
1. Read country metadata
Code
Use the returned phone prefix, formatting rules, and operator catalog to validate the user input before issuing OTP.
2. Issue OTP
Live POST /auth/otp/issue requires phone, businessEntityId, and channel: "sms". purpose is also required (register, login, or reset_pin). A body of {phone, purpose} returns 400.
Code
A 202 returns otpChallengeId, expiresAt, channel, and maskedPhone. That is a challenge record, not proof that an SMS was delivered. Do not assume a code was sent.
3. Verify OTP
Live POST /auth/otp/verify requires otpChallengeId and code, plus the same phone and businessEntityId. {phone, code} alone is rejected.
Code
The response is {verified, otpToken, expiresAt}. Use otpToken once to register or reset PIN.
4. Register
Code
The response includes accessToken, refreshToken, and walletProvisioning.
To log in an existing user, POST /auth/login also requires businessEntityId:
Code
5. Call an authenticated endpoint
Code
6. Use idempotency for money movement
Every retryable money mutation should carry a stable Idempotency-Key.
Code