Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in

Le Forum de la communauté n’est pas disponible pour les nouveaux messages ou les réponses; les articles précédents restent disponibles pour vérification. Afin de connaître les options d’assistance complètes, rendez-vous sur PayPal.com/HelpCenter

Si vous souhaitez signaler du contenu illégal et contraire au Règlement sur les services numériques de l’Union Européenne (DSA), veuillez cliquer ici.

since ‎Apr-04-2020
Country: India
Type: Personal
deb1231
deb1231
New Community Member
1
Post
0
Kudos
0
Solutions
Active
View all
Latest Contributions by deb1231
  • Topics deb1231 has Participated In
  • Latest Contributions by deb1231

Request is not well-formed, syntactically incorrec...

by deb1231 in REST APIs
‎Apr-04-2020 12:09 PM
‎Apr-04-2020 12:09 PM
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
Labels:
  • Labels:
  • Payments REST APIs
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros