Facades: merchant
Since v8.7.0
Overview
Creates a new refund request including GUID.
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 |
guid | A variable provided by the merchant and designed to be used by the merchant to correlate the refund with a refund ID in their system. |
Example
Refund createRefund = bitpay.createRefund("QrPWSMkq594kQfJex28S7X", 1.0, true, false, false, "f281d1d1-5c35-4e28-89bc-031e771c787c");