#jasperste

1 messages ยท Page 1 of 1 (latest)

verbal peakBOT
outer mauve
#

    merchant_id = "21847f85-0cfb-48fd-93fc-cd4fc02bb5cf"
    customer = Stripe::Customer.create({
      description: 'Customer foo',
      email: "foo@foo2.com",
      metadata: {
        "merchantId": merchant_id,
      },
      address: {
        country: 'IT'
      }
    })

    session = Stripe::Checkout::Session.create({
      mode: 'subscription',
      line_items: [{
        quantity: 1,
        price: prices.data[0].id
      }],
      customer_update: {
        address: 'auto',
        name: 'auto'
      },
      customer: customer.id,
      locale: 'en',
      success_url: YOUR_DOMAIN + '/success.html?session_id={CHECKOUT_SESSION_ID}',
      cancel_url: YOUR_DOMAIN + '/cancel.html',
      automatic_tax: { enabled: true },
      tax_id_collection: { enabled: true },
      billing_address_collection: 'auto',
    })
crisp kiln
#

Hi ๐Ÿ‘‹ I don't think there is a way to precheck that box, but will let you know if I find something.

Can you share the ID of the Checkout Session that you're using testing so I can take a closer look at it?

outer mauve
#

For example cs_test_a1SWBI7Ie2Xw1tJGWALOLYgzwYLQcoADManFZUexACm2jMllUYXu6SD8BM

#

ah because of ideal it's auto selecting the Netherlands without being able to change it. But in other methods it also defaults to Netherlands, where I would have expected Italy (I can change it there though)

crisp kiln
#

Yeah, I'm seeing the same thing there, where only Netherlands is available when you have iDEAL selected. That seems to align with iDEAL only being available to customers in the Netherlands.

The other ones are defaulting based on your IP address, not the address on the Customer object.

outer mauve
#

Check. Is there a way to change that behaviour?

crisp kiln
#

No, there isn't. For testing purposes you may be able to pass a specifically formatted email address to mock the customer's location as being detected to be elsewhere.

You might not be able to use this field and customer at the same time, but can you try passing:
test+location_IT@example.com' in the customer_email field when creating the session.

outer mauve
#

Check. No we wanted to help out users. But maybe automatically is fine via the IP

#

Thanks

#

After your suggestion it might not be possible, I looked into the docs for the precheck of that tickbox (plus looked in Discord), but indeed it doesn't seem like that's possible without building the checkout ourselves

crisp kiln
#

That aligns with what I was seeing (or wasn't seeing ๐Ÿ˜… )

outer mauve
#

Haha, great. Thanks! That was all. Have a good day and again thanks for the quick help