Shape
{
"error": {
"type": "invalid_request_error",
"code": "amount_invalid",
"message": "amount must be a positive integer in the currency minor unit.",
"param": "amount",
"request_id": "req_AbCd..."
}
}Types
invalid_request_error— 400. Your request was malformed. Don't retry without changing it.authentication_error— 401. Wrong/expired API key.permission_error— 403. The key is valid but lacks scope.not_found_error— 404. The resource does not exist or belongs to a different merchant.rate_limit_error— 429. Back off and retry.rail_error— 402. The rail rejected the charge (insufficient funds, blocked wallet, etc).api_error— 500. Bila is down. Retry with exponential backoff.
When to retry
Retry on 429, 500, 502, 503, 504. Never retry 4xx (except 429) — the request will fail the same way.
Idempotency
Pass Idempotency-Key on every mutation. Bila caches the response under the key for 24h, so safe to retry network errors without double-charging.