Guides for integrators

Go-live checklist

On this page

Go through this list before you connect your software to a real store. It is short on purpose. Each line links to the page that explains it. Do it together with the store's owner: some of the items are in the store's admin.

Keys and access#

  • The store has made a key just for this system, and its name says what uses it. Authentication
  • The key has only the scopes you use. Write scopes only if you write. The personal details option only if you need full emails and phone numbers of contacts. Scopes
  • The key is in a secret manager or an environment variable, not in your code, a repository, a log, a ticket or a chat.
  • If your server has a fixed address, the key has an allow-list of those addresses, and you have seen a call from elsewhere answered with 403 ip_not_allowed.
  • A key for temporary work has an expiry date, and you have a reminder to rotate the others.
  • If the store has a test or staging copy, you connected to that first. If not, you started with read-only keys.

Your requests#

  • You call the store's own address over https: https://yourstore.example.com/api/v1 with the store's address in place of the example.
  • You check the HTTP status before you use data, and your code reads error.code, not the message text. Responses and errors
  • Every POST and PATCH carries an Idempotency-Key that you store with your own record, so a retry reuses it. Idempotency-Key
  • You retry only what can be retried: network errors, 429, 500 and 503, after the wait in Retry-After or a growing pause. You never retry a 400-level error unchanged.
  • You page through lists with limit=100 and links.next, and sync with updated_since, keeping the time of your last successful sync. Pagination
  • Your software stays under the 120 requests a minute of the key (or the limit the store set), counting all programs that share the key. Rate limits
  • You set a time-out on every request (30 seconds is a good start).
  • You ignore fields you do not know and do not depend on the order of fields. You read null as "nothing". Versioning
  • You treat the order number as text and never rely on its prefix. Money is whole units of the store's currency; times are ISO 8601.

Your webhook receiver#

  • The address is public, https and has a valid certificate.
  • You check the signature on the raw body, compare in constant time, and reject a time more than 5 minutes away. Check the signature
  • The signing secret is in a secret manager. You know how to switch to a new one: the old one keeps signing for 24 hours after a rotation.
  • You answer 2xx within 5 seconds and do the slow work from a queue. Delivery and retries
  • You ignore repeats by event id, cope with events in any order, and ignore event types and fields you do not know.
  • You subscribed only to the events you use, and decided on personal details for the endpoint.
  • You pressed Send test event for every event type you use and saw the right result in your system (and your code ignores "test": true messages for real work).
  • You have a catch-up: a scheduled read of the API with updated_since. Webhooks are retried for about 45 hours (8 attempts) and then given up on, and after 20 given-up deliveries in a row the endpoint is switched off.

Data and privacy#

  • You keep only the customer data you really need, protect it where you store it, and delete it when you no longer need it.
  • You never write full request or webhook bodies, keys or secrets to logs. Orders and contacts contain customers' details.
  • You know which of your people can see the data, and your own privacy information covers what you do with it.

Watching it work#

  • Your software logs the status and error.code of every failed call, with the time, and alerts when 401, 403, 429 or 5xx answers repeat.
  • You know where the store shows its side: Settings > API & webhooks has the Request log (kept 30 days) and the Delivery log (30 days, failures 90 days). Agree who looks, and when.
  • You and the store's owner know how to stop it fast: Pause key on the key, Pause on the webhook.
  • You know who to ask for help, and what to send them. Contact support

On the day#

  • Switch on one thing at a time: first reading, then writing; first one event, then the others.
  • Watch the first real events and calls arrive, and compare the amounts and numbers with the store's admin.
  • Write down what you set up (keys and their scopes, webhooks and their events, who owns them) and when each key is due for rotation.