For a full refund, include an empty payload in the JSON request body.
For a partial refund, include the amount object in the JSON request body. You can also issue multiple partial refunds up to the total captured amount. If you are unsure how much captured amount is remaining to be refunded after one or more partial refunds, make the API call with the total captured amount or leave the amount field blank. The API will automatically calculate and issue the refund for the remaining value.
Modify the code
Copy the code and modify the following:
Step result
A successful request returns the HTTP 201 Created status code. If you didn't receive a response, making the same API call without changing the request should result in an HTTP 200 OK with a confirmation of the refund.