Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created September 19, 2012 22:01
Show Gist options
  • Save xcommerce-gists/3752592 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/3752592 to your computer and use it in GitHub Desktop.
How to Make a Basic Refund Using the Merchant API.curl
Request
-------
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp
HTTP method: POST
POST data:
USER=merchant_user_name
&PWD=merchant_password
&SIGNATURE=merchant_signature
&METHOD=RefundTransaction
&VERSION=94
&TRANSACTIONID=transaction_ID #ID of the transaction for which the refund is made
&REFUNDTYPE=Full #Specifies a full refund; a partial refund requires more input fields
Response
--------
REFUNDTRANSACTIONID=7XH234440V8691234 #New transaction ID, for the refund
&FEEREFUNDAMT=0%2e03
&GROSSREFUNDAMT=1%2e00
&NETREFUNDAMT=0%2e97
&CURRENCYCODE=USD
&TOTALREFUNDEDAMOUNT=1%2e00
&ACK=Success
&REFUNDSTATUS=Instant
&PENDINGREASON=None
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment