The situation
Most e-commerce integrations are straightforward: order placed, stock decremented, email sent. PEAQ's is different. When a customer buys a PEAQ Plunge, their purchase needs to provision a device profile in the companion mobile app — a separate backend system with its own API, its own latency, and its own failure modes. The naive approach is synchronous: checkout calls the device API, waits for a response, then confirms the order. The problem is that when the device API is slow or temporarily unavailable, checkout times out. Customers get confused, retries create duplicate orders, and support tickets stack up. We solved this with an async queue architecture. The checkout endpoint does one thing: record the order and return a confirmation in under 300ms. Device provisioning is enqueued as a background job with retry logic, exponential backoff, and idempotency guarantees. The customer's device is activated within seconds of payment clearing — they just never notice the infrastructure behind it. The product database is bilingual (English/German) with a schema designed for non-technical staff to extend. Adding a new product variant in a new language is a form, not a pull request.
What had to change
Order completion had to trigger device provisioning in a separate mobile backend — but that API call could take 2–5 seconds and occasionally failed. A synchronous integration meant checkout timeouts when the device API was slow. Customers saw incomplete confirmations, retried payments, and flooded support with 'did my order go through?' tickets.
What we changed
Full async queue separation: checkout records the order and returns immediately. A background worker picks up the provisioning job, calls the device API with retries and exponential backoff, and marks the order provisioned when it succeeds. If it fails after retries, the support team gets an alert — not the customer. Zero checkout timeouts since launch.
What the client gained
- 01 Zero checkout timeouts — async device provisioning
- 02 Retry-safe queue workers with exponential backoff
- 03 Bilingual product DB editable by staff, not devs
- 04 Clean API contract separating store from app backend