Required headers
Every server-to-server request needs:Recommended backend helper
Create resources safely
For create/update actions that your system might retry, send anIdempotency-Key.
Node.js
Handle errors by code
Errors use a stable shape:- Show validation errors next to the relevant field.
- Retry
429and5xxerrors with backoff. - Log
requestIdfor support. - Do not retry validation or permission errors without changing the request.
Production checklist
- Store keys in a secrets manager.
- Use separate keys for test and live.
- Add timeouts to all HTTP calls.
- Add
Idempotency-Keyto retriedPOSTrequests. - Verify all webhooks before processing them.
- Store webhook event IDs so duplicate deliveries do not double-process work.
Where to go next
Authentication
Key types, rotation, and where secrets belong.
Errors
Error codes and retry behavior.
Idempotency
Make retries safe.
API reference
Endpoint-by-endpoint details.