On this page
No Headings
Deprecation notice: TheRefunds a sale, by ID. For a full refund, do not include the/v1/paymentsendpoint is deprecated. Use the/v2/paymentsendpoint instead. For details, see PayPal Checkout Basic Integration.
amount object in the JSON request body. For a partial refund, include an amount object in the JSON request body.Oauth 2.0 authentication
In: header
Scope: https://api.paypal.com/v1/payments/.*
The ID of the sale transaction to refund.
The server stores keys for 30 days.
length <= 78application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/payments/sale/string/refund" \ -H "Content-Type: application/json" \ -d '{ "amount": { "total": "100.00", "currency": "USD" }, "invoice_number": "INV-7654321" }'{
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"state": "pending",
"reason": "string",
"sale_id": "string",
"capture_id": "string",
"parent_payment": "string",
"description": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"custom": "string",
"invoice_number": "string",
"refund_from_transaction_fee": {
"currency": "string",
"value": "string"
},
"refund_from_received_amount": {
"currency": "string",
"value": "string"
},
"total_refunded_amount": {
"currency": "string",
"value": "string"
}
}{
"id": "string",
"amount": {
"currency": "string",
"total": "string",
"details": {
"subtotal": "string",
"shipping": "string",
"tax": "string",
"handling_fee": "string",
"shipping_discount": "string",
"insurance": "string",
"gift_wrap": "string"
}
},
"state": "pending",
"reason": "string",
"sale_id": "string",
"capture_id": "string",
"parent_payment": "string",
"description": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"custom": "string",
"invoice_number": "string",
"refund_from_transaction_fee": {
"currency": "string",
"value": "string"
},
"refund_from_received_amount": {
"currency": "string",
"value": "string"
},
"total_refunded_amount": {
"currency": "string",
"value": "string"
}
}{
"name": "string",
"message": "string",
"debug_id": "string",
"information_link": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"information_link": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}The refund amount. Includes both the amount to refund to the payer and the fee amount to refund to the payee.
The refund description. Value is a string of single-byte alphanumeric characters.
length <= 255The refund reason description.
length <= 30The invoice number that tracks this payment. Value is a string of single-byte alphanumeric characters.
length <= 127