#anrighiwr_api

1 messages ยท Page 1 of 1 (latest)

devout nebulaBOT
#

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

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

tawdry fiberBOT
polar hazel
#

Hi, let me help you with this.

#

That's why you can't do it on the frontend.

#

You need to remove confirm: true from the initial request.

stuck salmon
#

i am trying, but it gives me back this error, when creating the PaymentIntent server-side: The parameter confirmation_token cannot be passed when creating a PaymentIntent unless confirm is set to true

tawdry fiberBOT
hard cloud
#

๐Ÿ‘‹ stepping in

stuck salmon
hard cloud
#

Are you planning on confirming server-side or client-side?

stuck salmon
#

we were triggering the confirm method client-side, in order to show the 3DSecure interface, if needed - but i see that stripe.handleNextAction works as well

#

so i'm going to create the payment intent server-side, with confirm: true

hard cloud
#

Okay yeah you would only use a Confirmation Token if you are going to confirm server-side.

#

Otherwise you don't use Confirmation Tokens

stuck salmon
hard cloud
#

You want to confirm server-side?

stuck salmon
#

but this is the error triggered: Uncaught (in promise) IntegrationError: handleNextAction: The PaymentIntent supplied is not in the requires_action state.

hard cloud
#

Correct, you don't call handleNextAction() unless you confirm server-side and then 3DS is required.

stuck salmon
#

ok how can i confirm server-side?

hard cloud
stuck salmon
#

when i try to confirm the payment server-side, this is the new error which shows up: Payment details were collected through Stripe Elements using automatic payment methods and cannot be confirmed with a Payment Intent configured with payment_method_types.

hard cloud
#

Hmm looks like you are passing ```payment_method_types: {
0: "automatic_payment_methods",
},

 in your request?
#

What happens when you remove that?

stuck salmon
hard cloud
#

That is the default on our newer API versions however....

#

What happens if you try passing that with the confirm API? Can you test that just to check?

#

Ah actually that won't work.

stuck salmon
hard cloud
#

Okay I remember that this is just a friction point at the moment with using the Subscriptions API.

#

Let me also check on what the status is on this feedback internally as I know this is an already-discussed rough edge here

#

Hmm actually

#

Can you test one more thing?

#

What happens if you use the 2023-08-16 in that confirmation request?

hard cloud
#

Hmm dang

stuck salmon
#

specifiying card as payment method seems to be working

hard cloud
#

Client-side?

#

That should work, it is just a bummer because you lose out on the Automatic Payment Method functionality

tawdry fiberBOT
stuck salmon
#

i have another issue: in a single PaymentElement implementation, i create two different Subscriptions, to different products - it gives me back this error: The confirmation token has already been used to confirm a previous PaymentIntent

#

is there any way that i can create two different confirmation token from the same Payment Element? or that i can use twice the same token?

low quail
#

I think what you need to do is create the second subscription, passing in the payment method id that was created as a result of the confirmation token

stuck salmon
#

it works ๐ŸŽ‰ i just needed to attach it to the customer before

low quail
#

Yeah I think setup future usage allows payment method to automatically attach

stuck salmon