#amen osa
1 messages · Page 1 of 1 (latest)
When you create the Subscription, Did you tried to update it's Invoice and add additional items to it (physical goods and shipping rates)?
You can do this simply when using Stripe Checkout Session, you can combine recurring and one time payment into one request... but as you are using direct APIs with Element I think you can achieve this by adding an invoice items. You can refer to this guide for additional insights:
https://stripe.com/docs/billing/invoices/subscription#manage-invoices
yes, but add_invoice_items field doesnt seem to have any fields for shipping
You need to add shipping as a normal invoiceitem.
but it creates another invoice, doesnt it? or I am missing something?
Because there is no shipping field inside invoiceItems creation.
I found out that I can set shipping only during invoice creation
but it creates another invoice, doesnt it? or I am missing something?
No you just add an InvoiceItem to the subscription invoice. Add the shipping amount as an InvoiceItem (like any normal product)
Thx. This approach doesnt seem to work. getting "Non-draft invoices can't be updated" for 1 screenshot, and "Invalid invoice: This invoice is no longer editable" for 2
and field auto_advance doesnt exist in subscription creation
You need to update the invoice while it's in a draft state
Stripe finalizes and sends the invoice in 1 hour. Before the invoice is finalized, you can edit it. In this interval you should do the update.
How can I set subscription invoice into draft state?
I do subscription create and trying to update sub invoice in one single api request, but getting errors above
Can you share the subscriptionId ?
sub_1MvezOH6mTS6GklTlttUoucM
Ah yes when creating directly the subscription, the related invoice is finalized/opened directly, in order to have a PaymentIntent and collect payment methods... the way I mentioned above is when renewing the Subscription
I don't think what you want to achieve can be done just by using Subscription API and at creation, you need to create another PaymentIntent
Ok, thank you. If shipping_cost field is available during invoice creation, will this field be available during subscription creation in the nearest future?
AFIAK, no.