# Add / import test subscriptions without credit / debit card data

Use the **addSubscription** method to import a test subscription into the 2Checkout system.

Import test subscription and data from your or a third-party system and test advanced renewal and upgrade scenarios in the 2Checkout platform. Contact 2Checkout directly for additional details.

## Requirements

Test subscriptions can be imported only for eStore orders.

## Request parameters

| Parameters                                                                                                                     | Type/Description                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionID                                                                                                                      | <p>Required (string)<br>Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.</p> |
| [Subscription import](https://verifone.cloud/docs/2checkout/API-Integration/SOAP_API_6.0/API-Requests/047Subscription-import/) | <p>Required (Object)<br>Object designed to provide 2Checkout with all the information to create a subscription.</p>                                                                                                       |
| Test                                                                                                                           | <p>Optional (integer)<br>To add test subscriptions, set the Test parameter to 1. Default value is 0, and belongs to regular subscriptions.</p>                                                                            |

## Response parameters

| Parameters            | Type/Description                                                   |
| --------------------- | ------------------------------------------------------------------ |
| SubscriptionReference | <p>String<br>Unique, system-generated subscription identifier.</p> |

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$Product = new stdClass ();
$Product->ProductCode = 'my_subscription_1';
$Product->ProductId = 4639321;
$Product->ProductName = '2Checkout Subscription Imported';
$Product->ProductVersion = 1.0;
$Product->ProductQuantity = 3;
$Product->PriceOptionCodes = array();

$EndUser = new stdClass ();
$EndUser->Address1 = 'Address line 1';
$EndUser->Address2 = 'Address line 2';
$EndUser->City = 'LA';
$EndUser->Company = 'Company Name';
$EndUser->CountryCode = "US";
$EndUser->Email = 'customerAPI@2Checkout.com';
$EndUser->FirstName = 'Customer';
$EndUser->Language = 'en';
$EndUser->LastName = '2Checkout';
$EndUser->Phone = '1234567890';
$EndUser->State = 'California';
$EndUser->Fax = NULL;
$EndUser->Zip = '90210';

$Subscription = new stdClass();
$Subscription->ExternalSubscriptionReference = '12345678912ImportedSubscription';
$Subscription->SubscriptionCode= NULL;
$Subscription->StartDate = '2013-01-01';
$Subscription->ExpirationDate = '2017-12-30';
$Subscription->Product = $Product;
$Subscription->EndUser = $EndUser;
$Subscription->ExternalCustomerReference = '12354678ExtCustRef';
$Subscription->Test = 1; // send 1 for test subscription, 0 for regular subscriptions.

try {
    $importedSubscriptionNoPayData = $client->addSubscription($sessionID, $Subscription);
}
catch (SoapFault $e) {
    echo "importedSubscriptionNoPayData: " . $e->getMessage();
    exit;
}
var_dump("importedSubscriptionNoPayData", $importedSubscriptionNoPayData);
```


---

# 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/subscription-import/add-import-test-subscriptions-without-credit-debit-card-data.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.
