Refunds
Refunds allow all or part of a completed Payment to be returned through the applicable payment provider.
Overview
Refunds allow all or part of a completed Payment to be returned through the applicable payment provider.
Each refund is created as a separate Payment record with a Transaction Type of Refund. The refund is linked to the original Payment, allowing the system to maintain the refund history and prevent the original Payment from being over-refunded.
Refunds can be initiated in two ways:
- Directly from a Payment record when the Payment is not associated with a Gift.
- Through the Gift Return process when the Payment is associated with a Gift.
This separation ensures that the standard refund functionality is available outside Klevr Fundraising while Gift-related refunds continue to use the existing Gift Return process.
Payment Fields
Transaction Type
The Transaction Type identifies the type of transaction represented by the Payment record.
A Refund option is added to the existing Transaction Type choice field.
When a refund is created:
- A new Payment record is created.
- Transaction Type is set to Refund.
- The refund is linked to the original Payment.
Original Payment
Self-referencing lookup to the Payment table.
The field is populated only on refund transactions and identifies the Payment being refunded.
Remaining Amount
Remaining Amount is a read-only currency field used to track how much of the original Payment is still available to refund.
The field exists on all Payment records but is populated and managed on the original Payment.
- The initial Remaining Amount is equal to the original Payment Amount.
- The Remaining Amount is reduced each time a refund is successfully completed.
- The Remaining Amount cannot be reduced below zero.
- Refund requests are validated against the Remaining Amount to prevent over-refunding.
Example
- An original Payment has an Amount of $100.
- Before any refunds, Remaining Amount is $100.
- After a completed refund of $25, Remaining Amount is $75.
- After an additional completed refund of $50, Remaining Amount is $25.
- After a final completed refund of $25, Remaining Amount is $0.
- No further refunds can be created against the Payment.
External Reference
The existing External Reference field is reused on refund Payment records.
For provider-processed refunds, the field stores the external refund identifier returned by the payment provider, such as a Stripe Refund ID.
Payment Status
Refund Payment records use the existing Payment Status lifecycle:
- Draft
- Submitted
- Processing
- Completed
- Failed
- Cancelled
Refund Validation
Refund validation occurs before a refund Payment is saved or submitted.
The following rules apply:
- The refund Amount cannot exceed the Remaining Amount of the original Payment.
- The combined value of completed refunds cannot exceed the original Payment Amount.
- A refund must reference the original Payment.
- Provider-specific refund requirements must be met before an automated refund can be processed.
An original Payment has an Amount of $100.
Two refunds have already been completed:
- Refund 1: $50
- Refund 2: $50
- Remaining Amount: $0
Any additional refund attempt is blocked because the original Payment has been fully refunded.
If the Remaining Amount is $75 and a user attempts to refund $80, the refund is blocked and an error informs the user that the refund cannot exceed the Remaining Amount.
Initiating a Refund from a Payment
Refund Button
A Refund button is available on eligible Payment records.
The button is displayed when:
- Transaction Type is not Refund.
- Remaining Amount is greater than $0.
- Payment Status is Completed.
- The Payment is not associated with a Gift.
The button is hidden when the Payment is associated with a Gift because Gift-related refunds must be initiated through the Gift Return process.
The button is available regardless of the payment provider. Provider-specific support is evaluated as part of refund processing. If the payment provider does not support automated refunds, the system displays an appropriate error.
Refund Form
Selecting Refund opens the Payment form in a dialogue using a hidden tab that presents only the information required to create the refund.
The refund form contains:
- Amount: Defaults to the Remaining Amount of the original Payment.
- Description: Records the reason or supporting details for the refund.
- Original Payment: Automatically populated with the Payment being refunded.
Defaulting the refund Amount to the Remaining Amount reduces manual entry and shows the maximum amount currently available to refund. Users can reduce the Amount when creating a partial refund.
Refund Processing
When a refund is submitted:
- A new Payment record is created.
- Transaction Type is set to Refund.
- Original Payment is populated.
- The refund enters the existing Payment Status lifecycle.
- When the refund reaches the applicable submission status, the request is sent to the payment provider.
- The Payment Status is updated based on the processing result.
- When the refund is successfully completed, the Remaining Amount on the original Payment is reduced.
- The provider refund identifier is stored in External Reference.
Refunds do not use the existing Payment retry process. A failed refund is recorded as failed rather than automatically using the standard Payment retry logic.
Processing Example
An original Payment has:
- Amount: $100
- Remaining Amount: $100
- Payment Status: Completed
The user requests a refund of $25.
A new Payment is created with:
- Transaction Type: Refund
- Amount: $25
- Original Payment: The original $100 Payment
- External Reference: The identifier returned by the payment provider
- Payment Status: Completed, once successfully processed
The original Payment is then updated:
- Amount: $100
- Remaining Amount: $75
Viewing Refund History
Refunds Tab
A Refunds tab is added to the Payment form.
The tab displays all refund Payment records linked to the original Payment through the Original Payment lookup. This allows users to review multiple partial refunds and the complete refund history associated with the Payment.
The tab includes the Remaining Amount so users can see how much is still available to refund.
Payment Provider Behaviour
The refund process determines its behaviour based on the payment provider associated with the original Payment.
Supported Providers
When the payment provider supports automated refunds:
- The refund request is submitted to the provider.
- A refund Payment record is maintained in Klevr.
- The provider refund identifier is stored in External Reference.
- The Payment Status is updated based on the provider response.
Stripe and PayFURL are providers that will be processed automatically.
Gift Return Refund Process
When a Gift is returned, users can choose whether the system should also process a financial refund using the Auto Process Refund field.
A Gift Return Action is created using the existing Gift Return process.
When Action Type = Return, the Auto Process Refund field is available.
If Auto Process Refund = No:
- The Gift Return is processed using the existing Gift Return functionality.
- No refund Payment record is created.
- No payment provider interaction occurs.
If Auto Process Refund = Yes:
- The system validates that a related Payment exists.
- The system validates that the Payment contains the information required to perform a refund.
- The system validates that the payment provider supports automated refunds.
- Provider-specific validation rules are executed.
If validation fails, an error is displayed and the refund cannot be automatically processed.
Once validation is successful:
- A new Payment record is created.
- Transaction Type = Refund.
- Original Payment is populated.
- Payment Status is set to Requested.
The standard Payment refund process is invoked.
The refund request is submitted to the payment provider.
The payment provider returns the outcome of the refund request and the refund Payment record is updated accordingly.
This includes:
- Payment Status updates.
- External Reference updates.
- Remaining Amount updates on the original Payment when the refund is completed.
When the refund Payment reaches Completed status:
- The returned Gift Status Reason is updated from Draft to Processed.
- The Gift is linked to the Refund Payment record.
- The Payment lookup on the returned Gift references the refund Payment record rather than the original Payment.
Last updated on