Reverse payment

Releases a payment that is on hold, so the customer is never charged and the held funds go back to their card. Releasing a hold, or letting it expire, charges your account the hold reversal fee for your plan (see pricing).

Use it for a payment created with hold_and_charge_later: true that you've decided not to capture. There's no request body: the whole hold is released.

The response is the updated Payment object. If the payment is not on hold (for example it was already captured), the call returns 422 with Charge status is not on hold. To return money from a payment that was already captured, use Refund payment instead.

If the gateway doesn't confirm the release within about 5 seconds, the call returns 422 with Can not refund this payment. The payment may still be voided shortly after, so fetch it with Fetch payment info before you retry.

No webhook is sent when you reverse a payment, not even payment.voided (that event is only sent when Mamo's fraud screening voids a payment). The 201 response, with status: voided, is your confirmation that the hold was released.

Recipes
🔒
Hold a payment, capture it later, and refund
Open Recipe
Path Params
string
required
Defaults to PAY-1A2B3C4D5E

Payment ID

Headers
string

A unique key, such as a UUID, that makes it safe to retry this request. Reuse the same key when you retry. See Idempotency.

Responses

400

Bad Request

429

Too many requests. You sent more than 100 requests in 30 seconds from one IP address. This response has no JSON body. See Rate limits.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json