#Moichi - billing

1 messages · Page 1 of 1 (latest)

low totemBOT
edgy delta
#

Hi there!

lilac gull
#

That works if the invoice already exists, but upcoming do not create an invoice. In this case I have to check if for the current subscription already an invoice exists that would indicate recurring...

edgy delta
#

Hum... Can you use the start_date of the subscription to guess if it's the first invoice or not?

lilac gull
#

last thing sounds promising, I will try that , thank you

lilac gull
#

Approach fails, because a subscription always creates an invoice with 0,00€, so I will always have one... I guess then I have to make another API call to check invoice amount...

edgy delta
#

Well, it means that you are not looking for the first invoice, but the second invoice? Or the first non-zero invoice?

lilac gull
#

well I need to know if the charge of a customer is the first time or a follow up (second year). the subscription is charged once a year. So it seems I have to get the first invoice with amount > 0

edgy delta
#

That's an option. But you could also check the start_date of the subscription to know if it's a new subscription or an old one.

lilac gull
#

so you suggest to compare start_date.year against now.year ?

edgy delta
#

Yes

lilac gull
#

ok, i think this will work for my case. Will try this, thanks.

robust sorrel
#

Moichi - billing