#dorian_subscription-events

1 messages ยท Page 1 of 1 (latest)

onyx vaultBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260717198968619080

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

hearty plank
#

@spark nacelle yes default_incomplete is what you want, and you'd get customer.subscription.updated.
I highly recommend justing testing this yourself end to end to self-serve an answer, it's likely as fast as asking us here

#

dorian_subscription-events

spark nacelle
#

Thnaks. Your answer was faster! ๐Ÿ˜„

hearty plank
#

I know, but still was important to say, as the developer it's good to self-serve most instead of just asking us

spark nacelle
#

Thnaks again

spark nacelle
#

Follow up question please @hearty plank - if payment fails, is tehre an option to retry x times before eventually canceling the sub?

hearty plank
#

you can retry for up to 24 hours, that's how long the incomplete status last. The idea is to use this when the customer is right there, on your app/website, trying to pay, where you can tell them if the payment failed

spark nacelle
#

Ah ok

#

Thanks

spark nacelle
#

Sorry another question. If I set the payment_behavior to default_incomplete, will Stripe still attempt to change the invoice automatically? I just tested this and I didnt see the payment attempted.

#

But I didnt pass the ollection_method=charge_automatically parameter - is that why?

hearty plank
#

I don't really get the question sorry

spark nacelle
#

I am running our subscription activation as a nightly cron job. The user isnt logged in at the time. So when I run the job, I want the subscription to be created and the payment method to be charged. But I only want the subscription to be activated if the payment attempt is successful.

hearty plank
#

Okay then yes payment_behavior: 'allow_incomplete' would work in that case

#

Make sure that your Customer object has a default_payment_method set, since that's what is used to pay the first Invoice

spark nacelle
#

Ah allow_incomplete, not default_incomplete. That will cause the payment to be charged immediately?

hearty plank
#

it would make us attempt to charge and it if fails it'd go to incomplete

spark nacelle
#

Right

#

Thats exactly what I want

hearty plank
#

yay!

spark nacelle
#

Great thanks

#

What status will the sub be in when you are attempting to charge the payment method? Espeically applicable for us_bank_account when processing takes days.

#

I can test that dont worry

#

Thanks again

hearty plank
#

yeah the whole "incomplete" flow only works for synchronous payment methods like card or Link.

spark nacelle
#

Oh so I can't pass a us_bank_account payment method and an allow_incomplete?

hearty plank
#

you can but it will mostly move to active in that case I think

spark nacelle
#

OK I'll test it thanks

#

Seems like maybe I should use Link instead of us_bank_account? I havent looked into Link yet.

hearty plank
#

us_bank_account is ACH Debit, Link is our own wallet (Stripe's)

spark nacelle
#

Right ok. And processes immediately. Presumably fees are higher?

hearty plank
spark nacelle
#

OK thanks again! You are always very helpful.