#issamdb-trialend

1 messages · Page 1 of 1 (latest)

potent sand
#

hello, you do the latter

but it's not immediate, but rather drafts an invoice scheduled for after 60 min.

then manually finalize() and pay() the Invoice via the API.

frigid sedge
#

I will have to implement this using webhook events as it takes the drafted invoice few minutes to be created, is there a way to finalize this process in the same methode?

potent sand
#

no you have to finalize and pay as separate API requests

frigid sedge
#

aha, I see

#

Okay thank you 🙂

#

is there a way to distinguish the first invoice created after trial period end from other invoices?

potent sand
#

have some ideas but none super clean (yet)

what is the billing_reason on the first Invoice (one after trial)

frigid sedge
#

subscription

#

my idea is to check if there was a an invoice prior with amount due = 0

potent sand
#

give that a look and see if what I say adds up on the cases you'll have

frigid sedge
#

Alright

#

this is correct, but subscription_create also applied to new subscriptions without trial

potent sand
#

and subscription_create on first Invoice no trial
correct that is what I meant with ^

frigid sedge
#

sorry didn't catch that