#MarceloOlandim
1 messages · Page 1 of 1 (latest)
Hi,
In fact there are multiple way to achieve this, using coupons, subscription schedule... I personally recommend using Subscription Schedule.
When creating a Subscription Schedule you are creating a schedule with 2 phases I assume, first 3 month with 1 pound and 9 months with normal price, right ?
Now I didn't understand correctly what is the exact issue with that? collecting the customer payment method ?
The problem is that when u create a subscription using scheduler, its status is automatically active, without the user payment
The user would have to pay the invoice to change the status to active.
You can collect the PaymentMethod from the customer using SetupIntent, then create the scheduler with this PaymentMethod so the invoice is paid.
You can collect the PaymentMethod following this guide:
https://stripe.com/docs/payments/save-and-reuse?platform=web
There is no way to have the subscription scheduler to start inactive and then extract the payment secret from the subscription created ?
No.
If I use the PaymentMethod, what price the user will see on the payment form?
I don't understand you. you mean using SetupIntent ? you show them what the total price of what they want to purchase.
At the moment I using stripeApi.subscriptions.create
I extract the payment secret from the subscription object created by this operation.
So the price to be charged would also be picked by this subscription object.
However with that your approach, the paymentIntent does have any price attached to it, so what to inform the user on the form?
Hi! I'm taking over this thread.
Thanks Soma
Are you creating a Subscription or a Subscription Schedule?
I tried both.
I just want to implement a subscription that is paid annually, but we want to offer the 3 first months for just 1 pound.
For this you need to use a Subscription Schedule with 2 phases.
I tried this:
const schedule = await stripeApi.subscriptionSchedules.create({
//from_subscription: createdSubscriptionId,
customer: stripeCustomerId,
start_date: 'now',
phases: [
{
items: [{ price: annualStripePriceId, quantity: 1 }],
end_date: getUnixTime(addMonths(new Date(), 3)),
coupon: 'BbdJi0Th',
},
{
items: [{ price: annualStripePriceId, quantity: 1 }],
end_date: getUnixTime(addMonths(new Date(), 9)),
},
],
});
And what is the issue with this code?
The issue is that in the subscription console:
https://dashboard.stripe.com/test/subscriptions/sub_1MrHYxC6SiKqhq3NCGGi2KPx
These charges are not reflected
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It says the next invoice will be in one year, but what about the second charge that should happen after 3 months?
The dashboard view might be missleading. To test this you should use Test Clocks: https://stripe.com/docs/billing/testing/test-clocks
Ahh.. thanks.
Quick question.. can I apply a scheduler with phases in a subscription that already exists ?
Quick question.. can I apply a scheduler with phases in a subscription that already exists ?
True, that's also possible. You can see an example of this here: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
Just read this in the documentation:
optional
Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription’s item(s), set to auto-renew using the subscription’s interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
Yes, so what's the question?
So, I can't use phases to subscription that already exists ?
Yes you can.
It's a two step process:
- Create the subscription schedule with the existing subscription
- Then edit the subscription schedule
That's why the text you shared above mention this:
To create a subscription schedule with other modifications, we recommend making two separate API calls.
Ahh. perfect
Okay.. so.
If I am going to a strategy where I am going to use subscription already paid by a customer and apply different phases, the first phase in my business case (initial payment of 1 pound), that would already by paid , so this 'phase" should not be on the scheduler update right?
That sounds correct to me. But I recommend doing some tests in test mode with Test Clocks to make sure everything is working as expected.