var createOrder = { url:"https://api.sandbox.paypal.com/v2/checkout/orders", method : "POST", headers : { "Accept" : "application/json", "Content-Type" : "application/json", "Authorization" : "Bearer <Access Token>" }, data :{ "intent": "CAPTURE", "purchase_units": [ { "amount": { "currency_code": "USD", "value": "14.4", } } ] } } request(createOrder,function(error,response,body){ response.body; }) I am using the above parameters to create a order in node js. But i always get a same error like :- { "name": "INVALID_REQUEST", "message": "Request is not well-formed, syntactically incorrect, or violates schema.", "debug_id": "94dec6f54ac7b", "details": [ { "field": "/intent", "value": "", "location": "body", "issue": "MISSING_REQUIRED_PARAMETER", "description": "A required field / parameter is missing." }, { "field": "/purchase_units", "value": "", "location": "body", "issue": "MISSING_REQUIRED_PARAMETER", "description": "A required field / parameter is missing." } ], "links": [ { "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER", "rel": "information_link", "encType": "application/json" } ] } I don't know where i am wrong and where i am missing the structure of JSON Tried all possible ways please need help
... View more