paypal-rest-sdk incoming request does not map to api request

Joshua-Mudanyi
New Community Member

I'm having trouble intergrating paypal-rest-sdk on my nodejs app but I keep getting this error at endReadableNT (_stream_readable.js:1129:12) at process._tickCallback (internal/process/next_tick.js:63:19) response: { name: 'MALFORMED_REQUEST', message: 'Incoming JSON request does not map to API request', information_link: 'https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST', debug_id: '7e4c1f5761420', httpStatusCode: 400 }, httpStatusCode: 400 } when using the json object { "intent" : "sale", "payer" : { "payment_method" : "paypal" }, "redirect_urls" : { "return_url" : paypalSuccess, "cancel_url" : paypalCancel }, "transactions" : [{ "item_list" : { "items" : [{ "name" : "sandbox", "sku" : "001", "price" : "2.00", "currency" : "USD", "quantity" : 1 }] }, "amount" : { "currency" : "USD", "total" : "2.00" }, "description" : "sandbox" }] } to create the payment and { "payer_id" : PayerID, "transactions" : [{ "currency" : "USD", "total" : "2.00" }] } to execute the payment using paypal-rest-sdk@1.8.1

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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