Paypal partial refund on sale transaction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are trying to implement paypal partial refund method using REST API. It doesn't seems to workeven when we have provided the needed arguments and have already implemented the method described in paypal docs. We need help for partial refund in node js.
Script:
// get refund amount l
et refund_details =
{
"amount":
{
total: "50.00",
currency: “CAD”
},
"invoice_number": "INV-1234567"
};
// get sale id
let saleId = “xxxx123”;
paypal.sale.refund(saleId, refund_details, (error, refund) => {
if (error) {
console.log(error.response);
} else {
console.log("Get Refund Response");
}
});
Response:
{
"response": {
"name": "TRANSACTION_REFUSED",
"message": "Request was refused.You can not do a partial refund on this transaction",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#TRANSACTION_REFUSED",
"debug_id": "ac4cf1a2f1737",
"httpStatusCode": 400
},
"response_stringified": "{\"name\":\"TRANSACTION_REFUSED\",\"message\":\"Request was refused.You can not do a partial refund on this transaction\",\"information_link\":\"https://developer.paypal.com/webapps/developer/docs/api/#TRANSACTION_REFUSED\",\"debug_id\":\"ac4cf1...}",
"httpStatusCode": 400
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
Can you post the REST API call URL you are using? Also is this on the sandbox or Live?

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Payments Refunded Automatically After Successful Transactions - PayPal Business Account Issue in REST APIs
- ExpressCheckout to REST API - Is Partner Program Now Required to Host Simple 3rd Party Transactions? in REST APIs
- Compliance violation. flag based on the account origin ? in Sandbox Environment
- I receive real payment in sendbox mode in Sandbox Environment
- Remove PayPal Pay Later option from paypal checkout page. in PayPal Upgrade Community