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

Errors

How the merchant API reports problems, and what to show your buyers.

Errors use standard HTTP status codes. The body always has success: false and a human-readable message. Some errors add a machine-readable code and extra fields.

{
  "success": false,
  "message": "…",
  "code": "SHIPPING_DETAILS_REQUIRED",
  "missing": ["address.line1"]
}

Status codes

StatusWhenExtra fields
400Invalid request: a price sent on an item, a bad product ID, an unavailable product, invalid options, a bad paymentRail or expiresAt, an invalid embed origincode on some errors
400 SHIPPING_DETAILS_REQUIREDA physical item without the buyer's name, email or addresscode, missing
401Missing, invalid or revoked key
403Key lacks the scope; or embed origin not registeredgrantedScopes, effectiveScopes, hint
403 ACCOUNT_FLAGGEDThe account is restrictedcode
404Not found, or not yours. Swop answers 404 rather than 403 so IDs can't be probed.
429Too many requestsretryAfter (seconds)
5xxSomething went wrong at Swop. Safe to retry reads; see the note below for creates.correlationId when present

Retrying

  • Reads (GET) are always safe to retry with backoff.
  • POST /checkout-intents has no idempotency key yet. If it times out, check whether you got an intentId before retrying, or accept that you may create a second checkout (only the one the buyer pays matters).
  • On 429, wait retryAfter seconds.

What to show buyers

Key and scope errors (401, 403) mean your configuration is wrong, not the buyer's. Log the full body on your server and show the buyer something neutral, like "Checkout is temporarily unavailable". Never show a buyer "you weren't charged" unless you've confirmed the checkout's status is active, expired or cancelled.

On this page