#Cecile

1 messages · Page 1 of 1 (latest)

dull swallowBOT
earnest wave
raw pebble
#

👋 happy to help

#

the end_behavior: release keeps the subscription active with the last phase's price indefinitely

earnest wave
#

I can delete the iteration of the last phase?

raw pebble
#

what do you mean by delete here

earnest wave
#

remove the 'iterations' : 1 of the last phase array

#

or it doesn't matter?

raw pebble
#

if you don't specify the iterations:1 in the last phase the subscription schedule won't release and you will always have the schedule that manages the subscription

earnest wave
#

ah ok, I leave it there then, thanks

#

I have another questoin

raw pebble
#

it doesn't mean the subscription wouldn't continue to behave as the last phase but it means that the object sub_sched_xxx would remain "alive"

earnest wave
#

I came from a checkout session and create the subscription schedule from the webhook. With a first phase as a trial month (because the first payment is done by the checkout form). And it's create an ivoice at 0. Usually I have an invoice.paid event following the creation of a normal subcription but it seems to not give me one here. Is it normal? Could you confimr me that when an itiration of the subscription scheudle is complete I will have an invoice.paid event if the price amount is 0?

raw pebble
earnest wave
#

yes on the return through the webhook

#

so no, sorry I create it after

raw pebble
#

the Checkout Session creates the Subscription and then you create a Subscription Schedule? or what does really happen on the Checkout Session? what is the mode of the Checkout Session?

earnest wave
#

the mode is 'payment'
I always created the subscription through the webhook after the first payment

raw pebble
#

I'm not sure you're doing the right integration here

earnest wave
#

Yes I know it's not the most logical way to create subscription but I had to adapt to an old funcitonment with a lots of obliations and some contradictions. Crete everything from the webhook based on my complicated database was the "easy" way to get everything ok.
I have normal payment and subscription working fine this way.
Today, I need to create subscription schedule, that way I still going through this process where the checkout is only a simple payment and eveyrtinhg is created after on the webhook create.checkout.session.
Then when subscription is created here, I have the event invoice.paid which send me informaiton (at the creation and at each iterations of the subscription). But with the creation of the subscription schedule I d'ont see the invoice.paid event

raw pebble
#

you can do the same but just change a couple of things

#

1- Checkout Session with mode 'subscription' instead of mode 'payment'
2- in your webhook create a Subscription Schedule from the created subscription

earnest wave
#

That means I don't have all the subscription normal events because I only create a Subscriptiion Schedule and not a subscription first and then attached it my subscription schedule ?

raw pebble
#

would you mind sharing the subscription schedule ID?

earnest wave
#

sub_1McT8yH1x8t6cpUIVxEZp2eA

raw pebble
#

looking into this

earnest wave
#

sub_sched_1McT8yH1x8t6cpUIWJKH9PNU

raw pebble
#

is the payment in the Checkout Session related to the first Invoice of the subscription?

earnest wave
#

Here is the payment from the checkout session :

#

pi_3McT1XH1x8t6cpUI01OYQZDe

#

and I think is not related to the subscription

raw pebble
#

I meant from a business perspective

#

from your business model

#

what is your customer paying for?

earnest wave
#

it's not simple to explain

#

it's a product which the 10 first ùonoth are separated on 1, 2, 3, 5 or 10 payments by months and from the 11th it's 9.9 by month

raw pebble
#

the first payment in the Checkout Session, what does it represent?

earnest wave
#

The first ùonth

#

*month

raw pebble
#

In this case I really urge you to change your implementation

#

as I explained, the best thing to do in your case is to change the Checkout Session from payment mode to subscription mode

earnest wave
#

The creation of the subscription and the planificaiton is ok.
THe only difference today whith my system is on a normal subscription (created after the payment checkout session) I have mutliple events with

  • creation of draft invoice
  • finalisation of draft invoice
  • payment of invoice

But with the creation os subscription schedule (same way that nomrla subscription after the payent checkout), I only have the draft creation

In fact, no I do have the invoice.piad now (with 1 hour and 10 min of delay)

raw pebble
#

If you do it the way I'm recommending you will get all of the events correctly

earnest wave
#

I really understand what you're explainning, I completly aware that my suscription creation systme is not very clean and logical. Unfortunalty I'm kind of stuck with it beacause of elements out of my control.

raw pebble
#

the reason why I'm saying this is that the invoices would reflect the real values instead of showing free trial and 0 as the amount of the first invoice where in fact it's not

raw pebble
earnest wave
#

Yes yes I know, and I totally aggre with you. My system is not logical. I sure want to make it right and I hope I could do some day...
It now seems to be ok, I just had a huge delay for the invoice to be considerated as paid, so I think it's ok.
I'm sorry to take your time and thank you for it.