Ali
Ali

Reputation: 7493

How do I programmatically refund using paypal?

working on my paypal integration and its going great - I was wondering that in the case a refund needs to be made is there a way to have a refund made programmatically?

Upvotes: 14

Views: 12071

Answers (6)

Hashaam Ahmad
Hashaam Ahmad

Reputation: 26

you can find complete detail of refund transaction from here: https://developer.paypal.com/docs/classic/api/merchant/RefundTransaction_API_Operation_NVP/

Upvotes: 1

Jarnail S
Jarnail S

Reputation: 401

Here is the code of refund with *NVP:

https://cms.paypal.com/cms_content/US/en_US/files/developer/nvp_RefundTransaction_php.txt

-- Jarnail

Upvotes: 1

Jarnail S
Jarnail S

Reputation: 401

You can find all sample-code here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code

-- Jarnail

Upvotes: 1

Jason Michael
Jason Michael

Reputation: 344

Doing a refund in PayPal is straight forward if you follow the API documentation mentioned by Machine.

You may also find, if you prefer to save money, that you can Void a transaction in PayPal, before it is captured (usually before midnight on the day of the transaction), which is free.

I have found that always sending a void first, then if the void fails, sending the refund works well without much overhead.

Upvotes: 7

PatrikAkerstrand
PatrikAkerstrand

Reputation: 45721

From my understanding, you should use the Refund API.

Upvotes: 7

Related Questions