#Tirth Joshi

1 messages ยท Page 1 of 1 (latest)

scarlet turretBOT
icy storm
#

Hi! Let me help you with this.

#

It's expected. You need a Payment Method to complete the payment.

peak kraken
#

how can pass Payment Method

#

in above code?

scarlet turretBOT
icy storm
#

Does the customer have an existing Payment Method? Or you want to collect a new one?

violet ibex
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

peak kraken
#

yes

#

after addd it shows "status": "requires_confirmation",

#

"status": "requires_confirmation",

for
payment_intent = stripe.PaymentIntent.create(
amount=amount,
currency="eur",
customer=customer,
payment_method="pm_1NDl1SBtfsdMpbTVMB9beTnV",
)

violet ibex
#

yes that's normal

#

you haven't used confirm: true param

peak kraken
#

in where?

violet ibex
#

payment_intent = stripe.PaymentIntent.create(
amount=amount,
currency="eur",
customer=customer,
payment_method="pm_1NDl1SBtfsdMpbTVMB9beTnV",
confirm=true
)

#

and if you've already created the PaymentIntent without this parameter

#

to confirm an already existing one

peak kraken
#

it give
"Your card was declined. Your request was in test mode, but used a non test (live) card. For a list of valid test cards, visit: https://stripe.com/docs/testing.

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods.

violet ibex
#

you can't use normal cards

#

only the ones specified in https://stripe.com/docs/testing can be used in test mode

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods.

peak kraken
#

okay

#

payment_intent.payment_failed event gives message or reason in webhook call

violet ibex
#

I'm not sure I understand the question

#

would you mind elaborating?

peak kraken
#

payment_intent.payment_failed
above event give a extra meaasge or reason
than payment_intent.succeeded

violet ibex
#

do you mean the decline reason?

#
const message = intent.last_payment_error && intent.last_payment_error.message;