#benjam3960
1 messages · Page 1 of 1 (latest)
👋 happy to help
Hi @untold karma !
if you do so, your customer will pay for a full cycle now and pay another one on oct 22nd
using Checkout Sessions you can't really create a subscription in the future
what you can do instead is to start with a trial
using
trial_period_days: x,
}```
and to make sure you collect the payment method info you can add https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_collection as always
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
could that work for you?
I am trying in test mode
I thought not creating proration and starting the billing_cycle_anchor to a future date will allow to start the billing cycle in a future date
Description from the API : subscription_data.billing_cycle_anchor
optional
A future timestamp to anchor the subscription’s billing cycle for new subscriptions.
to anchor doesn't mean to start in the future
to anchor means the date that will be used as the renewal of each cycle
so if you're on a monthly subscription
each billing cycle will start on the 22nd of the month
so basically your customer will technically have a billing cycle from the 22nd Sept to 21st Oct and based on whether you want prorations or not they will pay accordingly for that period
either prorations: none and they pay the full period
or with prorations and they will be the remaining ~10 days (between the 11 and the 21st)
I just made a test with the trial period as you recommended and it works
I have made also a test with what I have purpose and it works also : It shows 0€ to pay now and xx€ to pay from 22nd of October
would you mind sharing both subscription IDs?
Free trial period : sub_1Nzyv2HIIiQEaaQSZjccGFcW
Future billing anchor : sub_1Nzz1MHIIiQEaaQS6u6264BC
taking a look
apparently you're right. Your approach is described here https://stripe.com/docs/payments/checkout/billing-cycle#disable-prorations
I wasn't aware of that integration path to be honest, it's specific to Checkout
basically it's better this way, especially to better curate the provisioning. In the trial path you would have a first invoice of €0 and an invoice.paid event
whereas when you disable proration the first period isn't in trial and there's no invoice created for that period so no invoice.paid event
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Hi ! So I understand that it is better to follow my suggestion (subscription_data[billing_cycle_anchor] = Oct 22nd and subscription_data[proration_behavior] = none ) than using the tarzan suggestion subscription_data: {
trial_period_days: x,
})
Am I right ?
If you want to offer a 'free' period without the trial phrasing then yes you can fix the billing cycle and disable prorations
I don't want to offer a free period, I want to start the subscription in a future date (I'm doing furniture rental, so the subscription start when the furniture has been delivered)
Yes, that's fne. But to be clear the subscription will be created immediately and be active from the Checkout Session confirmation. We just won't bill them until the date specified
Hence the technical 'free period'
You can't delay the actual creation/start of the subscription until a later date with Checkout
So how I should do to have the subscription in the tab "Planned" instead of "Current" in the Billing Stripe dashboard ?
You'd use the Subscription Schedules API directly: https://stripe.com/docs/api/subscription_schedules
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Checkout doesn't use that API
But I need to catch the bank account number (IBAN) from the customer