Choose the right retry method
For other write requests, check the endpoint instructions before retrying. Use a fresh timestamp and signature on every attempt, even when the body and retry key stay the same.
Requests with an idempotency key
Generate a uniqueIdempotency-Key for each new operation. A UUID works well. Store it with the request body and the business making the request.
For example, your application can generate a key in Node.js:
Idempotency-Key header. If you retry with the same key and body, Ledig returns the original result. Changing the body while keeping the key returns a conflict.
For receiving accounts, intent: additional requests another account; it does not recover an earlier request. A pending request may need more time or review before it completes.
Quote replay
Save your quote’sreference, ID and expiry. Repeating the same reference for your business returns the original quote with HTTP 201 and top-level replayed: true. It does not refresh its price, status or expiry. A newly created quote returns replayed: false.
An accepted or expired quote can still be returned by a replay. Use a fresh reference when you deliberately need a fresh quote. If you have already submitted a transfer with the original quote, resolve that payment’s outcome first.
Transfer replay
Keep the originalquoteId and any reference after a transfer request times out. Retrying them for the same business recovers the original transfer.
- Reusing a reference with a different quote returns the original transfer and leaves the new quote unused.
- Reusing a quote with a new, unused reference returns the original transfer. It does not attach the new reference to that transfer.
- If the quote and reference point to two different transfers, Ledig returns
409 IDEMPOTENCY_CONFLICT.
201. Top-level replayed: true means the original transfer was returned without creating another payment; false means a new transfer was created. HTTP acceptance does not confirm delivery.
When to retry or stop
For temporary read failures, wait before retrying and increase the delay after each failed attempt. FollowRetry-After when it is returned.
For writes, use the retry method above and limit the number of attempts. Correct a rejected request before sending it again, but check any uncertain earlier attempt first.
If you still cannot confirm the result, contact support@ledig.io with the request ID and relevant account, wallet or transfer ID.