- Send an
Idempotency-KeyonPOST /orders(optional, but recommended so the same order is never created twice); reuse the same key when retrying. - Store our order
idnext to your own order. Usereferenceto link them. Keep your own copy of every order and its final status: we only keep them retrievable for 60 days. - Use webhooks as the primary source of status; poll only as a fallback.
- Check the HTTP status before parsing the body, and handle a non-JSON
5xxas retryable. - Read
currencyfrom responses instead of assuming it. - Treat unknown fields in responses as additive: we may add new fields without notice.
- Keep the API key and webhook secret in server-side secret storage.
Guides
Best practices
Recommendations for a reliable integration.