Payment Intents API doesn't support automatically sending paid invoices.
Resource: https://docs.stripe.com/payments/advanced/receipts#automatically-send-paid-invoices
This means you can't automatically send a paid invoice if you writing code like below
const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: 'gbp',
payment_method_types: ['card'],
description: 'Thanks for your purchase!',
receipt_email: '[email protected]',
});
You should use embedded components
const session = await stripe.checkout.sessions.create({
mode: 'payment',
invoice_creation: {
enabled: true,
},
line_items: [
{
price: '{{ONE_TIME_PRICE_ID}}',
quantity: 1,
},
],
ui_mode: 'custom',
return_url: 'https://example.com',
});