Response code: 400 Error response

BarckStar
New Community Member

hi i am really new programing and was tring to use the API but i trwos me this error and dont know how to fix it can some one help me pls

Response code: 400 Error response: {"name":"VALIDATION_ERROR","message":"Invalid request - see details","debug_id":"b0c2cf660bd71","information_link":"https://developer.paypal.com/docs/api/payments/#errors","details":[{"field":"/transactions/0/amount"... construct instance of `com.paypal.platform.payments.model.rest.common.Amount`, problem: INVALID_CURRENCY_AMOUNT_FORMAT"}]}

Login to Me Too
1 REPLY 1

MTS-Aaron
PayPal Employee
PayPal Employee

Hi @BarckStar 


It looks as though you have incorrect formatting on the currency. This could mean that you did $12.3290 instead of $12.33. Make sure the amount is formatted correctly for the specific currency you're using. Additionally, and I think this might actually be the case from the details I could see, you must be passing a decimal rather than a comma for a USD transaction. Instead of 120,00 it needs to be 120.00 per the formatting of the USD currency.

 

I hope that helps!

-Aaron

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.