#thomask_best-practices

1 messages ยท Page 1 of 1 (latest)

potent sleetBOT
#

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

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

undone sentinel
#

Hi ๐Ÿ‘‹

Is your question about requiring billing address collection through the Customer Portal?

bronze cliff
#

Yeah I guess you could put it like that

undone sentinel
#

We focus on specific API integration questions on this server so that's how I'm trying to frame the question.

#

address
Allow updating billing addresses.

#

You can enable both the collection of a payment method as well as a tax ID and billing address in the same portal configuration.

bronze cliff
#

Yeah okay, but that's a bit of an odd flow. Because then I'd have to separately get a customer to go through a flow to add a payment method and another flow to add a billing address

#

I also want to use automatic_tax, but It seems that, when I create a subscription without payment method, this won't work as there's no address for the customer yet

#

Can I enable automatic_tax later, after the customer has provided their address details?

undone sentinel
#

However, I want to caution that Stripe Billing is pretty powerful and flexible but that flexibility comes with a cost. It's pretty easy to shoot yourself in the foot.

I strongly recommend writing end-to-end simulations of your subscriptions flows in Test mode to verify the desired behavior.

bronze cliff
#

Yeah I don't really know where to go from here tbh. I'm following the flow here: https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment. So during the trial, I want to get users to provide a payment method. So we have a box like this in the sidebar. This takes them to the "add payment method" flow. But after they're done, we still won't have a billing address or VAT id, so we can't use automatic tax.

  1. Is there anything I can do to make users have to enter their payment details during the "add payment method" flow, just like it is possible with a checkout session (using 'billing_address_collection': 'required'). ==> I think you answered this as no
  2. I guess that means my only option is to collect the details at the application level and send them to Stripe using the API. Does Stripe offer any UI components for this?
  3. Any other suggestions?

Delay payments on active subscriptions using trial periods.

undone sentinel
#
  1. Have you tested using the Checkout Session in mode='setup'? That way you can require billing address collection & tax ID collection
  2. Stripe does have the Address Element for use collection customer address information. https://docs.stripe.com/js/element/address_element
potent sleetBOT
cosmic parrot
#

Hello, stepping in because my colleague is leaving soon. I agree that those two solutions are probably the best workarounds for now. A variant of #1 that could be helpful is you can create a Checkout Session in subscription mode with 'billing_address_collection': 'required'. That will mean that the subscription won't be created until the user submits that info through the Checkout Session

bronze cliff
#

I think a checkout session in setup mode with:

{
  "tax_id_collection": {
    "enabled": true
  },
  "customer_update": {
    "name": "auto",
    "address": "auto"
  },
  "billing_address_collection": "required"
}

Is what I need

cosmic parrot
#

Yep, sounds perfect, that definitely makes more sense if you always want to create the subscription on signup