#shubhamjha
1 messages · Page 1 of 1 (latest)
i am moking a ui for them
What do you mean?
they have option to select which currency they want to pay in through webpage
?
are you their
Okay.
How do you pass the currency to the Checkout Session?
If they return to the payment later, do you create a new Checkout Session?
no
ones they cancel the chkout session they need to create again by selecting the currency
like this way
So do you Update the existing Checkout Session object?
no
Sorry, I don't understand. So you create a new one?
i just want if payment is incomplete then not to locked the currency
yes
Okay, so what's the issue?
How to unlock the currency if stripe loked it if payment is incomplete using node js
Could you give me an example please? Where you observe this locking behaviour?
look in this payment is incomlete in that case currency is loked to usd
i want to unlock it
when this issue occur
Could you please copy the PaymentIntent ID? pi_xxx
But if you create a new Checkout Session, you don't need to care about this PaymentIntent.
pi_3MrczESBeubK048w0LglQ5yI
exactly but in that case currency is loked
why
i know if payment is success then customer cannot change their currency but here payment is not completed
I see. It's because you used a Price with a specific currency for the Checkout Session, and for that a PaymentIntent was created automatically. You can't update a PaymentIntent created from a Checkout Session.
is their any event in webhook to look into this isssue ?
So the behaviour is expected.
how can i get this in my webhook call ? is their any event ?
Sorry, I don't understand what's the issue.
You are creating a new Checkout Session object every time the customer selects a currency on your website and you redirect them to the Payment Page, that displays the amount in the currency of the Price that you provided, according to the currency the customer selected, correct?
What's the expected behaviour?
What do you want to get?
if a payment is incomplete where i get it in webhook
Okay, I understand. I don't think we have a webhook event for that.
oh
But at what moment do you want to receive the event?
As soon as the Checkout Session is created, an incomplete PaymentIntent is created automatically.
I guess you'd listen for payment_intent.created events. But note there's no 'incomplete' status in the API. That Dashboard status maps to a a handful of different API statuses
Also, you must be on an older API version as Checkout no longer creates a Payment Intent on session creation: https://stripe.com/docs/upgrades#2022-08-01
Yep, that's expected for pi_3MrczESBeubK048w0LglQ5yI. Your customer attempted to pay, we created the Payment Intent but 3DS was requested and not completed
It's in a requires_action state
What is it you're trying to do exactly?
ok but payment is not completed or success but stripe lockedk the customer currency
I don't need to locked it before any success payment how can i do it?
Yep, as explained you can't update/mutate any Payment Intent generated by Checkout
So you'd just discard that Payment Intent, and create a new Checkout Session to reflect the currency change
how can i discard it ?
You can't, I just meant forget about it
but can he pay & select new currency after this in new checkout session?
Correct
no that is the issue, now when user enter again, stripe do not allow to open different currency page, its in currency locked status
I don't know what a 'currency page' is?
Can you share a code example of what it is you're trying to do?
i mean to say, when we redirect user on checkout page again with new currency price ID.. it throws error
this error
That's not an API error: that's an error from your webhook handler responding to those events
I'm confused by what error(s) you're referring to
Can you share this error you're referencing? Because the screenshot you shared earlier is unrelated
Yup, this is expected: https://support.stripe.com/questions/setting-a-customers-default-currency
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
You'll need a new Customer object
but customer payment is in completete
They must already have another active Subscription
If you share the cus_xxx ID I can confirm
cus_Ncu73OdjhPGyv1
Yep, this previously paid Invoice will have locked the currency to INR: https://dashboard.stripe.com/test/invoices/in_1MrfmKSBeubK048wKy9DwtJI
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.