beam-community / stripity-stripe

An Elixir Library for Stripe
Other
966 stars 346 forks source link

Idempotency should only be added for :post #734

Closed snewcomer closed 2 years ago

snewcomer commented 2 years ago

Idempotency should only be added for :post. Stripe API is organized around REST and based on the HTTP spec, PUT and DELETE are idempotent. An idempotency key is only needed for POST.

close https://github.com/beam-community/stripity_stripe/issues/711

docs https://stripe.com/docs/api/idempotent_requests

All POST requests accept idempotency keys. Sending idempotency keys in GET and DELETE requests has no effect and should be avoided, as these requests are idempotent by definition.