#alexander-1966_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1263058029503451192
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
thanks
I'm not sure I fully understand the use case
we don't really offer yearly subscriptions paid in monthly invoices
by yearly subscription billed monthly I mean the users will subscribe for 1 year of service but pay monthly. So if they cancel on the 4th month, we'd like to charge a cancellation fee for the remaining 8 months.
I imagine it will be a monthly Stripe subscription and if canceled, we'll calculate how many months are left. Then we manually issue a single invoice for the cancellation fee.
the above code snippet does that, I simulated it and the payments look like this
only problem is that the invoice line item is just the name of the subscription
we'd like the line item subscription to be "Cancellation fee for the remaining 8 months of service"
add_invoice_items doesn't seem to allow setting a description https://docs.stripe.com/api/subscriptions/update#update_subscription-add_invoice_items-price_data-product
so I wonder if there is a different approach
you can use the description field https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-description on the invoice item
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so basically if you're using the add_invoice_items, you would then update the invoice item's description
trying it now
this is seemingly not supported by the Ruby gem https://docs.stripe.com/api/invoices/update_line
not the invoice line item
the invoice item
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeah, does the work
that'll do, simpler than I thought ๐
thanks for pointing me to that, this channel rocks
sure let me know if you need any more help
looks like no, have a great day