Errors & conventions
Response envelopes
Success
{ "success": true, "data": { "...": "..." } }
Error — non-2xx responses carry a machine-readable code and a message:
{ "success": false, "error": { "code": "APPLICATION_NOT_FOUND", "message": "..." } }
Common error codes
| Code | HTTP | Meaning |
|---|---|---|
INVALID_APPLICATION_SIGNATURE | 401 | The access-token request signature didn't verify. |
SIGNATURE_EXPIRED | 401 | The signed timestamp is too old. |
SIGNATURE_REUSED | 401 | The nonce was already used. |
INVALID_JWT_TOKEN | 401 | Missing / expired / malformed bearer token. |
APPLICATION_NOT_FOUND | 404 | Unknown application / partner. |
Conventions
- Auth: a missing or expired token returns
401. Mint a new one (see Authentication). - Idempotency:
externalUserIddedupes users;paymentReferencededupes repayments. - Amounts: always USD decimals.
- Timestamps: Unix seconds unless stated otherwise.
Quickstart checklist
- ☐ Generate an Ed25519 key pair; send Yumi your
publicKey+email. Receive your partner id + webhook secret. - ☐ Implement token minting (
POST /auth-apps/access-token). - ☐
POST /card/add-userfor your users;update-useras data changes. - ☐ Handle the
CREDIT_LIMITwebhook (verifyX-Signature); store the limit. - ☐
POST /card/authorize-creditto draw; keepcreditId. - ☐
POST /card/submit-repaymenton repayment.