#imDeaDshoT-Billing

1 messages · Page 1 of 1 (latest)

high geyser
#

Hi there, you can ask your questions here and we're happy to help you

silver birch
#

hello Jack thanks a lot

#

i spoke with chat support on stripe before but today came to know this is place for technical support
So it appeared from previous conversation that

#

i had to set auto_advance as true while creating/finalizing invoice + set saved payment method on customer as default

#

i made code changes, tested on 1 deposit transaction with customer id and still in invoice webhook response it says default payment method as null

#

although click on customer payment methods it does show the default flag

#

let me know if you need furthur details, happy to expand

high geyser
#

OK, did you set the customer's invoice_settings.default_payment_method ?

silver birch
#

yes that's what i did

high geyser
#

OK. can you send me the customer ID?

silver birch
#

yeah, this is "cus_LHVIVw6W3QV55K",

#

test environment

#

invoice id - "in_1KawJ5JeHVSfrG3lOVcASblE",

high geyser
#

The invoice is still in draft mode, it's not finalized yet.

silver birch
#

oh right, but doesn't it get finalised automatically for automatic charging case? must I do that manually?

#

i thought auto_advance setting to true will finalise it automatically

#

in backend while creating invoice i sent it as true

high geyser
silver birch
#

okay got it so i shall wait for an hour first to see if it gets finalized

#

if not I will do this programmaticallyt

high geyser
#

It's up to you, you can call the finalize API when you think the invoice is good to go.

silver birch
#

got it thanks for the clarification

#

could you keep this thread open in case i have furthur queries?

high geyser
#

Sure, in case if it's closed, you can just ask in the dev-help channel and we'll open it again or just create a new one.

silver birch
#

thanks a lot!

#

hi Jack
so it should be automatically finalise now
and i got this info at top of dashboard:
You’re in test mode, so your customer won’t be charged for this invoice. Customers and products created in test mode can’t be used for live invoices.

#

so does that mean we can't test it on test env and must test a live payment on production?

high geyser
#

You can still test in test mode, it's just that Stripe won't send the invoice emails in test mode.

silver birch
#

i have 1 doubt, in stripe billing settings, its set due payment to collect in 30 days, so once this fix is on production it will auto deduct 2nd invoice after 30 days for deposit payment as expected?

high geyser
#

Is it the invoice template -> default payment terms?

silver birch
#

will this override the 1 hr default time for finalize invoice?

high geyser
#

These are two different things

  • the one hour is to let Stripe finalize the invoice automatically -> to move the invoice status from draft to open
  • the payment terms 30 days is the period of time that your customer should make payment within -> applicable to invoices of open status only.
silver birch
#

got it, so finalizing invoice basically just toggles status from draft to open

#

then open invoice on live env gets paid after default payment terms (30days in this case)

high geyser
#

The payment terms are only applicable to customer who pay the invoice manually (i.e., collection_method=send_invoice, if you set the invoice to charge_automatically + auto_advance=true then the customer will be charged when the invoice is finalized.

silver birch
#

got it

#

and for automatic charging, we can't override the invoice finalizing duration from 1 hour to 30days?

high geyser
#

the max is 1 hour, but why do you want to delay the invoice finalization?

silver birch
#

oh, its because for our implementation of deposit payments, business requirement was to charge next invoice after 30days

#

in step 3 of invoice lifecycle as per docs, it says stripe automatically attempts paymenr for open invoice, is this attempt immediate or can be configured with some delay?

#

let me rephrase, we don't want to delay invoice finalization, just want to delay payment attempt of open deposit invoice to 30days as per requirement

high geyser
#

But you can generate the next invoice later (on the 30th day) and charge?

silver birch
#

yes we were doing it before manually, but recovery rates were low hence tried to see if automatic charging can help in some way

high geyser
#

Stripe will automatically retry the payment attempt if the previous payment fails, and you can also configure to send reminder email to your customer before the invoice date.

silver birch
#

got it, so this depends on how frequent have i set the retry payment schedule, for eg, i saw currently its 3 times in 4 weeks or so

#

based on that frequency stripe will keep retrying, and if still not paid, we can manually trigger the next invoice