pasbydocs
Reference

Errors & troubleshooting

HTTP status codes, validation errors, API envelopes, and fixes.

Check HTTP status first, then the JSON status / reason fields. Most integration issues are credential, scope, or flow-state problems — verify those before contacting support.

Status codes

  • 2xx

    Success. 201 is common for flow creation; 200 for ping and reads.

  • 4xx

    Client error — fix headers, body, or flow id. See tables below.

  • 5xx

    Server error — retry with backoff; check status.pasby.africa.

Plain-text middleware errors

HTTPMessageFix
401An api key is needed to access our services.Add x-api-key
400App secret missing in headers.Add x-access-secret on v2 routes
429Rate limit messageBack off; max ~100 req/min/IP

Validation errors (HTTP 400)

Zod-style JSON array, e.g. invalid NIN or missing claims:

[
  {
    "code": "too_small",
    "minimum": 11,
    "path": ["body", "user"],
    "message": "Invalid nin identifier"
  }
]
SymptomFix
Missing claimsPass claims array — see Claims reference
Seeds out of rangeUse integer 1–10 on wildcard routes
Invalid webhook URLUse HTTPS host on sign / document routes

API error envelope

{
  "status": "handled",
  "reason": "Human-readable explanation",
  "type": "authorization_error",
  "code": 400,
  "helper_url": "https://docs.pasby.africa/docs/reference/errors",
  "body": {}
}
typeTypical cause
authorization_errorInvalid credentials
param_errorBad request parameters
session_cancelUser cancelled — handle in UI
session_expiryFlow or token expired — restart flow

OIDC errors

MessageFix
Handshake invalid or expiredRepeat OIDC quickstart; fresh handshake
Challenge verification failedUse PKCE verifier from same session
Access token invalid or expiredShorter session TTL; re-run exchange

Flow troubleshooting

SymptomCheck
Flow never completesCorrect request id; user finished on device — Flow lifecycle
Empty claims on pingNot complete yet; or user denied fields
Cannot decrypt claimsCommunication keys