#skoshkarli-subscription-setup-fee
1 messages ยท Page 1 of 1 (latest)
and how do i charge upfront for the setup fee only and not the recurring subscription fee in cases of trial?
Hi there ๐ yes, when creating a Subscription that has a one-time fee included in the first Invoice, you will provide that when creating the Subscription. Please bear with me a moment while I double check whether that goes into the items array or add_invoice_items.
๐
Thank you for your patience while I confirmed. The one-off items would go in add_invoice_items.
and how do i make it so that they get charged right away regardless of trial period for that one off item?
Nothing special needs to be done for that. When you include a one-off Invoice Item, it is included in the first Invoice that is generated which still happens immediately for Subscriptions with trials (but typically these are zero-dollar Invoices when a trial is involved).
skoshkarli-subscription-setup-fee
so in this case it just wont be a 0 dollar invoice? do i still do a setupIntent in the cases when ther is a trial?
Correct, in that case the first Invoice will not be a zero-dollar Invoice. Instead it will include a single (unless you're providing multiple Invoice Items) line for the setup fee that you specified.
It is up to you whether you want to create and handle a Setup Intent before creating the Subscription. If you do then you can provide the ID of the created Payment Method when creating the Subscription to have the Subscription automatically try to charge that Payment Method each cycle, via the default_payment_method field.
If you don't, then you can use the Payment Intent that is automatically created by the first Invoice to process the payment and save the payment method details for reuse.
got it. ok thank you, let me try this and see if it works as i want.
Happy to help! Let me know if it doesn't and we can talk through that.
sorry have another follow up question
so i pass the priceId of the setup fee, how do i ensure its in the currency that the subscription in as well?
You set the currency when you create the Price. If you're using multiple currencies you'll either need to maintain a way to know when to use which Price, or you'll need to retrieve/list your Price objects when creating the Subscription to know which one is the right one to use.
https://stripe.com/docs/api/prices/object#price_object-currency