I've implemented the new Stripe Checkout
on my NodeJS server
, but I cannot specify the Tax Rate for Invoicing.
As per my understanding Tax Rates should be specified in the Payment Intent API. Fact is that the new Checkout
automatically creates a Payment Intent
via its CreateSession (see payment_intent_data
), but I'm not able to insert a Tax Rate upon its creation.
How can this be done? What I want to achieve is to have the user know the Tax % both in the Checkout UI
and in the final email invoice
.
This is my code:
return stripe.checkout.sessions.create({
payment_method_types: [paymentMethod],
line_items: [{
name: name,
description: description,
images: [imageUrl],
amount: amount,
currency: currency,
quantity: 1
}],
success_url: successUrl,
cancel_url: cancelUrl,
customer: stripeId,
payment_intent_data: {
receipt_email: email,
metadata: {
userId: userId,
amount: amount,
currency: currency,
ref: ref,
stripeId: stripeId,
details: details
}
}
}).then(session => {
return res.send(session)