---
updatedAt: 2025-09-22T17:27:16.000Z
agentTools:
  projectIndex: https://developer.bitpay.com/llms.txt
---

# Create a new refund request

Facades: `merchant`

## Overview

Creates a new refund request.

## Parameters

| Parameter                | Description                                                                                                                         |
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
| invoice\_id \*           | 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 (default: `false`)            |
| immediate                | Whether funds should be removed from merchant ledger immediately on submission or at time of processing (default: `false`)          |
| buyer\_pays\_refund\_fee | Whether the buyer should pay the refund fee (default: `merchant`)                                                                   |
| reference                | Present only if specified in the request to create the refund                                                                       |
| guid                     | 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

> 📘 Note
>
> In this example, we assume that a Client has already been [initialized](https://developer.bitpay.com/reference/python-sdk) and assigned to the `bitpay` variable.

```php Python
bitpay.create_refund('invoiceId', 12.34)
```