Create a Refund

Facades: merchant

Overview

Creates a new refund request.

Parameters

Parameter

Description

invoiceId

The BitPay invoice Id having the associated refund to be created.

amount

Amount to be refunded in the currency indicated.

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)

reference

Present only if specified. Used as reference label for the refund.

Max str length = 100

Example

Refund createRefund = bitpay.createRefund("QrPWSMkq594kQfJex28S7X", 1.0, true, false, false);