#Sq-trials
1 messages · Page 1 of 1 (latest)
hello @wispy wasp ! Yes, it's possible!
just note that you won't be able to use Stripe Checkout with this flow.
You would have to make the relevant API call to create a subscription yourself : https://stripe.com/docs/api/subscriptions/create
oh then what will happen when the trial is over? will the user be sent an invoice? or what would be sent to the user to request for a payment after the trial of lets say 7 days?
that would depend on what you set as the collection_method -
if it's charged_automatically, then the first payment attempt will "fail" since the customer has no payment method.
If it's send_invoice then Stripe will send an invoice.
what will happen if the charged_automatically fails? will the user still be subscribe to the previous subscription?
that really depends on your settings then :
- if you created the subscription with
payment_behavior=default_incomplete, customers have about 23 hours to make a successful payment. If they don’t make a payment, the subscription updates to incomplete_expired and the invoice becomes void. - if you didn't create the subscription with
payment_behavior=default_incomplete, then what happens to the subscription would depend on the settings in https://dashboard.stripe.com/settings/billing/automatic
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior
actually, i'd want to clarify this part that i mentioned before -
if it's charged_automatically, then the first payment attempt will "fail" since the customer has no payment method.
actually the payment attempt is not even made since there is no payment method. so the portion you'd need to look at to understand the behaviour without payment_behavior=default_incomplete is only this part :
oh thank you so much i will take a look at them
how do i get to this page?
oh okay thank you
anyway, do test things out, there's a variety of settings/parameters which can change the behaviour
hey @wispy wasp, actually give me about half an hour to verify the behaviour for charged_automatically again, i think i may have mis-remembered some stuff
sure no worries, thank you so much for helping me out
@wispy wasp scratch everything i said earlier regarding charged_automatically
If you're using subscriptions with trial, no payment method, and charge automatically :
- the first payment attempt will fail, and the subscription will be in status
past_due - subsequent payment retries and how the subscription behaves after that should depend on the settings in : https://dashboard.stripe.com/settings/billing/automatic
yep
may i know what is the 3D secure below?
sure, do you have any specific questions regarding it? Otherwise, this is a fairly good reference to start with : https://stripe.com/docs/payments/3d-secure
if i want to enable this, do i have to change anything within my code? i assume not since im using redirect checkout for the subscription payment
if you're using Stripe Checkout, there's nothing that you need to change
okay thank you 🙂
hi is there a way to create the new customer and the subscription together? currently the way im doing is as below
app.post('/create-new-customer', async (req, res) => {
const email = req.body.email;
const nameFull = req.body.nameFull;
const new_customer = await stripe.customers.create({
email: email,
name: nameFull
});
const trial_subscription = await stripe.subscriptions.create({
customer: new_customer.id,
items: [
{price: 'price_1JY4tfLkgjk38j5rhU52ZaXR'},
],
trial_period_days: 7
});
res.send(trial_subscription);
});
there is no other way to simplify it right?
yeah, there's no way to do it together
alright thanks 😄
oh right so for the status: past_due, the customer will still be saved in my customer list right? i can then redirect the customer using customer portal to resubscribe to different or the current plan and hence enter their credit card info?
yes, the customer will still be saved in your customer list. The customer can only upgrade/downgrade and enter their credit card info via the customer portal
they cannot subscribe to a new plan via the customer portal
oh.. so can try subscribe to the subscription that was given as a trial to change the past_due to active?
btw, you would probably want to use trial_end [0] to test so that your trial can end faster
https://stripe.com/docs/api/subscriptions/create#create_subscription-trial_end
you would want to go through this on how to reactivate subscriptions : https://stripe.com/docs/billing/subscriptions/overview#subscription-lifecycle
there's this section that says :
...
The subscription’s status remains active as long as automatic payments succeed. If automatic payment fails, the subscription updates to past_due and Stripe attempts to recover payment based on your retry rules. If payment recovery fails, you can set the subscription status to canceled, unpaid, or you can leave it active.
For unpaid subscriptions, the latest invoice remains open but payments aren’t attempted. The subscription continues to generate invoices each billing cycle and remains in draft state. To reactivate the subscription, you need to:
Collect new payment information
Turn automatic collection back on by setting auto advance to true on draft invoices
Finalize and then pay the draft invoices (make sure to pay the most recent invoice before its due date to update the status of the subscription to active)
Setting past_due subscriptions to unpaid is the default behavior because it gives you the most options for reactivating subscriptions.
...
alright thanks