#swaroopnagothi25_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- swaroopnagothi25_api, 6 days ago, 3 messages
Hi, can you share more here? What specific error are you seeing?
I am implementing 2 step confirmation using payment element
Ok, what is happening and where do you see the error?
What is the error?
Can you share exact steps?
Can you share the request id where you see this error if any? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I need way more information to help
Hi Why I can not send message on main dev help chat?
@terse narwhal looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
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.
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"
Taking a look
I tried one more time. here is the response: {
"error": {
"message": "An unknown error occurred",
"request_log_url": "https://dashboard.stripe.com/acct_1QUkAmGHG8rvZ4ZU/test/logs/req_g0TzRgTAIaAEnS?t=1737470004",
"type": "api_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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?
yes. it is giving me the same.
Can you share the new PaymentIntent ID?
ok give me a minue
Here is the request:
POST /v1/payment_intents/pi_3Qjo8YGHG8rvZ4ZU1guJIssb/confirm
Repsonse: {
"error": {
"message": "An unknown error occurred",
"request_log_url": "https://dashboard.stripe.com/acct_1QUkAmGHG8rvZ4ZU/test/logs/req_NdVN2SzoO4IxRx?t=1737491608",
"type": "api_error"
}
}
Can you share the code you're using to initialize elements on the client-side?
https://docs.stripe.com/payments/build-a-two-step-confirmation#add-and-configure-the-elements-provider-to-your-checkout-page
I am following the same steps. But I am using payment_method_types instead of using automatic_payment_method
Yup I see that, Just want to make sure I'm not missing anything in the code
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'
},
},
}
Gotcha. Can you try omitting customer_balance payment method type?
ok
dude it worked. Thanks.
i have a question.
what if i want to make payment using bank transfer?
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?
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.
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.
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
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
Hmm that still used a Stripe-Account header in the confirmation request.
for stripeJS, we have to pass accountId right in order to access the stripeJS confirmation Method
Not really, no
Hoo ok. let me try
One more thing we can check is, Bank transfers is disabled for connected accounts here - https://dashboard.stripe.com/settings/payment_methods/connected_accounts?config_id=pmc_1OWd7THdB9qiiLxhmVNtNlYe
Can you try enabling it?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
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
on the setting, i can't access the on by default
i can choose blocked or off by default
๐ stepping in for my teammate, give me a few minutes to catch up
ah, I think this is because connected accounts with Dashboard access have to enable bank transfers from the Dashboard themselves
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?
i removed the connect account, in the both cretaion and confirmation call,
Confirmation call fails by saying no such payment intent.
Do you have that PaymentIntent ID? I suspect the PaymentIntent was created on the connected account and not the platform
Can you tell me the reason for this?
it is happenning when i pass acss_debit to the paymentElement
Sorry for the delay!
ACSS is not supported for the deferred intents flow: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#enable-payment-methods