#g105b-checkout
1 messages · Page 1 of 1 (latest)
Hey, taking a look!
Hmm, this is a POST /v1//subscriptions request. How is Checkout involved?
Maybe I'm misunderstanding, but my plan was to pass the returned subscription to create a new checkout. I was referring to https://stripe.com/docs/api/checkout/sessions/create?lang=php#create_checkout_session-line_items
My intention was to add the created subscription in the line_items array.
Hmm, that's not how it works. You'd create mode: 'subscription' session which creates the subscription for you
My intention is to create a monthly subscription, but also charge the customer a one-off payment (I'm using add_invoice_items for this). Can I do this just from creating the checkout session?
In mode: 'subscription' you can pass recurring and one-time prices in a single session
Oh, nice. I've been pre-creating the prices as Product types, but I can just create the Price instead? I'll try that now and confirm in a few mins, thanks!
Price objects require a parent Product object
That's great - works a treat. Thank you for your help. I do have one follow up question, which is whether it's possible to only charge the monthly amount at the end of the first month, rather than at the same time as the one off fee? req_0rEnP3ASTN6aPL shows my working checkout, with £100 one off, and £25 subscription, but I would rather the £25 is only charged after 30 days.
I know I could just reduce the £100 to £75, but the invoice would be cleaner if I could delay the subscription fee by a month.
That's not how our billing works – we always bill upfront for the period in advance
I guess you could just simulate it with an initial free trial period
Yes, a free trial period would be perfect, but I can't figure out how to add a free trial to a Price.
Maybe I should be using Plan instead of Price for the recurring payment?
You wouldn't, you'd pass this parameter when creating the session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-trial_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No, Plans APIs is deprecated (and replaced by Prices)
🎉 Thank you @fickle idol , that's perfect.
Have a wonderful day, keep doing what you're doing... amazing service.
Thank you so much! You too 