@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface RefundPaymentOptions

    Options for refunds.refundPayment().

    interface RefundPaymentOptions {
        amountMoney: {
            amount: number | bigint;
            currency?: "USD" | "CAD" | "GBP" | "EUR" | "AUD" | "JPY";
        };
        idempotencyKey: string;
        paymentId: string;
        reason?: string;
    }
    Index
    amountMoney: {
        amount: number | bigint;
        currency?: "USD" | "CAD" | "GBP" | "EUR" | "AUD" | "JPY";
    }

    How much to refund, in the smallest currency unit (cents). At most the payment total minus what is already refunded. currency defaults to the client's defaultCurrency and must match the payment's.

    idempotencyKey: string

    Required. Square refunds once per key, so a retry with the same key cannot refund twice. At most 45 characters.

    paymentId: string

    The payment to refund.

    reason?: string

    Why the payment is refunded, shown to the seller.