> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/cross-sell/add-edit-cross-sell-texts.md).

# Add / edit cross-sell texts

Use the **addCrossSellCampaignText** method to customize the texts that are shown in the shopping cart when a cross-sell campaign is displayed.

Editing a text can be done via the **updateCrossSellCampaignText** method with the same payload. If during a call to **updateCrossSellCampaignText** a text is not found in the database, it will be added automatically.

## Request parameters

<table><thead><tr><th width="130.800048828125">Parameters</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>language</code></td><td><p><strong>Required (string)</strong></p><p>The ISO 639-1 two-letter code of the language; Can be Arabic, Bulgarian, Chinese, Chinese (traditional), Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Korean, Norwegian, Persian, Polish, Portuguese, Portuguese (Brazil), Slovak, Slovenian, Spanish, Swedish, Thai, Romanian, Russian</p></td></tr><tr><td><code>title</code></td><td><p><strong>Required (string)</strong></p><p>The title of the cross sell campaign as it is displayed in the cart</p></td></tr><tr><td><code>description</code></td><td><p><strong>Required (string)</strong></p><p>The description of the cross sell campaign as it is displayed in the cart</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');


$csCampaignText = [];

$textObj = new stdClass();
$textObj->Language = "ro";
$textObj->Title = "Numele campaniei mele";
$textObj->Description = "Descrierea campaniei mele";

$csCampaignText[] = $textObj;

$textObj = new stdClass();
$textObj->Language = "en";
$textObj->Title = "My campaign name";
$textObj->Description = "My campaign description";

$csCampaignText[] = $textObj;

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'addCrossSellCampaignText';
$jsonRpcRequest->params = array($sessionID, $csCampaignText);
$jsonRpcRequest->id = $i++;


$order = callRPC($jsonRpcRequest, $host, true);
```

## Response

Both the **addCrossSellCampaignText** and **updateCrossSellCampaignText** methods will return the full list of texts available in the platform.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/cross-sell/add-edit-cross-sell-texts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
