#just-john_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
taking a couple of steps back, is there a reason why you're creating a subscription schedule instead of a subscription?
Okay, that sounds a little better. I will take a look at doing it that way, thanks.
Yes. Let me grab an example of what we need to do. It requires a 3 phase subscription.
ah, it's fine, the fact that you know you need a 3 phase subscription means you definitely need a subscription schedule ๐
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
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup - you'll want to refer to the Setup a payment method tab
unless the use case changed, I believe my colleague previously mentioned that you only need a single phase though - https://discord.com/channels/841573134531821608/1291575646811852931
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.
ah i see, feel free to reach out again if you run into issues!
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.
ahhhh, i'll pass on the feedback about the tabs
I mean, I think they're perfectly visible. Totally my fault.