Cannot do a partial refund on any transaction with PHP-SDK-Checkout v2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm using the paypal/Checkout-PHP-SDK library in combination with smart buttons to manage payments. Here's my workflow:
- OrdersCreateRequest
- OrdersCaptureRequest
- Get capture ID
- CapturesRefundRequest passing an amount and the capture ID
In the last step the library makes a call to /v2/payments/captures/[CAPTUREID]/refund with the the amount parameter in the body. I always get back an error 500 with this message
{"name":"UNPROCESSABLE_ENTITY","message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"2e076a8062117","details":[{"issue":"PARTIAL_REFUND_NOT_ALLOWED","description":"You cannot do a refund less than the original capture amount."}],"links":[{"href":"https://developer.paypal.com/docs/api/payments/v2/#error-PARTIAL_REFUND_NOT_ALLOWED","rel":"information_link"}]}
I've tried with different amount, some of them matching the amount of one product but nothing changes but it works if I do a full refund of the order.
How can I do a partial refund?
- Labels:
-
Payments REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply from Paypal staff:
Since your are in Sandbox mode, please be sure that both payer and merchant use the same currency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just wasted over half a day on this one using the .net api. once again, some more helpful error messages would be more...helpful. or, here's a thought, how about mentioning it in the docs? ...just a thought...
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Pending Transaction - CLearly Declined by Merchant in PayPal Payments Standard
- We're not currently set up for transactions in India. in PayPal Payments Standard
- Issue with Empty store_info in Response Using /v1/reporting/transactions on Sandbox API in REST APIs
- Add Others data in SDKs
- IPN works in sandbox but not live in Sandbox Environment