#just-john_best-practices

1 messages ยท Page 1 of 1 (latest)

candid beaconBOT
#

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

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

halcyon swan
#

hello! You collect the PaymentMethod upfront and attach it to the Customer using the Payment Element and a SetupIntent. You then set the default payment method set on either the Subscription Schedule[0] or on the customer [1].

[0] https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-default_settings-default_payment_method
[1] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method

#

taking a couple of steps back, is there a reason why you're creating a subscription schedule instead of a subscription?

ebon fog
#

Okay, that sounds a little better. I will take a look at doing it that way, thanks.

ebon fog
halcyon swan
#

ah, it's fine, the fact that you know you need a 3 phase subscription means you definitely need a subscription schedule ๐Ÿ˜†

ebon fog
#

Here is an example of how it should work:
I book today for Jan 1 to April 10 with $1000 rent and $500 security deposit. I should pay
$1500 today
$1000 Feb 1
$1000 Mar 1
$333 Apr 1

halcyon swan
ebon fog
#

The last person I talked to said that that person was incorrect, and the method the second person suggested to me currently appears to be working.

#

I do have several things hard coded right now that will need to be dynamic eventually, but as long as the subscription phases can have 0 iterations and maybe a couple other uncommon things like that then we should be okay.

halcyon swan
#

ah i see, feel free to reach out again if you run into issues!

ebon fog
#

Sure, thanks! Looks like the main problem is just that I missed this tab you just linked. If I saw the create payment method from react component thing I would have figured out at least the first part myself.

halcyon swan
#

ahhhh, i'll pass on the feedback about the tabs

ebon fog
#

I mean, I think they're perfectly visible. Totally my fault.