Issue a full or partial refund for a previously settled payment. By default, the full amount will be refunded unless a specific amount is provided for a partial refund.
If the payment was partially captured multiple times, you can specify which capture to
refund by using the transaction event ID. Refer to the transactions.events
array in the
payment object to find available transaction event IDs (when the appropriate expand
parameter is passed).
When specifying a transaction event ID, the refund amount should not exceed the amount captured in that event. If no refund amount is provided, it defaults to the amount captured in that specific event.
Optional key to make the request idempotent. Enables a safe retry of a request without risking the user being charged or refunded multiple times. The idempotency key must be generated by the client and needs to be unique for every new request.
Specifies the version of the API to use. This must be set to 2.4
.
"2.4"
ID of payment to refund.
Successful Response
The response is of type object
.