Automated refunds via PayPal REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a platform that enables users to buy access to content on the platform. In the event that a customer isn't happy with the purchase and wants a refund, I want to allow them to be able to do this automatically and automated within the first 7 days of purchase (i.e. I want them to initiate and complete the refund instantly via our refunds form).
I see that I can use the PayPal REST API to initiate refunds. My current logic is that I can use an API proxy to securely call the refund endpoint whenever the user submits the form. I believe that users can sign-in via my platform, go to a refund page to use the refund form (which will be populated with their first and last name, email address, require them to insert their correct password, and perform a CAPTCHA). Once they submit the refund form, the API proxy will call the appropriate endpoint(s).
In short, is it possible for me to use the PayPal REST API to allow users of my platform to refund themselves automatically? If so, what information will be needed to enable this?
From what I can gather, all I need is the Capture/Transaction ID to use the "/v2/payments/captures/:capture_id/refund" endpoint. However, this information won't currently be available with the user account on my platform's side. Neither will the Order ID which I could use to get the Capture/Transaction ID.
Is it possible for me to use the name and email address (and/or any other valid transaction/account information) to collect a Capture/Transaction ID? Or will I require the Capture/Transaction ID to refund a purchase? Will I need more than just the refund endpoint?
Thanks in advance for any help!
UPDATE: I have learned that a Transaction ID is provided when receipts are sent to buyer's emails. Am I right in assuming however that a Buyer Transaction ID is different to a Merchant's Capture/Transaction ID? If I'm wrong, then I believe I can require the user to include their Transaction ID in the form and potentially solve my problem.
RE-UPDATE: I have learned that, while the Buyer and Seller Capture/Transaction ID are not the same, either can be used for refunds. It is indeed possible to refund a person automatically using the PayPal REST API (using the Sandbox API - if unable to do so live, please advise).

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
- Inquiry About Refund Processing Time in REST APIs
- Intermittent error when refunding: [L_LONGMESSAGE0] = Security header is not valid in NVP/SOAP APIs
- paypal marketplace refunding i cant figure out why in PayPal Payments Standard