question

devtools avatar image
devtools asked devtools answered

Refund payment returning an error

I'm trying to refund a payment using this api in a sandbox environment :

https://docs.clover.com/reference/refund


I'm getting the following response from the api :

{
    "code": "processing_error",
    "message": "Raison de l'échec inconnue : FAIL.",
    "requestId": "0f6cf587-30055",
    "requestType": "REFUND",
    "type": "api_error"
}


I have the same error when trying with your online interactive documentation, here's the generated request used to send the refund request :

curl --request POST \
     --url https://sandbox.dev.clover.com/connect/v1/payments/4SXDT8MERZKS8/refunds \
     --header 'Idempotency-Key: 2DAF0ABD-1C97-4557-9E97-F3AD9C924275' \
     --header 'X-Clover-Device-Id: [MY_CLOVER_DEVICE_ID]' \
     --header 'X-POS-Id: [MY_POS_ID]' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer [MY_BEARER_TOKEN]' \
     --header 'content-type: application/json' \
     --data '{"fullRefund":true}'


1694532130010.png


Using a void request works, but I'd like to perform a refund request.


I've tried with fullRefund set to true and false, amount with multiple values, always getting the same error.


Here's the app requested permissions :

1694465333158.png


A previous version of the app didn't had the "Payments READ/WRITE" permissions, but the app has been removed / reinstalled on the device since. The "Installed apps" section in the App market on the device shows the new updated permissions for my app, so I guess everything is fine on that matter, but the refund payment still returns an error.


Can anyone tell me what's missing in my request?

semi-integrationsRefund
1694465333158.png (40.4 KiB)
1694532130010.png (48.3 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
devtools avatar image
devtools answered

The request is working today, both on Postman and from your online interactive documentation, any reason why the same request was returning an error the day before?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community