#Binh Nguyen

1 messages · Page 1 of 1 (latest)

celest cairnBOT
hollow dome
#

after 1 hour

fringe stratus
#

is there a way to make that invoice charge on the starting date?

hollow dome
#

you could listen to webhooks and manually call the Finalize Invoice and Pay Invoice APIs if you feel that's really necessary and worth the extra complexity

fringe stratus
#

So how can I disable the default invoice finalizing behavior?

hollow dome
#

not sure what you mean exactly?

celest cairnBOT
fringe stratus
hollow dome
#

well, you could listen to webhooks and manually call the Finalize Invoice and Pay Invoice APIs if you feel that's really necessary and worth the extra complexity

#

to be more specific, there's a customer.subscription.created event at the time when the Schedule creates the Subscription , when using a Schedule to start it on a future date

#

when handling that event, you can see via the schedule field on the Subscription object that it was created by a Schedule. You can get the first Invoice of the subscription through the latest_invoice field on the Subscription object. And then you can call the API to directly finalise it at this time, if you want, instead of just letting us do it an hour, again if you feel that's really necessary and worth the extra complexity

#

also to clarify, I'm assuming that when you say :

or about 1 hours after create the schedule?
you have a typo and you actually mean 1 hour after the schedule creates the subscription(it definitely is not the case that if you use a Schedule to start a Subscription 1 month from now, that we create an invoice 1 hour after you call the SubscriptionSchedule Create API; the invoice is created when the Subscription is created instead.)

fringe stratus
fringe stratus
hollow dome
#

yes

#

sorry, not sure how you thought the invoice would be created 1 hour after you call the Schedule Create API so I assumed you meant something else