#LST
1 messages · Page 1 of 1 (latest)
Hi there!
Why does it fail? Does the customer has a default payment method set?
Please share the subscription ID (sub_xxx).
How do I set a payment method for a test customer?
SubID is sub_1NKg92DTiSONMGIuiuTR53aL
yes I just checked, that customer has no payment method set, so it's expected to fail.
If you want to do that is test mode, maybe the quickest way is to add a 4242 card in the dashboard, and set it as default
where do I add it, in the test clocks section or in the customer section?
On the customer object itself
Oh I'm blind, thanks!
Hey, what event should my backend listen for to trigger renewing an existing subscription? I can't use invoice.paid because I use metered billing (in arrears)
can you expand on the question, what exactly does "renewing" mean to you
I need to keep track of user's subscriptions in my backend, so when a billing cycle ends and a new one starts (and the subscription is still active) ,I need to grant access for the corresponding user for another billing cycle in my backend
you could listen to customer.subscription.updated and look for when the current_period_start and current_period_end have changed(indicated by them appearing in previous_attributes)
Ok, is that event also called on initial subscription?
don't think so