You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add idempotency key support for write requests #14
POST requests that create resources (payments, invoices, transfers) should support an idempotency key so that retries caused by network failures don't create duplicate records. The key is forwarded as an Idempotency-Key header and the server will return the same response for duplicate requests.
Proposed Steps
Add idempotency_key: Optional[str] = None to all create resource methods.
When provided, include it as Idempotency-Key: <value> in the request headers.
Auto-generate a UUID idempotency_key when the HTTP client auto-retries a write (so retries are safe by default).
Document the idempotency window (typically 24 hours) in docstrings.
Acceptance Criteria
Passing idempotency_key="my-key" to a create method sends Idempotency-Key: my-key in the header.
Omitting idempotency_key on auto-retried write requests still sends a generated UUID key.
A duplicate request with the same key returns the original resource without error.
GET/DELETE requests ignore the idempotency_key argument.
Activity
guptakumarranjeet150 commentedon Oct 3, 2026
Hi maintainers,
I reviewed this issue and would like to contribute the fix.
Technical outline:
Could you please assign this issue to me? Looking forward to delivering a clean PR.