> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refunding Customers

Use the `Refund` object to refund customers. For compliance reasons, Subscribe allows refunds for no more than the amount of the original transaction, but supports both full and partial refunds of the original charge.

Subscribe automatically creates transactions for recurring billing from `AutoBill` objects. Fetch these transactions from Subscribe by calling `Transaction->fetchDeltaSince()`, or search for them on the Subscribe Portal. Use transaction data as a basis for your customer refund. Search by `merchantTransactionId` for an AutoBill-related transaction and for the refund amount.

## Refund a previously completed Transaction

**Note:** Use of the forward slash character (/) in merchant identifiers is not allowed. See [Merchant Identifiers](Merchant_Identifiers) for more information.

```

// Create a new Refund object
$refund = new Refund(); 
$txn = new Transaction(); 
// specify a known transaction by its merchant ID. This transaction
// should be in the 'Captured' state so it can be refunded
$txn->setMerchantTransactionId('WID-CUS-9302871'); 
// associate the account and refund objects
$refund->setTransaction($txn); 
// set the amount of the refund
$refund->setAmount(10.00);
$refund->setTimestamp('2009-02-11T22:34:32.265Z');
$refund->setReferenceString('myRefundId101'); 
// object created so we can call perform() method on it 
$refundFactory = new Refund(); 
// refund the transaction using the SOAP call
$response = $refundFactory ->perform(array($refund)); 
```

For more information, see the The Refund Object in the Subscribe API Guide.

**Parent topic:**[Working with One-Time Transactions](../topics/ProgGuide_Transactions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.