#mymodian_best-practices

1 messages ¡ Page 1 of 1 (latest)

gusty sinewBOT
slow dirgeBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

gusty sinewBOT
#

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

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

charred surge
crimson compass
#

here's the request id: req_ZDHfp3SCIMyjhV

#

my question is that can we use subscription.New to create a subscription for a customer with AutomaticTax and collect the customer's address while paying

charred surge
#

Thanks for the ID, you encountered this error because the customer doesn't have an address, and Stripe Tax needs customer's address in order to calculate tax

#

The checkout will collect the address and set it to the customer object before creating a subscription

crimson compass
charred surge
#

Sure, you can use AddressElement to collect the address, and set it to the customer object.

crimson compass
#

is that if we want to use subscription.New to create the subscription, then we must collect the customer's address before it?

charred surge
#

Yes, if you want to enable automatic tax.

crimson compass
#

OK. i have another question, i need to use subscriptionschedule.New to create a subscription started in the future, and collect the payment method for it. how to acheive this?

#

i didn't find any field in the response object that contains the ClientSecret to collect the payment method for the scheduled subscription.

charred surge
#

You can create SetupIntent and use its clientSecret to collect a payment method for the customer.

charred surge
#

That's my recommendation. Or do you have another approach you have in mind and want to discuss?

crimson compass
#

i have tested before that if i use subscription.New to create a subscription with trial, the returned object will contain a PendingSetupIntent to collect the payment method, i just want to know that is there a object like this in the response of subscriptionschedule.New.

charred surge
#

No, subscriptionSchedule doesn't have pending_setup_intent

crimson compass
#

OK. Thanks for your help, i have no questions now.