Pre-release: the public API is not live yet and has no base URL. Routes and fields are in the OpenAPI contract, at /openapi.yaml.

Skip to Content
xaseDocumentation

Errors

The format of error responses, the error codes, and what to do with each one.

Every error response has the media type application/problem+json, the format defined by RFC 9457.

Format

MemberContent
codeThe stable identifier of the error. This is what your code reads
statusThe HTTP status of the response
titleA short summary, the same for every error with the same code. For people
detailWhat is wrong with this request, when there is more to say than the title. For people
request_idThe request id, the same as in the X-Request-Id header
errorsOnly on a validation error: each point of the request that the contract refuses

Each item of errors says where the problem is, with pointer (a JSON pointer into the body) or parameter (the name of a path parameter, a query parameter or a header), and what the contract expected there, in detail.

Two rules:

  • Decide by code, never by title or detail. A published code does not change. The text may.
  • The list of codes grows. Handle an unknown code by its status.

Codes

codeStatusMeaningWhat to do
invalid_request400The request does not follow the contractFix the request: errors says where. Sending the same request again does not help
unauthorized401There is no valid API keyCheck the key and its environment. See Authentication
insufficient_scope403The API key is valid and does not have the scope the operation asks forUse a key created with the scope. See What a key can do
origin_not_allowed403A request to the MCP endpoint carried the Origin header, as a request made by a web page doesCall the MCP endpoint from a program, not from a page. See MCP
not_found404The API has no operation with this method at this pathCheck the method and the path against the contract
charge_not_found404There is no charge with this id in the environment of the API keyCheck the id, and that the key is of the environment where the charge was created
refund_not_found404There is no refund with this id in the environment of the API keyCheck the id, and that the key is of the environment where the refund was asked for
offer_not_found404There is no offer with this id in the environment of the API keyCheck the id, and that the key is of the environment where the offer was created
charge_not_payable409In test mode, the simulated bank no longer pays this charge, because it expiredCreate another charge. See Test mode
charge_not_paid409The charge to refund was never paidRefund only a paid charge. See Refunds
charge_already_refunded409The charge was already refunded, or has a refund in progressRead the refund that exists instead of asking for another
charge_disputed409The payer disputed the charge, and the bank is holding its amountWait for the charge.dispute.closed event. See Disputes
charge_not_disputable409In test mode, the simulated bank does not dispute this charge: it is not paid, or its payment has nothing left to disputeSimulate the dispute of a paid charge. See Test mode
charge_not_disputed409In test mode, the charge has no open dispute to decideSimulate the dispute first, and wait for the charge to become disputed. See Test mode
refund_window_closed409The charge was paid more than 90 days agoPIX no longer returns this payment: settle it with the payer another way
insufficient_balance409The balance of the environment does not cover the refundNothing was refunded. Ask again when the balance covers the amount, with the same Idempotency-Key
payload_too_large413The body is too largeSend a smaller body
unsupported_media_type415The body is not declared as JSONSend the body as application/json, and say so in the Content-Type header
offer_invalid422The name of the offer is only blank spaceSend a name the buyer can read. See Offers
idempotency_key_reused422The Idempotency-Key already served a different request: another charge, or the refund of another chargeUse a new key for a new charge or a new refund. See Idempotency
rate_limited429Too many requestsWait the number of seconds in the Retry-After header
internal_error500The platform failedTry again, with the same Idempotency-Key when creating a charge or asking for a refund
live_mode_unavailable501Creating a charge with a live key, while the real bank is not connected yetUse a test key

Internal errors

An internal_error carries only the code and the request id, never internal details. If it persists, send the request_id to support: it is what locates the request in the platform logs.

On this page