#Namrata

1 messages · Page 1 of 1 (latest)

late depot
#

Hi, how can we help?

rare ore
#

i want to stored card information in my custom database after payment success

late depot
#

You can/should only store non-sensitive card information. Is that what you want to do?

rare ore
#

i want to store last 4 digits of card and card type

#

i am using payment intent

late depot
#

Sure that should be possible

#

After Payment succeeded you find the PaymentMethod Id (pm_xxx). Then you can retrieve it to have last4

rare ore
#

like this pm_1L3DBFKz8WXEqDYJuuY45Q7U

#

means pass this PaymentMethod Id to backend then find the card details is it correct

late depot
#

Yes!

rare ore
#

let me try it

#

is payment intent handle all exception

#

suppose i pass negative amount to payament intent it will handle such type of payment

late depot
#

no it wouldn't I believe

#

the API call to create PaymentIntent will error

rare ore
#

how to handle that error

late depot
#

The API will return an error on response

#

if you use our official SDK you will receive an error type

#

which SDK do you use?

rare ore
#

means

#

can i handle error with exception handlind