charliedidonato
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jul-02-2018
02:08 PM
I am having an issue creating a payment.
I get an access token via "/v1/oauth2/token"
I include the token in the subsequent Http POST to
"/v1/payments/payment"
Here is the JSON for Create Payment
https://togaquikpics.com/json.txt
The POST returns
Response Status Line:HTTP/1.1 400 Bad Request
{"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":"db69f2ad74eb..."}
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
MTS_Justin
Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-12-2018
05:29 AM
Hello,
The JSON request cannot be accessed as the site is unavailable. If you're receiving a "malformed request" response, part of your JSON request is invalid.
Here is simple payment creation request. Start here and make very small changes as you move through modifying the request, that way if you experience another issue like this one, you'll know which changed caused the issue and be able to revert it.
{
"intent":"sale",
"redirect_urls":{
"return_url":"https://www.paypal.com",
"cancel_url":"https://www.paypal.com"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
}
}
]
}
Was my post helpful? If so, please give me a kudos!
The JSON request cannot be accessed as the site is unavailable. If you're receiving a "malformed request" response, part of your JSON request is invalid.
Here is simple payment creation request. Start here and make very small changes as you move through modifying the request, that way if you experience another issue like this one, you'll know which changed caused the issue and be able to revert it.
{
"intent":"sale",
"redirect_urls":{
"return_url":"https://www.paypal.com",
"cancel_url":"https://www.paypal.com"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
}
}
]
}
Was my post helpful? If so, please give me a kudos!
1 REPLY 1
MTS_Justin
Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-12-2018
05:29 AM
Hello,
The JSON request cannot be accessed as the site is unavailable. If you're receiving a "malformed request" response, part of your JSON request is invalid.
Here is simple payment creation request. Start here and make very small changes as you move through modifying the request, that way if you experience another issue like this one, you'll know which changed caused the issue and be able to revert it.
{
"intent":"sale",
"redirect_urls":{
"return_url":"https://www.paypal.com",
"cancel_url":"https://www.paypal.com"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
}
}
]
}
Was my post helpful? If so, please give me a kudos!
The JSON request cannot be accessed as the site is unavailable. If you're receiving a "malformed request" response, part of your JSON request is invalid.
Here is simple payment creation request. Start here and make very small changes as you move through modifying the request, that way if you experience another issue like this one, you'll know which changed caused the issue and be able to revert it.
{
"intent":"sale",
"redirect_urls":{
"return_url":"https://www.paypal.com",
"cancel_url":"https://www.paypal.com"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
}
}
]
}
Was my post helpful? If so, please give me a kudos!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- SetExpressCheckout 10003 error with ITEMCATEGORY=Digital in NVP/SOAP APIs
- IPN works in sandbox but not live in Sandbox Environment
- User is asked for shipping address when creating a credit card order in REST APIs
- Why have other paymentID in REST APIs
- When I do PayPal capture Order, I keep on getting Invalid Request Connection in REST APIs