Skip to main content

Errors & FAQ

HTTP status codes

The API uses standard HTTP status codes: 2xx for success, 4xx for request-specific problems (permissions, missing or invalid parameters), and 5xx for server-side errors.

CodeMeaningDescription
200OKRequest processed successfully
201CreatedA new resource was created
400Bad RequestMalformed request—check the header, query, and body against the error description
401UnauthorizedMissing or expired access token
403ForbiddenThe resource exists but you do not have rights to access it
404Not FoundNo resource behind the URL (e.g. an unknown ID)
409ConflictDuplicate x-idempotency-key detected
500Internal Server ErrorSomething unexpected happened on our side

When a request fails, read the response's error description—it explains what to fix (for example, a duplicate beneficiary or a missing conditional field).

Idempotency

Mutating endpoints accept an optional x-idempotency-key header (≤ 36 characters). If the same key is replayed, the API returns 409 instead of performing the action twice. Many create endpoints also accept a referenceId in the body for business-level deduplication.

Always use idempotency keys for payment and deposit creation so a network retry never results in a double action.

FAQ

My token keeps expiring—what's the best practice? Tokens last 60 minutes. Cache the token in memory, reuse it until it nears expiry, and re-authenticate on a 401. There is no refresh endpoint—just call /authenticate again.

Can I test without moving real money? Yes. Build against Sandbox (https://api.sandbox.capay.com.au). You can also simulate deposits there to exercise the full flow.

Why was my beneficiary or payment rejected as a duplicate? Beneficiaries are deduplicated by clientId plus either uniquePayId or bank details. Payments can be deduplicated by referenceId. Reuse the existing record, or change the identifying details.

A field is "conditionally required"—when do I need it? Some fields depend on the payment type. For example, sourceOfFunds is required for local payments and for POBO SWIFT payments to personal beneficiaries; invoiceNumber/invoiceDate are required for local INR payments to business beneficiaries. The API Reference notes each condition.

How do I report an issue? Contact your Integration Support team with the request details and any reference number from the response so we can trace it.