Cancel or refund a payin

How to cancel or refund a payin via API or Reporting Components

Payins can be canceled the same day it was processed and before the daily cutoff. After the cutoff, the payin can be partially or fully refunded.

The payin can be canceled or refunded via the void or refund endpoint in the API or within the reporting components on the Payin Details Component with the "Refund" button. Rainforest will handle the logic on if the payin is eligible for a void or refund.


Cancel a payin


A payin can be canceled, also known as voided, when the payin status is Processing and before the daily cutoff defined by the payment method type and explained in the deposit timing for payments guide.

PAYIN TYPEDAILY CUTOFF
Card11:00 PM ET
ACH9:00 PM ET

Canceling a payin will void the full amount of the payin and the fee applied at the time of processing. There is no additional fee for canceling a payin.

In the refund modal, the amount of the payin cannot be updated because a payin can only be canceled in full.

The payin status will be Canceled and a payin.canceled webhook will be triggered.

Refund modal for "cancel" with the full amount of $15.25

Refund modal for "cancel" with the full amount of $15.25


Refund a payin


A payin can be partially or fully refunded after the cutoff time for canceling. Refunding a payin will incur a fee if defined on the merchant's billing profile for each payment method type, card or ACH.

Listen to the refund webhooks for the result of the refund.

Refundable amount

In the refund modal, the amount of the refund can be updated to be less than or equal to the refundable amount. The amount will default to the full amount eligible to be refunded and can be less than the full amount of the payin if there are existing refunds, chargebacks, or an ACH return.

Refund modal for "refund" with a partial amount of $1.00

Refund modal for "refund" with a partial amount of $1.00

The refundable amount is available via the get payin endpoint in the API. For example, a $3.00 payin with a partial refund of $2.00, would return a refundable amount of $1.00:

{
  "amount": 300,
  "refundable_amount": 100
}

Non-refundable reasons

If the refund cannot be funded, then the refund modal will display an error message with an explanation.

Refund modal for "refund" with a nonrefundable reason

Refund modal for "refund" with a nonrefundable reason

If the refundable amount is $0, then a non-refundable reason is available via the get payin endpoint in the API that will explain why the payin is not eligible for a refund. For example, a $23.35 ACH payin was returned and the refundable amount is $0 with a non-refundable reason code of HAS_ACH_RETURN:

{
  "amount": 2335,
  "refundable_amount": 0,
  "non_refundable_reason_code": "HAS_ACH_RETURN"
}

Nonrefundable reasons

Reason CodeDescription
VOIDEDThe payin is already voided and the payin status is Canceled.
FAILEDThe payin failed to process and cannot be voided or refunded. The payin status is Failed.
FULLY_REFUNDEDThe payin is fully refunded.
HAS_CHARGEBACKSThe payin has a chargeback or multiple chargebacks that sum to the full amount.
HAS_ACH_RETURNThe payin was returned and has an associated ACH return.
IN_ACH_RETURN_WINDOWThe payin was processed with an ACH payment method and is within the T+4 ACH return window. See the refunds on ACH payins guide for details.
IN_SETTLEMENT_WINDOWThe payin is in the process of settling and moving the money and is not eligible for a refund. This time period can vary and usually lasts between 10 to 30 minutes after the daily cutoffs for canceling a payin.

ACH refunds with return window

In order to prevent a refund from being initiated on an ACH payin that ultimately will result in an ACH return, Rainforest does not allow refunds on ACH payins for T+4 from processing time, where T equals the first banking day after processing and 4 equals the number of banking days until the payin is eligible for a refund. For example, an ACH payin processed on Monday would be eligible for a refund on Friday. This allows for the ACH return to be processed prior to the payin being available for a deposit for most of the common return reasons.

Refund metadata


If the payin is refunded, then the metadata defined on the payin will be stored on the associated refund. Additional metadata can be included in the void or refund request. The metadata provided in the request will be merged with the metadata stored on the payin by the top-level key. If the same top-level key is passed in this request, it will overwrite the original value from the payin metadata.

For example, if the payin metadata includes:

{
  "k1": "A",
  "k2": {
    "k3": "B"
  }
}

And the void or refund request metadata is:

{
  "k2": "C",
  "k4": "D"
}

Then the resulting merged metadata would be:

{
  "k1": "A",
  "k2": "C",
  "k4": "D"
}

Sandbox simulation


If the payin is in the status of Processing, canceling the payin via the Payin Details Component or the void or refund payin endpoint will result in canceling the payin and moving the payin to the status of Canceled.

To simulate a refund, the payin will need to move to the status of Succeeded. This can be done by simulating a merchant deposit. Once the payin is Succeeded, refunding the payin via the Payin Details Component or the void or refund payin endpoint will result in refunding the payin and creating a refund with the status of Processing.