#trong.tran

1 messages · Page 1 of 1 (latest)

karmic badgerBOT
restive wren
#

Hi there, how can I help?

frigid nest
#

hi Jack Tan

#

i read this section and i understand that when paying in USD, the amount must be multiplied by 100

restive wren
#

OK, so what's your question?

frigid nest
#

but when i get a response from Stripe API, the amount is still multiplied by 100, how can i get the original amount back when it hasn't multiplied by 100

karmic badgerBOT
frigid nest
#

example: i payment 10$, i must be multiplied 100.
10*100 = 10,00$

#

i received response from Stripe API is 1000

#

the actual amount I paid is only 10

#

so i want to show the amount i paid in my website, i have to divide it by 100 right?

#

Is there any way I get the actual amount I paid from the API?

topaz rock
#

We don't return a currency formatted amount in the API response. You'd be responsible for handling that in your application

frigid nest
#

ok thank you

#

i understand

#

have you nice day.

frigid nest
#

hi ynnoj

#

how i can test payment fail, card expried,...?

topaz rock
#

There are various test cards here (https://stripe.com/docs/testing) that simulate a lot of different scenarios

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.

frigid nest
#

I have selected card "4000000000000069" with cvc:123, but still the payment is successful, what is the reason?

topaz rock
#

Can you share the pi_xxx ID?

frigid nest
#

ch_3N5lwPBTFd1HGZpE055fFJaR

#

i use charge.

topaz rock
#

I'd recommend not using that API directly

#

That payment used the 4242 card which will always be successful

frigid nest
#

I don't understand I entered another tag but it still shows tag 4242, do you know why?

topaz rock
frigid nest
#

So in this case I want my customer to enter another card, what should I do?

topaz rock
frigid nest
#

in the above case I am understanding that with account cus_Nq0fwnEvXrYsUz I attached card 4242 to that account, after I pay the amount will be deducted from card 4242 of account cus_Nq0fwnEvXrYsUz and not using the card I entered correctly Are not?

topaz rock
#

In the example you shared you didn't pass any payment details, so that's why we defaulted to using the 4242 card on the customer

#

If you expected to pass other payment details, then they weren't received by the API which is indicative on an integration issue