How to make a Paypal refund using transaction id in the REST API Call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
I am using srmklive package for Paypal integration.
https://srmklive.github.io/laravel-paypal/docs.html
I want to refund a payment using transaction id but this package or the rest API doesn't provide any such end point.
Is it possible to refund a payment using transaction id?
I have already tried the sample codes such as:
$transactionId = "XYZ";
$amount = 10.00;
$provider = new PayPalClient();
$refundResponse = $provider->refund([
'transaction_id' => $transactionId,
'amount' => [
'total' => $amount,
'currency' => 'USD',
],
]);
Please suggest!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @Amardeep2,
Thank you for posting to the PayPal community.
For NVP/SOAP API integration :
https://developer.paypal.com/docs/archive/express-checkout/ht-basicRefund-curl-etc/
https://developer.paypal.com/docs/nvp-soap-api/refund-transaction-nvp/?mark=RefundTransaction%20#
For REST API Integration, please refer the below guide links.
https://developer.paypal.com/docs/integration/direct/payments/refund-payments/
https://developer.paypal.com/docs/api/payments/v2/#captures_refund
Note : Merchant can also process manual refund, by follow the steps provided in the below guide link.
https://www.paypal.com/us/smarthelp/article/how-do-i-issue-a-full-or-partial-refund-faq780
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- IPN works in sandbox but not live in Sandbox Environment
- Change the button from Sandbox to Production in REST APIs
- PayPal Express Checkout charging incorrect values? in Sandbox Environment
- When I do PayPal capture Order, I keep on getting Invalid Request Connection in REST APIs
- Unable to Retrieve Plan ID Related to a Subscription in REST APIs