RefundPaymentParams

data class RefundPaymentParams(val forageVaultElement: ForageVaultElement<ElementState>, val paymentRef: String, val amount: Float, val reason: String, val metadata: Map<String, String>? = null, val interaction: CardholderInteraction)

A model that represents the parameters that ForageTerminalSDK requires to refund a Payment. RefundPaymentParams are passed to the refundPayment method.

Constructors

Link copied to clipboard
constructor(forageVaultElement: ForageVaultElement<ElementState>, paymentRef: String, amount: Float, reason: String, metadata: Map<String, String>? = null, interaction: CardholderInteraction)

Properties

Link copied to clipboard

Required. A positive decimal number that represents how much of the original payment to refund in USD. Precision to the penny is supported. The minimum amount that can be refunded is 0.01.

Link copied to clipboard
Link copied to clipboard

Represents the method of interaction between the cardholder and the terminal. This includes key card details such as PAN (Primary Account Number) and Track 2 data. Use the appropriate implementation of CardholderInteraction based on how the card information is obtained.

For example:
- ManualEntryInteraction: Use when the card details are entered manually.
- MagSwipeInteraction: Use when the card is swiped using the magnetic stripe reader.

Link copied to clipboard
val metadata: Map<String, String>? = null

Optional. A map of merchant-defined key-value pairs. For example, some merchants attach their credit card processor’s ID for the customer making the refund.

Link copied to clipboard

Required. A unique string identifier for a previously created Payment in Forage's database, returned by the Create a Payment endpoint.

Link copied to clipboard

Required. A string that describes why the payment is to be refunded.