Skip to content

Idempotency ​

Networks fail. To retry POST /verifications or POST /orders without sending a second WhatsApp message, send an Idempotency-Key header:

http
Idempotency-Key: 6f1c2b9e-1c55-4c1e-8f0a-3f7b0e7f9a21
  • Use a new random value (UUID) per logical operation, and reuse it for retries of that same operation.
  • Allowed characters: A–Z a–z 0–9 . _ : -, up to 150 characters.
  • Same key + same body → the original response is returned with the header Idempotent-Replayed: true.
  • Same key + different body → 422.

Orders have a second safety net: the pair (source, externalId) is unique. Sending the same store order again returns 200 with duplicate: true instead of creating (and messaging) it twice.

otpera.com · WhatsApp order confirmation & OTP