> ## 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.

# AutoBill.fetchFutureRebills

The `fetchFutureRebills` method returns the planned future billing transactions, that do not yet exist in Subscribe, for the specified `AutoBill` object. The returned `Transaction` objects are constructed on the fly in response to this call. You can then inform a customer how they will be billed for a subscription to your product or service with a certain billing plan.

(This method will calculate and return any discounts applied as a result of an applied Campaign Code.)

For this call to succeed, the `AutoBill` object must be in an actively billing state.

## Input

*srd*: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a `method` call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the *srd*. A null *srd* returns the complete response.

*autobill*: the `AutoBill` object for which to obtain the future billing transactions. Identify this object with either its VID or .

*quantity*: the number of future rebill transactions to be returned by this call. This input must be a positive integer.

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

*transactions*: an array of `Transaction` objects, each of which corresponds to a projected billing for this `AutoBill` object. For for information, see [The Transaction Object](The_Transaction_Object).

## Returns

In addition to those listed in [The Return Object](The_Return_Object), this call returns:

| Return Code | Return String |
| - | - |
| `400` | One of the following: - `Quantity must be a positive integer.` - `No AutoBill specified in arguments.` |
| `404` | `No matching AutoBill found.` |
| `405` | `AutoBill is in an inactive state*&lt;state&gt;*.` |

## Example

```

$autobillVid = 'a209408014a33fec3dcd4a3339d78efc33603bfe';
// Create an autobill object
$autobill = new AutoBill();
$autobill->setVID($autobillVid);
$response = $autobill->fetchFutureRebills(5);
if($response['returnCode'] == 200) {
   $futureTxns = $response['data']->transactions;
   print "This subscription will be billed at the following 
         dates and amounts:\n";
   for ($i = 0; $i < 5; $i++) {
      print "Date: " . $futureTxns[i]->getTimestamp() . " ";
      print "Amount: " . $futureTxns[i]->getAmount() . "\n";
   }
}
```

**Parent topic:**[AutoBill Methods](../topics/AutoBill_Methods)


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