Create Refund Request

Facades: merchant

Overview

Creates a new refund request.

Parameters

The following parameters are used from the Refund object that is passed to the client. See the Refund object for more information.

ParameterDescription
invoiceIdThe BitPay invoice Id having the associated refund to be created.
amountAmount to be refunded in the currency indicated.
currencyReference currency used for the refund, usually the same as the currency used.
previewWhether to create the refund request as a preview (which will not be acted on until status is updated)
immediateWhether funds should be removed from merchant ledger immediately on submission or at time of processing
buyerPaysRefundFeeWhether the buyer should pay the refund fee (default is merchant)

Example

const refund = new Refund(12, "someInvoiceId", "someToken");

const result = await client.createRefund(refund);