# Enter campaign

Use the **enterChurnCampaign** method to confirm the campaign you want for the churn campaign process.

## Request parameters

<table><thead><tr><th width="234.2666015625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect. The <code>sessionID</code> expires in 10 minutes.</td></tr><tr><td><code>SubscriptionReference</code></td><td><strong>Required (string)</strong><br>Unique, system-generated subscription identifier.</td></tr><tr><td><code>CampaignCode</code></td><td><strong>Required (string)</strong><br>The code of the campaign you want to confirm.</td></tr><tr><td><code>EnterCampaignStep</code></td><td><strong>Object</strong></td></tr><tr><td><code>EnterCapaignStep.Step</code></td><td><strong>Required (string)</strong><br>Can have one of the following values: <code>TEXT</code>, <code>REASON</code>, <code>DISPLAY</code>, <code>PAUSE</code>.</td></tr><tr><td><code>EnterCapaignStep.Success</code></td><td><p><strong>Required (Integer)</strong></p><p>Indicates whether the user <strong>continued</strong> through the cancellation flow or <strong>chose to keep</strong> the subscription at this step.</p><ul><li>0 – The user <strong>continued</strong> the cancellation process after this step (e.g., clicked <em>Next</em>, did not exit).</li><li>1 – The user <strong>interrupted</strong> the flow and chose to <strong>keep the subscription active</strong> (e.g., closed the wizard, clicked <em>Keep my subscription</em>).</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>A value of <strong>1</strong> signifies that the cancellation process has <strong>ended early</strong>, and no further steps will follow.</p></div></td></tr><tr><td><code>EnterCapaignStep.Reason</code></td><td><strong>String, nullable</strong><br>Designed for the <code>REASON</code> step. It’s the reason why the user wants to stop the auto renewal for the subscription.<br>It should be one of the churn reasons managed by the merchant in the 2Checkout platform.</td></tr><tr><td><code>EnterCapaignStep.Comment</code></td><td><strong>String, nullable</strong><br>Designed for the <code>REASON</code> step. It’s an additional field for the user to explain the reason better.</td></tr></tbody></table>

### Request sample

{% code title="example.php" %}

```php
<?php

require('PATH_TO_AUTH');

$subscriptionReference = '351D8F557E';
$campaignCode          = 'UGPPKKJY5L1LHBFPHKQ3';
$enterCampaignStep = new stdClass();
$enterCampaignStep->Step = “REASON”;
$enterCampaignStep->Success = 0;
$enterCampaignStep->Reason = “CHURN_REASON_NOT_SATISFIED”;
$enterCampaignStep->Comment = “Not statisfied because …”;


$jsonRpcRequest = [\
    'method' => 'enterChurnCampaign',\
    'params' => [$sessionID, $subscriptionReference, $campaignCode, $enterCampaignStep],\
    'id' => $i++,\
    'jsonrpc' => '2.0'\
];

var_dump(callRPC((object)$jsonRpcRequest, $host, true));
```

{% endcode %}

## Response parameters

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


---

# 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/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription-churn-prevention-campaigns/enter-campaign.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.
