#ingelran-subscription-trial-end

1 messages · Page 1 of 1 (latest)

clear ridge
#

hey there!

unique river
#

hello

clear ridge
#

what do you mean the function associated with that trigger?

unique river
#

i created in my database a field "paid" and when the trigger invoice.payment_succeeded is detected by my "webhook.php" file ... i set the paid field to TRUE

clear ridge
#

So you're trying to configure webhook handlers?

#

What part isnt working like you expect, exactly?

unique river
#

yes i have my handler

#

it seem the invoice.payment_succeeded doesnt work

#

i see it in the log event

#

case 'invoice.payment_succeeded':
$invoice = $event->data->object;
$subscription = $invoice->subscription;
$subsManager->setPremiumStatus($subscription, 1);
break;

#

when i add a trial_end to the checkout_session

#

perhaps invoice.payment_succeeded is not trigerred during the trial ?

clear ridge
#

ah, i think i understand now, i thought you were looking at the end of the trial

#

likely you want to switch to using the invoice.paid event

#

the different is that the one you use right now only fires with an actual payment

#

if there is no payment (like for a trial, a free price, a customer with a credit or discount etc), that event wont fire, but the invoice will still transition to paid and get the invoice.paid event

unique river
#

i see thank yo so much

clear ridge
#

no problem! let me know if that works better for your testing