The PayPal’s RefundPayment API request is documented in the Where is the request and response parameters specification for the PayPal’s RefundPayment transaction? article.
But it does not work for me.
1. Request
1.1. Body
{
"Header": {
"MerchantID": "ANTERIOR001",
"TransactionType": "RefundPayment",
"UserID": "<...>",
"Version": "2"
},
"Transaction": {
"Amount": "169000",
"Currency": "AUD",
"MerchantTxnID": "1208L.773",
"Method": "PP"
}
}
1.2. Headers
Request: POST / HTTP/1.1
Accept-encoding: gzip, deflate
Connection: close
Content-Length: 298
Content-Type: application/json
Host: hubapiuat.alphacommercehub.com.au
User-Agent: Mage2.PRO
2. Response
{
"Banks": null,
"Country": null,
"DocumentResults": null,
"EmailChecks": null,
"FraudChecks": null,
"GeoChecks": null,
"Result": {
"Amount": "169000",
"Currency": "AUD",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"custom5": null,
"MerchantID": "ANTERIOR001",
"MerchantTxnID": "1208L.773",
"ResponseCode": "1059",
"ResponseMessage": "Internal Processing Error please resend the request",
"ResponseTimestamp": "11122017090314"
},
"ShippingService": null,
"TaxResultLines": null
}