#jared_api

1 messages ¡ Page 1 of 1 (latest)

sturdy depotBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313520020600520715

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

noble idol
#

Hi, let me help you with this.

#

What do you mean by "batch payments by day" exactly?

sick mesa
spare adder
#

Can you share an example subscription and unexpected invoice?

#

Its possible, i am speculating, that the first pending item is invoiced ~immediately, but if you created another one afterward it would throttle that and wait until the next day

#

to rephrase this, are you observing multiple invoices being created in less time than the interval you set?

sick mesa
#

Here's a test mode customer

spare adder
#

or are you expecting there to be a delay for the first such invoice, and instead seeing it more or less immediately?

#

Ok, and what about that customers invoices are unexpected to you?

sick mesa
#

I would expect when the invoice quantity is updated for the payments to not be charged immediately

#

But perhaps that's a misunderstanding of what pending_invoice_item_interval does

#

We have some customers doing a high volume of transactions, and want to avoid the credit card marking the charges as fraudulent

sick mesa
#

Is there another attribute that needs to be passed to achieve this behavior?

spare adder
#

oh, i missed this in my first look

#

you're passing

proration_behavior: "always_invoice",
#

that's going to override the default behaviour and always invoice

sick mesa
#

So should it be none?

spare adder
#

You likely want to omit that, unless you specifically want to create an invoice for a change that would otherwise be pending

#

The default is create_prorations which are pending items

#

For which the default is to include thos eon the next recurring invoice

#

If you use none then any changes to the subscription will not be prorated, so it depends what you want

#

(no pending items will be create for plan changes, eg)

sick mesa
#

Is there a way to create the invoice immediately but only charge the customer once a day?

spare adder
#

Not that i know of, unless you manage that yourself

#

ie, use create_prorations (or omit it and accept the default) then after creating pending items, check for the last invoice time. If >24h then create invoice.