# Convert a trial

Use the **convertTrial** method to convert a trial to a paid subscription. In the eventuality of a conversion failure, you can use **convertTrial** again for the same trial subscription only after you let 24 hours pass since the initial attempt. The 2Checkout system attempts to automatically convert trials before they expire to full subscriptions, unless you made an attempt that failed less than 24 hours before the scheduled expiration deadline.

In case the trial conversion fails due to a transaction issue, the 2Checkout system sends unfinished payment follow-up emails to customers, provided that you set up lead management for your account.

## Request parameters <a href="#parameters" id="parameters"></a>

| Parameter                           | Type / Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SubscriptionReference`             | <p><strong>Required (string)</strong><br>Unique, system-generated subscription identifier of the trial that you convert to a paid subscription. The unique identifier from the 2Checkout system:</p><ul><li>Must belong to an active trial subscription with the recurring billing system (auto-renewal) enabled.</li><li>The initial order placed to access the trial subscription must be finalized (status Finished).</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This method does not work for cancelled and/or expired trial subscriptions.</p></div><p>2Checkout charges customers using the payment data attached to the trial subscription. In the case of credit/debit cards, if customers update their payment information in myAccount or if you update these details on behalf of your subscribers, the 2Checkout system uses the latest card info provided to charge subscription renewals.</p>                                                                               |
| `ExtendSubscriptionFromPaymentDate` | <p><strong>Optional (boolean)</strong><br><strong>true</strong> = Set the moment of the conversion as the start date of the full subscription. </p><p><em>Example:</em> A 7 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = true; features the following <strong>Billing cycle expiration</strong>: Nov 30, 2013 and 2Checkout scraps the initial trial expiration date November 5.</p><p><strong>false</strong> = Set initial trial expiration deadline as the fhe full subscription start date. </p><p><em>Example:</em> A 10 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = false; features the following <strong>Billing cycle expiration</strong>: December 9, with the first month period of the subscription added to the trial lifetime stretching until November 8.</p><p>Can be <strong>NULL</strong>. If not sent, the default value is <strong>false</strong>.</p> |

### Response parameters <a href="#response" id="response"></a>

| Type        | Description                                                                    |
| ----------- | ------------------------------------------------------------------------------ |
| **Boolean** | **true** or **false** depending on whether the changes were successful or not. |

### Request sample <a href="#request" id="request"></a>

```php
<?php

require ('PATH_TO_AUTH'); 
 
$SubscriptionReference = 'BF44555C6C';

$ExtendSubscriptionFromPaymentDate = true; //false can also be used if you want the subscription start date to be the moment when the trial was set to initially expire.

try {
    $convertedTrial = $client->convertTrial($sessionID, $SubscriptionReference, $ExtendSubscriptionFromPaymentDate);
}
catch (SoapFault $e) {
    echo "convertedTrial: " . $e->getMessage();
    exit;
}
var_dump("convertedTrial", $convertedTrial);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/convert-a-trial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
