Idempotency Headers

Pro Feature

This feature is only available on paid plans. Please schedule a demo or email us to get started.

For any idempotent endpoints, Fern’s SDKs will allow you to specify idempotency headers. Typically the headers include Idempotency-Key, but you can also specify additional headers.

1const response = await client.transactions.send({
2 amount: 100,
3 currency: "usd",
4}, {
5 idempotencyKey: "64099353-b48b-4dcd-98b7-74df1cc57933"
6});

Note that the generated SDKs will not allow you to specify idempotency headers for non-idempotent endpoints. This is to ensure that the user knows exactly which invocations are idempotent and which are not.