#codefoot_api

1 messages ยท Page 1 of 1 (latest)

drifting vesselBOT
#

๐Ÿ‘‹ 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/1331718429895299102

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rocky dirge
drifting vesselBOT
frigid void
#

Hello, looking in to this but yes it should be possible. To align on some terminology, allow_incomplete and default_incomplete only apply to subscriptions that are set to have payment_behavior=charge_automatically . Creating a subscription with default_incomplete will allow oyu to create a subscription that does not attempt to charge the customer immediately, but will save their PM and charge automatically going forward. Is that roughly the behavior that you are looking for?

wispy sluice
#

Yes it is, although when creating the subscription using subscriptionSchedules.create there isn't an equivalent attribute to set this

#

So I'm wondering if I'm missing something or if best practices is to listen to invoice.paid event then apply the schedule after the fact

frigid void
#

Ah gotcha, I do see that now. I thought there was a way to set this, but must have been thinking of another setting. The subscription that the schedule creates should default to allow_incomplete which means the subscription will try to charge a default PM if one is set and otherwise it goes into an incomplete state. Would that behavior work for your scenario?

wispy sluice
#

Yes that is the desired behaviour

frigid void
#

Gotcha. Are you seeing another behavior when you test this in test mode, or were you more confirming that this is how it works?

wispy sluice
#

Hmm I'll need to test again as this was the other day. One minute.

#

What is the relationship for payment_behaviour when it is created on a subscription? Here's the response I get after I:

  1. Create a new customer
  2. Create a new recurring interval = month price
  3. Create a subscription schedule using customer/price
  4. Retrieve subscription that was generated
frigid void
#

My understanding is that it defaults to allow_incomplete, so once that invoice finalizes we will attempt to charge the default PM on the Customer or Subscription if it is set, otherwise the subscription will go into an incomplete state.

wispy sluice
#

Where can I see said status

#

That is the allows_incomplete or is that background whereby the invoice status will update accordingly?

frigid void
wispy sluice
#

Got ya