> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/linking-an-incoming-cross-sale-to-an-outgoing-cross-sale.md).

# Linking Incoming and Outgoing Cross/Up Sales

*Article Topics:* [*Cross Sales*](https://docs.toomuchmedia.com/getting-started/common-topics/cross-sales.md)*,* [*Up Sales*](https://docs.toomuchmedia.com/getting-started/common-topics/up-sales.md)*,* [*Programs*](https://docs.toomuchmedia.com/getting-started/common-topics/programs.md)*,* [*Affiliate*](https://docs.toomuchmedia.com/getting-started/common-topics/affiliates.md)

{% hint style="info" %}
**Please Note:** This article applies to both cross sales and up sales. The steps are the same; create cross sales from the [Cross Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/cross-sales.md) page and up sales from the [Up Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/up-sales.md) page.
{% endhint %}

## Overview

Every cross sale or up sale has two sides:

* **Outgoing sale**: the offer shown to the member on the sending side, either on the join form (cross sale) or after joining (up sale).
* **Incoming sale**: the receiving side, which decides the site and program the member is added to.

The two sides are linked by a **Ref Code** (reference code). NATS generates the Ref Code from the Incoming sale, together with the affiliate and campaign that should be credited for the sale. When you enter that Ref Code in the Biller Details of an Outgoing sale, NATS knows where to send the member and which affiliate to credit.

To view Ref Codes, add "**internal.php?page=xsells**" to the domain URL of the NATS install that has the Incoming sale:

```
https://domain/internal.php?page=xsells
```

You can also get Ref Codes through the REST API. The **/codes/refcode-encode** call returns the Ref Code for an affiliate, campaign, and Incoming sale, and the **/codes/refcode-decode** call shows which affiliate, campaign, and Incoming sale an existing Ref Code points to. See [API Endpoints](https://docs.toomuchmedia.com/api/api-endpoints.md) for details.

<figure><img src="https://2232071635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJVne6meHqGT8rzsBdod%2Fuploads%2FUOfGyfuYpbDr6qtJqrx1%2Fnatsadmin-crossupsales-xsellsref.png?alt=media&amp;token=a9d200cd-d8c1-49a9-8bcf-3ac25981fd3b" alt=""><figcaption></figcaption></figure>

Sales are set up per biller, so you will need a linked Incoming and Outgoing sale for each biller you want to offer the sale with. The Biller Details fields are different for each biller. See [Cross Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/cross-sale-supported-billers.md) or [Up Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/up-sale-supported-billers.md) for the biller-specific setup.

You can link sales in three ways:

* [Within one NATS install](#within-one-nats-install): both sites are on your NATS install.
* [Between two NATS installs](#between-two-nats-installs): you are selling memberships to a partner's sites, and the partner also uses NATS.
* [With a partner that doesn't use NATS](#with-a-partner-that-doesnt-use-nats): one side of the sale is handled by a system other than NATS.

## Within One NATS Install

Use this setup when both the sending site and the receiving site are on your NATS install.

1\) [Create a new Incoming sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) for the receiving site and program.

2\) Navigate to the "**<https://domain/internal.php?page=xsells>**" page to view the Ref Code.

* Please note, you will need to be [overriding as the affiliate](https://docs.toomuchmedia.com/nats-admin/affiliates/further-reading/affiliate-override.md) account that will receive credit for the sale by default.

3\) Copy the Ref Code associated with your Incoming sale.

4\) [Create a new Outgoing sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) with the same biller.

5\) Insert the Ref Code into the Biller Details section of your Outgoing sale. If the Biller Details include a **Domain** field, leave it blank.

<figure><img src="https://2232071635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJVne6meHqGT8rzsBdod%2Fuploads%2FW4nguGtLTsPKQ4Vhz5Py%2Fnatsadmin-crossupsales-linkingincomingoutgoing-refcode-biller.png?alt=media&amp;token=32f0f00f-58d7-4e57-8b94-fb9959a69c33" alt=""><figcaption></figcaption></figure>

This will create the link between your Outgoing sale and Incoming sale.

{% hint style="info" %}
**Please Note:** By default, the affiliate on the Ref Code is credited for the sale. To credit the affiliate who referred the original join instead, enable **Recalculate Ref Code** on the Outgoing sale. This setting only works for sales within one NATS install. See [Crediting Affiliates for Cross Sales / Up Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md#crediting-affiliates-for-cross-sales-up-sales) for details.
{% endhint %}

## Between Two NATS Installs

Use this setup to sell memberships to a partner's sites when the partner has their own NATS install. The partner sets up the Incoming sale on their install, and you set up the Outgoing sale on yours.

**On the partner's NATS install (receiving side):**

1\) The partner [creates a new Incoming sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) for the site and program they want to sell.

2\) The partner provides you with an affiliate account on their install. The account must be enabled for the same program as the Incoming sale.

3\) Log in to the partner's NATS install with the affiliate account that should be credited for the sale, and go to "**https\://\<partner linkdomain>/internal.php?page=xsells**".

4\) Copy the Ref Code associated with the partner's Incoming sale.

**On your NATS install (sending side):**

5\) [Create a new Outgoing sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) on your install with the same biller as the partner's Incoming sale.

6\) In the Biller Details section of your Outgoing sale:

* Insert the Ref Code from step 4.
* Fill in the biller information for the receiving side, which the partner will provide.
* If the Biller Details include a **Domain** field, enter the partner's NATS domain (for example, *partnerdomain.com*). This tells NATS to send the sale to the partner's install.
* If the Biller Details include an **HTTPS Post** field, set it to "Yes" so the sale is sent to the partner's install over HTTPS.

{% hint style="warning" %}
**Important:** The partner may need to allow your server's IP address before their install will accept the sale. See [Incoming Gateway Cross Sale / Up Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md#incoming-gateway-cross-sale-up-sales) and the biller's article in [Cross Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/cross-sale-supported-billers.md) or [Up Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/up-sale-supported-billers.md).
{% endhint %}

7\) Repeat these steps for each biller you want to offer the sale with, then test each sale to make sure it completes on both installs.

## With a Partner That Doesn't Use NATS

NATS can also send sales to, and receive sales from, systems other than NATS. How the sale is passed between the two systems depends on the biller, so check the biller's article in [Cross Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/cross-sale-supported-billers.md) or [Up Sale Supported Billers](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/up-sale-supported-billers.md) before you start.

### Receiving Sales from a Partner

1\) [Create a new Incoming sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) on your install.

2\) Copy the Ref Code from "**<https://domain/internal.php?page=xsells>**" while [overriding as the affiliate](https://docs.toomuchmedia.com/nats-admin/affiliates/further-reading/affiliate-override.md) that should be credited, and give it to the partner.

3\) The partner sends the Ref Code with each sale:

* For gateway billers, the partner posts the sale directly to your NATS install. See [Processing Gateway Cross Sales outside NATS](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/processing-gateway-cross-sales-outside-nats.md) for the required configuration and post format.
* For other billers, the partner passes the Ref Code through the biller as described in the biller's article.

### Sending Sales to a Partner

1\) [Create a new Outgoing sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md) on your install.

2\) In the Biller Details section, fill in the biller information for the receiving side, which the partner will provide. Some billers also require a Ref Code in a specific format for partners that don't use NATS; the biller's article explains what to enter.

3\) Test the sale with the partner to make sure it completes on their side.

## Related Articles

{% content-ref url="/pages/2R7CB1B648EYnZLl5kjh" %}
[Cross/Up Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales.md)
{% endcontent-ref %}

{% content-ref url="/pages/LYsANKKMIySngUedZuK2" %}
[How to Add and Delete a Cross or Up Sale](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/how-to-add-and-delete-a-cross-or-up-sale.md)
{% endcontent-ref %}

{% content-ref url="/pages/a1QkoYKfm5aPYTVNdlj5" %}
[Processing Gateway Cross Sales outside NATS](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/further-reading/processing-gateway-cross-sales-outside-nats.md)
{% endcontent-ref %}
