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.
- Remove PayPal Pay Later option from paypal checkout page. in PayPal Upgrade Community
- Refunding an order via HATEOAS URL failing with NOT_AUTHORIZED error in Sandbox Environment
- Payment confirmation comes to a customer in Hebrew in PayPal Payments Standard
- Why Refund is Always in PENDING Status for Sandbox mode? in Sandbox Environment
- In the PayPal sandbox environment,payment success,but Merchant balance remains 0 in Sandbox Environment