Cannot refund a capture transaction

arminn
New Community Member

I am using the rest api.

I have created an authorization /v1/payments/authorization/9C772407N49081XXX

which is then captured /v1/payments/authorization/9C772407N49081XXX/capture

 

If I query the capture I can also retrieve the parent payment.

The parent payment shows me 2 transactions,

the auth and also the capture.

 

What I am wondering is that the capture shows following state:

"state": "pending",
"reason_code": "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION",

 

I am trying to refund the capture via

 

POST https://api.sandbox.paypal.com/v1/payments/capture/02K82732TL8046XXX/refund using the capture transaction id here.

Body just contains an amount object

{
"amount": {
"currency": "GBP",
"total": "1"
}
}

 

The response is then:

{
"name": "TRANSACTION_REFUSED",
"message": "Request was refused.You can not refund this type of transaction",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "662e73232f13e"
}

 

what does it mean?

Login to Me Too
1 REPLY 1

micp
Contributor
Contributor

Shouldn't the link like:

https://api.paypal.com/v1/payments/sale/ID_HERE_YOU_RECIEVED_AT_PAYMENT/refund

If sandbox mode then api.sandbox.paypal.com

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.