#LST

1 messages · Page 1 of 1 (latest)

ripe mothBOT
severe trout
#

Hi there!

#

Why does it fail? Does the customer has a default payment method set?

#

Please share the subscription ID (sub_xxx).

limber sky
#

How do I set a payment method for a test customer?
SubID is sub_1NKg92DTiSONMGIuiuTR53aL

severe trout
#

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

limber sky
#

where do I add it, in the test clocks section or in the customer section?

severe trout
#

On the customer object itself

limber sky
#

Hm I can't find it there, where can I add it?

#

Or is there no UI for it

severe trout
limber sky
#

Oh I'm blind, thanks!

severe trout
#

Payment method > add card

#

No worries!

ripe mothBOT
ionic rover
#

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

limber sky
#

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

ionic rover
#

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)

limber sky
#

Ok, is that event also called on initial subscription?

ionic rover
#

don't think so