#cyrez-subscriptions

1 messages ยท Page 1 of 1 (latest)

cinder drum
#

๐Ÿ‘‹ happy to help

#

do you mean asynchronously? or via API ?

indigo sedge
#

for subscriptions i currently use "latest_invoice" in the subscription object

#

via api

#

but this doesn't cover manual invoices

cinder drum
indigo sedge
#

it's a page where i display the customers invoices, payment method, billing address. i would like to give them a warning if the latest payment failed and they need to update their payment method

cinder drum
indigo sedge
cinder drum
#

and the last_payment_error if any

indigo sedge
#

and how can i get the latest "relevant" invoice?

cinder drum
#

but that wouldn't filter the one that is not related to a subscription

indigo sedge
#

my current logic: check subscription.latest_invoice <- check for errors

cinder drum
#

and use the query subscription:null

indigo sedge
#

i would replace this logic and just check the latest invoice for an customer

#

regardless of it's belonging to an subscription or is a manual invoice

cinder drum
#

that could be a solution yes

indigo sedge
#

ok thanks i will try that.

cinder drum
#

let me know if you need any more help

indigo sedge
#

one more question:

cinder drum
#

yes sure

indigo sedge
#

and directly take the first one in this list

#

that should always be the latest payment right?

cinder drum
#

we use Payment Intents for mostly all of our products

#

but if you feel it's a better choice for you and that it corresponds to what you're trying to achieve then yes

indigo sedge
#

am not quite sure yet, just trying not to miss anything

#

i will look into this approaches and come back if neccessary, thanks for your help

cinder drum
#

sure let me know if you need any more help