#celsian_subscription-avatax

1 messages ¡ Page 1 of 1 (latest)

willow isleBOT
#

👋 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/1273324664084496539

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

cursive portal
#

I believe you just have to pass payment_behavior: "allow_incomplete"

#

Can you try that and see if it works with a test subscription?

trim vine
#

Unfortunately, that finalizes the invoice immediately, is there anyway to prevent that behavior?

cursive portal
#

It shouldn't do that if you also pass pay_immediately: 'false'

trim vine
#

The Stripe API will not allow me to pass pay_immediately false when passing payment_behavior: "allow_incomplete":

Stripe::InvalidRequestError: You cannot set payment_behaviortodefault_incompletewhen passing in the parameterpay_immediately.

cursive portal
#

That error message indicates that you're passing payment_behavior: 'default_incomplete' instead of payment_behavior: 'allow_incomplete'

trim vine
#

Oh, I'm sorry. I missed that in your message above, let me give that a try

willow isleBOT
blazing berry
#

celsian_subscription-avatax

#

none of this should work

trim vine
#

Stripe::Subscription.create({customer: "cus_Q2UyTwv6lgE7ma", items: [{ price: "price_1Pcs8aJyFlemKh0gSp95T5D6" }], payment_behavior: "allow_incomplete", pay_immediately: "false"})

This does leave the invoice in draft state, but the subscription is already active in this case. That might be something we can code around though.

blazing berry
#

Are you able to pass pay_immediately? Because it's a "secret" feature just for Avalara and your Stripe account has to be approved for this feature.

trim vine
#

I am able to pass it.

#

I never requested access to the feature, it may have been enabled by our dedicated Stripe rep. I'm not sure. We meet with him bi weekly.

blazing berry
#

yeah it's likely the case. So in that case what my colleague recommended should work, you need to pass pay_immediately. But that's a better question for your Stripe rep in that case

trim vine
#

Ok, I'll connect with him on it.

#

Thanks for the help.