Create a new refund request

Facades: merchant

Overview

Creates a new refund request.

Parameters

ParameterDescription
invoice_id *The BitPay invoice Id having the associated refund to be created
amount *Amount to be refunded in the currency indicated
previewWhether to create the refund request as a preview, which will not be acted on until status is updated (default: false)
immediateWhether funds should be removed from merchant ledger immediately on submission or at time of processing (default: false)
buyer_pays_refund_feeWhether the buyer should pay the refund fee (default: merchant)
referencePresent only if specified in the request to create the refund
guidVariable provided by the merchant and designed to be used by the merchant to correlate the refund with a refund ID in their system.

Example

📘

Note

In this example, we assume that a Client has already been initialized and assigned to the bitpay variable.

bitpay.create_refund('invoiceId', 12.34)