Refund Sale
To refund a sale, pass the sale_id
as a path parameter to /v1/payments/sale/{sale_id}/refund
with an empty JSON payload for a full refund. For partial refunds, include an amount object in the JSON request body.
Sample request
curl -v -X POST https://api-m.sandbox.paypal.com/v1/payments/sale/2MU78835H4515710F/refund \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"amount": {
"total": "2.34",
"currency": "USD"
},
"invoice_number": "INV-1234567"
}'
Sample response
{
"id": "4CF18861HF410323U",
"create_time": "2017-01-31T04:13:34Z",
"update_time": "2017-01-31T04:13:36Z",
"state": "completed",
"amount": {
"total": "2.34",
"currency": "USD"
},
"sale_id": "2MU78835H4515710F",
"parent_payment": "PAY-46E69296BH2194803KEE662Y",
"invoice_number": "INV-1234567",
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v1/payments/refund/4CF18861HF410323U",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/payments/payment/PAY-46E69296BH2194803KEE662Y",
"rel": "parent_payment",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/payments/sale/2MU78835H4515710F",
"rel": "sale",
"method": "GET"
}
]
}