Paypal Refund NVP API : You do not have permission to refund this transaction

1.6k Views Asked by At

i Am using Paypal NVP Refund Api For Refund Paypal Transaction. All Things are ok but when i try to rung api, it gives me below Response.

Array
(
    [TIMESTAMP] => 2017-07-17T13:58:24Z
    [CORRELATIONID] => xxxxxxxxxx
    [ACK] => Failure
    [VERSION] => 51.0
    [BUILD] => 36458220
    [L_ERRORCODE0] => 10007
    [L_SHORTMESSAGE0] => Permission denied
    [L_LONGMESSAGE0] => You do not have permission to refund this transaction
    [L_SEVERITYCODE0] => Error
)

is that some process i miss to call.?

2

There are 2 best solutions below

0
Rizwan Khan On BEST ANSWER

After giving permission same issue exists. Then I found I missed an argument..

I'm sending this request.

$nvpreq = array(
    'USER' => '',
    'PWD' => '',
    'SIGNATURE' => '',
    'METHOD'=> 'RefundTransaction',
    'VERSION' => urlencode('94'),
    'TRANSACTIONID' => 'xxxxxxxx',
    'REFUNDTYPE' => 'Partial',
    'AMT' => '0.01',
    'CURRENCYCODE' => 'USD');

I forgot to add 'SUBJECT' => '[email protected]',. Now it is working.

6
Hamza Zafeer On

Here is the some causes of this error.

  1. You used the wrong transaction ID.

  2. You're trying to make the call for a third party and have the wrong email address in the subject.

  3. The subject account hasn't given you permission to make the third-party call.

Here is link you can check this. Why did I get API error code 10007?