A network retry that does not double-charge
A wallet app's backend authorizes SAR 250 and loses the response to a timeout.
Step 1: Token issued
The backend obtains a short-lived merchant-scoped bearer token via POST /api/v1/auth/token.
Step 2: First request
It calls POST /api/v1/payments with an Idempotency-Key and an X-Correlation-Id.
Step 3: Timeout and retry
The connection drops. The client retries with the same key and body; while the first request is still in flight, Meem returns 409.
Step 4: Replay
The next retry returns the original response. Only one payment exists.
Step 5: Ledger updated
A signed payment.authorized webhook arrives and the backend verifies X-Webhook-Signature before posting.