#KenMonster - Decline Response
1 messages · Page 1 of 1 (latest)
Thanks Rubeus
Looks like the error detail is present in the err object. Is the issue that you're trying to access the "Your card was declined." error message and display that in your UI?
Yes that's it
but you can see when we console the value of err or setupIntent (the two values we are setting on return) they are both undefined
The json returned includes the error data
but the statement
const {setupIntent, err} = await this.stripe.confirmCardSetup(
is returning undefined for both values
the code is copied straight from the api. So we were wondering:
- are we calling it wrong?
- because it is a 402 is it not returning a value?
I think you're calling it wrong, try changing err to error and see if it works as expected.
Glad it was easy to fix!