#Tobq

1 messages · Page 1 of 1 (latest)

thick wolfBOT
honest iron
#

Hi, can you confirm how you've integrated with Stripe? Are you usingCheckout? Or something else?

thin sage
#

checkout

#

@honest iron checkout

honest iron
thin sage
#

@honest iron yeah i think im using that

#

but when i start the session, I specify one of the prices

#

because its a single price field

#

will it ignore this price, if a more local price is available?

#
const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [
    {
      price: priceId,
      // For metered billing, do not pass quantity
      quantity: 1,
    },
  ],
  // {CHECKOUT_SESSION_ID} is a string literal; do not change it!
  // the actual Session ID is returned in the query parameter when your customer
  // is redirected to the success page.
  success_url: 'https://example.com/success.html?session_id={CHECKOUT_SESSION_ID}',
  cancel_url: 'https://example.com/canceled.html',
});
```https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout#create-session

Create and manage subscriptions to accept recurring payments.

honest iron
#

I have not tested this in a while, let me try this on my end real quick

#

When you create a multi-currency price, you get one price id. You'd then pass that price id when creation the checkout session under line_items. When a customer loads a Checkout Session, Checkout tries to automatically present the customer’s local currency as determined by their IP address, https://stripe.com/docs/payments/checkout/present-local-currencies#checkout-experience

To test this, you can pass a explicit email address as noted here: https://stripe.com/docs/payments/checkout/present-local-currencies#test-currency-presentment

honest iron
#

@thin sage Let me know if you have questions here

thin sage
#

i think maybe i didn't create a multi-currency price

#

instead i created 2 prices

#

@honest iron yep, thanks