#swaroopnagothi25_api

1 messages ยท Page 1 of 1 (latest)

turbid ledgeBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

polar grove
#

Hi, can you share more here? What specific error are you seeing?

junior gulch
#

I am implementing 2 step confirmation using payment element

polar grove
#

Ok, what is happening and where do you see the error?

#

What is the error?

#

Can you share exact steps?

#

I need way more information to help

terse narwhal
#

Hi Why I can not send message on main dev help chat?

turbid ledgeBOT
#

@terse narwhal looks like you're in the wrong place, this thread is for someone else's question.

Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.

junior gulch
#

sorry for the delay. Here is the api request:
POST /v1/payment_intents/pi_3QjiW7GHG8rvZ4ZU1ZfslfcW/confirm

#

Error:

#

Error message
"message": "An unknown error occurred"
"type": "api_error"

polar grove
#

Taking a look

junior gulch
polar grove
#

I see it's a 500 errors: https://docs.stripe.com/error-low-level#server-errors

It is possible to get 500 error from time to time. I was unable to replicate this on my test integartion using two step confirmation. Are you able to make another attempt on a different PaymentIntent and see if you get the same error?

turbid ledgeBOT
junior gulch
#

yes. it is giving me the same.

radiant grail
#

Can you share the new PaymentIntent ID?

junior gulch
#

ok give me a minue

#

Here is the request:
POST /v1/payment_intents/pi_3Qjo8YGHG8rvZ4ZU1guJIssb/confirm

radiant grail
junior gulch
#

I am following the same steps. But I am using payment_method_types instead of using automatic_payment_method

radiant grail
#

Yup I see that, Just want to make sure I'm not missing anything in the code

junior gulch
#

ok

#

const options = {
appearance,
layout: {
type: 'accordion',
defaultCollapsed: false,
radios: true,
spacedAccordionItems: false
},
mode: 'payment',
currency: 'usd',
amount: 1000,
paymentMethodTypes: ['card', 'us_bank_account', 'affirm', 'customer_balance'],
paymentMethodOrder: ['card', 'us_bank_account', 'affirm', 'customer_balance'],
customerSessionClientSecret: customerClientSecret
}

#

These are the options i use for loading the payment element in stripe.

#

customersession features:

#

components: {
payment_element: {
enabled: true,
features: {
payment_method_save: 'enabled',
payment_method_save_usage: 'on_session',
payment_method_allow_redisplay_filters: ["always", "limited", "unspecified"],
payment_method_redisplay: 'enabled',
payment_method_remove: 'enabled'
},
},
}

radiant grail
#

Gotcha. Can you try omitting customer_balance payment method type?

junior gulch
#

ok

radiant grail
junior gulch
#

dude it worked. Thanks.

#

i have a question.

#

what if i want to make payment using bank transfer?

radiant grail
#

Good question, I don't know why it breaks with customer_balance.. Let me see if I can find something..

#

I'm trying to reproduce with the same code you've shared above, but my PaymentIntent just succeeds

#

I see you're creating it as a direct charge, can you try a non-connect payment with customer_balance included?

junior gulch
#

non-connect payment?

#

sorry. I didn't get you

radiant grail
#

You're passing stripe-account header client-side when initializing Stripe.js and server-side (when you create a PaymentIntent). Can you remove that and try again?

#

I'm trying to see if I can get my Stripe connect set up.

junior gulch
#

yes. while creating payment intent, i do pass the connected account Id

#

do you want to remove that and try again? But if iam making a payment using connected account then i have to pass the connected stripe account ID right?

#

correct me if iam wrong.

radiant grail
#

You're correct, I'm just trying to narrow down on what's breaking this flow. So if it works without the connected account ID, then it's something with Stripe connect that's causing this error

junior gulch
#

ok sure

#

i tried by not passing the connected stripe account ID while creating the payment Intent.

#

it still give me the same error

#

POST /v1/payment_intents/pi_3Qjp5JGHG8rvZ4ZU1DORMh4h/confirm

radiant grail
#

Hmm that still used a Stripe-Account header in the confirmation request.

junior gulch
#

for stripeJS, we have to pass accountId right in order to access the stripeJS confirmation Method

radiant grail
#

Not really, no

junior gulch
#

Hoo ok. let me try

turbid ledgeBOT
radiant grail
junior gulch
#

ok

#

I tried by removing stripe account id in confirmation call. It returned an error: No such payment_intent: 'pi_3QjpJkGHG8rvZ4ZU0Ga4aSEz'

#

let me try to enable setting

radiant grail
#

When you enable the setting, you should revert the changes and switch back to the flow when you were passing in the connected account ID

junior gulch
#

on the setting, i can't access the on by default

#

i can choose blocked or off by default

midnight hinge
#

๐Ÿ‘‹ stepping in for my teammate, give me a few minutes to catch up

midnight hinge
#

Let's go back to the scenario that does not involve Connect. Can you remove the stripe_account header when you create the PaymentIntent and remove the stripeAccount ID client side when you initialize Elements?

junior gulch
#

i removed the connect account, in the both cretaion and confirmation call,

#

Confirmation call fails by saying no such payment intent.

midnight hinge
#

Do you have that PaymentIntent ID? I suspect the PaymentIntent was created on the connected account and not the platform

junior gulch
#

Can you tell me the reason for this?

#

it is happenning when i pass acss_debit to the paymentElement

midnight hinge
#

Sorry for the delay!