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.
Parameter | Description |
---|---|
invoiceId | The BitPay invoice Id having the associated refund to be created. |
amount | Amount to be refunded in the currency indicated. |
currency | Reference currency used for the refund, usually the same as the currency used. |
preview | Whether to create the refund request as a preview (which will not be acted on until status is updated) |
immediate | Whether funds should be removed from merchant ledger immediately on submission or at time of processing |
buyerPaysRefundFee | Whether the buyer should pay the refund fee (default is merchant) |
Example
const refund = new Refund(12, "someInvoiceId", "someToken");
const result = await client.createRefund(refund);