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

Completes processing of a transaction after the customer finishes payment activities at the payment provider hosted web pages, and is redirected to your site.

**Note:**

This method works only for Direct Debit payment products. Calling any other payment product with this method will fail.

The customer’s Account must exist before calling `finalizeCustomerAction`.

The AutoBill will start billing only after this finalization is completed and the underlying transaction is authorized (captured).

**Note:** This flow requires that full amount auth be set to `true`.

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

*transactionVid*: Vindicia generated unique ID for the underlying transaction. This will be available to you through the URL when your customer is redirected to your site by the payment provider.

## Output

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

*authStatus*: an object of type `TransactionStatus` that indicates the status of the initial Transaction. This object will also contain the response received from the payment provider.

*autobill*: the `AutoBill` object for which this method finalized the `HostedPage` validation transaction. It contains the updated status of the `AutoBill` after the finalization. Subscribe will populate this only if there was no error in processing this call.

## Returns

This method returns the codes listed in [The Return Object](The_Return_Object).

## Example

```

// Create an AutoBill with payment product = 712
$autobill = set_ab($identifier, "712");

// Call AutoBill.update with validate=1 
$rc = $autobill->update($autobill, undef, 1, 99);

// Set the status of the AutoBill to “Active” 
// in anticipation of success.
$rc = $autobill->finalizeCustomerAction($vin_id);

$status = $rc->{autobill}->status;
is ($status,"Active", "Status is Active (New)"); 
```

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


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