I ma trying to make a direct charge to a stripe connected account and I am able to do it with the following
const charge = {
amount,
currency,
source} ;
return stripe.charges.create(
charge ,
{stripe_account: stripeVendorAccount});
Question: is there a way to include an idempotency option to the charge object? If not, what is the best way to avoid duplicate charges?
I tried this but it does not work
const charge = {
amount,
currency,
source} ;
return stripe.charges.create(
charge ,
{stripe_account: stripeVendorAccount},
{idempotency_key });