#nobodylovesm3-subscription-payments
1 messages ยท Page 1 of 1 (latest)
Hey ๐
Are you planning to build your own custom checkout flow, or leverage our prebuilt one?
I think we'll be using your pre-built one (unless what i asked is not possible, then we will have to create our own custom flow)
Gotcha, so our flow collects payment information when the subscription is first started, even if it starts with a trial.
so if we'd like to keep it as it is right now - create user -> create customer -> assign the "default' subscription with trial and prompt the user during this trial to add a payment method so we could use ur flow, is that it?
That sounds right, but just to be sure, when you say 'create user' is this step within your system?
yes and then we make a request to create a customer with product X
Yup, that sounds right then (was just thrown off by the mention of a user and wanted to make sure)
okay, thanks
hey there @strange oar can we continue here?
yes, of course
hey! toby answered me but after i tried to end the trial for
a subscription, an invoice was generated and as i was waiting to see what would happen when a subscription's trial ends to a customer with no payment method provided in my test account stripe assigned a "default ach account' - i assume in live/production it doesn't happen like this - could someone tell me what happens?
what toby confirmed is that to use the default stripe checkout flow, i need to prompt the user to add a payment method during the trial
that's right - if you didnt want that then you'd just create the subscription directly via the API with a trial, and not use Checkout at all up front
which i'll be tracking in my app - whether the person has/doesn't have credit card added
there's a trial.end event, right?
im sorry for bothering you with this, i'll re-research it
there is a trial will end event, yes
and then when it actually does end you'd get customer.subscription.updated to show the changing status
from trialing to active
i see, thanks!
@wide mountain one last question, i used to use the "quantity" field to see what's the current tier for volume billing type but with usage metered option ticked on, quantity is always null, do i have to make a separate call to fetch the current usage (quantity) for the specific customer + subscription?
Metered usage is a bit different than quantity, so you'll have to do things a bit different
You can either GET the summary of the usage records including the current period: https://stripe.com/docs/api/usage_records/subscription_item_summary_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or you can retrieve the upcoming invoice for the subscription which would show you the current usage and amounts: https://stripe.com/docs/api/invoices/upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
awesome, thanks
np!