docs
Get startedTroubleshootingPaymentsWebhooksAgent paymentsSwop MCPOviIdentity (swop.id)SwivyRPC (preview)API reference

Errors

What error responses look like and what each status means.

Swop uses normal HTTP status codes. 2xx worked, 4xx means something in the request needs fixing, and 5xx means something went wrong on Swop's side.

The error body

Error responses have success: false and a human-readable message. Some include a machine-readable code and extra fields that help you fix the request.

{
  "success": false,
  "state": "failed",
  "message": "This key does not have the \"commerce.checkout\" scope right now.",
  "grantedScopes": ["commerce.read"],
  "effectiveScopes": ["commerce.read"]
}

Write your code against success and the status code, and show message to people. Not every error has a code yet.

Common errors

StatusWhenExtra fields
400A price was sent with an item. Swop prices items itself, so this is rejected, not ignored.—
400 SHIPPING_DETAILS_REQUIREDA physical item without the buyer's name, email or addresscode, missing (e.g. ["address.line1"])
400Bad product ID, product unavailable, invalid options, bad paymentRail or expiresAt—
401Missing, invalid or revoked key—
403The key lacks the required scopegrantedScopes, effectiveScopes; hint for card
403 ACCOUNT_FLAGGEDThe account is restrictedcode
403The website asking for an embed token isn't registered—
404The product isn't yours, or the checkout doesn't exist—
429Too many requestsretryAfter (seconds)

Card isn't offered

If you ask for card and get crypto only, your account isn't verified for card yet, or the cart doesn't qualify. Crypto checkout never needs verification.

On this page