RefundPaymentParams

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

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)

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
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.