Skip to content

Stripe Checkout Session for Subscriptions

By default, Stripe automatically generates invoices for subscriptions at no additional cost, as required by regulations. However, these invoices are not editable. With Envilo, your customers can still view, modify, and download their invoices while maintaining compliance.

Stripe Checkout Session for One Time Payments

Stripe applies fees for automated invoice creation. To avoid these charges when using checkout sessions, ensure you disable invoice creation as shown below:

import stripe

session = stripe.checkout.Session.create\
(
        payment_method_types=['card'],
        mode='payment',
        # DISABLE INVOICE CREATION TO AVOID FEES IN THE NEXT LINE
        invoice_creation={'enabled':False}, 
        customer='cus_XXXXX',
        line_items=[
                        {
                            'price'     : 'price_XXXXX',
                            'tax_rates' : ['txr_XXXXX'],
                            'quantity'  : 1
                        }
                   ],
        # Other settings
)

When you configure invoice_creation={'enabled': False}, Stripe will not generate invoices for checkout sessions, preventing any associated creation fees. Envilo maintains invoice functionality for these transactions as well.

The payment intent ID is used as the invoice number (converted to uppercase):

  • Payment Intent ID: pi_3KHnioGvMVhWB7cw5Y7qCmZd
  • Invoice Number: 3KHNIOGVMVHWB7CW5Y7QCMZD

For one-time payments, customize your invoices using: