I followed the example on https://developer.paypal.com/docs/integration/direct/create-single-payout/ but keep getting this error:
Array ( [name] => MALFORMED_REQUEST_ERROR [message] => Json request malformed. [debug_id] => aef61e278b531 [information_link] => https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST_ERROR )
This is the curl request:
curl -v https://api.sandbox.paypal.com/v1/payments/payouts?sync_mode=true \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-d "{
"sender_batch_header": {
"email_subject": "You have a payment"
},
"items": [
{
"recipient_type": "EMAIL",
"amount": {
"value": 12.34,
"currency": "USD"
},
"receiver": "[email protected]",
"note": "Payment for recent T-Shirt delivery",
"sender_item_id": "A123"
}
]
}"
The error docs say the JSON is malformed but then I used jsonlint to make sure its a valid JSON. What can it be?