#kun_setupintent-3ds

1 messages ¡ Page 1 of 1 (latest)

solid orchidBOT
#

👋 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/1271143235913519258

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

unkempt sierraBOT
#

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.

celest sandal
#

let me add the full error and code

south lichen
#

@celest sandal if the SetupIntent has status: 'succeeded' then it doesn't make sense to do anything client-side after that. It already succeeded. That's why you get that "unexpected state" error

#

kun_setupintent-3ds

celest sandal
#

the code:

handleSetupIntent(clientSecret: string, customerId: string, payment_method: string) {
this.stripeService.confirmCardSetup(clientSecret, {
payment_method: payment_method,
}).subscribe((result) => {
console.log(result, "card results");
const { nameOnCard, billingAddress, city, country, postalCode } =
this.cardForm.value;
const payload = {
userEmail: this.userInfo.email,
billingStreetAddress: billingAddress,
billingCity: city,
billingCountry: country.name,
billingZipCode: postalCode,
isCardVerified: true,
paymentMethodId: payment_method,
customerId: customerId,
}

the error

{
"type": "invalid_request_error",
"code": "setup_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/setup-intent-unexpected-state",
"message": "A processing error occurred.",
"request_log_url": "https://dashboard.stripe.com/logs/req_AibpWJJc8hdJsA?t=1723132474",
"setup_intent": {
"id": "seti_1PlYfcFrwl37tCGi1XsHiIs8",
"object": "setup_intent",
"automatic_payment_methods": {
"allow_redirects": "never",
"enabled": true
},
"cancellation_reason": null,
"client_secret": "seti_1PlYfcFrwl37tCGi1XsHiIs8_secret_QcoIa76uWQWqcsmPA5yj1eOK3XtvARf",
"created": 1723132472,
"description": null,
"last_setup_error": null,
"livemode": true,
"next_action": null,
"payment_method": "pm_1PlYfaFrwl37tCGinVqiBEuG",
"payment_method_configuration_details": {
"id": "pmc_1LSodjFrwl37tCGiiS9ShhOg",
"parent": null
},
"payment_method_types": [
"card",
"link"
],
"status": "succeeded",
"usage": "off_session"
}
}

celest sandal