#ajit
1 messages ยท Page 1 of 1 (latest)
Hello ๐
You'd need to use test clocks for this as that event is generated when the renewal payment is successful
i used it but i am able to generate only billing reason = subscription_created
have you advanced the clock to after next billing cycle date?
๐
thanks
The renewal occurs after the current billing cycle ends
ok .. let me try
also is it possible for triggering the event for customers that i have already created . because in clock , we add customer and it creates new customer
With test clocks via dashboard, it's not possible.
Might be possible with the API but I haven't tried it myself so don't know.
ok not an issue . i advanced the clock but i did not received any call to my webhook API
can you provide any reference for API because i can't straightly hit API as it has webook validation and when i printed body . i can see only buffer . i am not sure how to pass this from postman
There's no way to trigger this by calling API directly
The test clock should trigger it
You'd likely want to advance the clock 1 or 2 days after the billing cycle date so that the latest invoice is generated and paid
does that means when user pays money then invoice.payment_succeeded is not triggered immediately
when the user pays, it generates invoice.paid
Depending on the payment method (like ACH) it could take a while for the payment to succeed
ok that means performing task on invoice.payment_succeeded is safe . Actually i am adding credits to user account when i receive payment . if user money is deducted now and i am crediting credits after 2 days is not good
For a better experience, you can add the credits to account when you receive invoice.paid and assume the payment would succeed.
If it doesn't, you can debit these credits back. Just like you'd handle any failed payments.