> 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/further-reading/processing-gateway-cross-sales-outside-nats.md).

# Processing Gateway Cross Sales outside NATS

*Article Topics:* [*One Click Systems*](https://docs.toomuchmedia.com/getting-started/common-topics/one-click-systems.md)*,* [*Cross Sales*](https://docs.toomuchmedia.com/getting-started/common-topics/cross-sales.md)*,* [*Billers*](https://docs.toomuchmedia.com/getting-started/common-topics/billers.md)

{% hint style="danger" %}
**WARNING:** It is important to use POST requests only, using GET may cause sensitive data to be logged by your web server.
{% endhint %}

This article explains how to receive gateway biller Cross Sales in NATS from a system that doesn't use NATS.

If both sides of the Cross Sale use NATS, whether on one install or on two separate installs, you don't need this article. See [Linking Incoming and Outgoing Cross/Up Sales](https://docs.toomuchmedia.com/nats-admin/cross-up-sales/common-questions/linking-an-incoming-cross-sale-to-an-outgoing-cross-sale.md) instead.

## Receiving Cross Sale Data

To receive Cross Sales, you must enter the IP address of the server that is sending the Cross Sale into the $config\['GATEWAY\_ALLOWED\_IPS'] configuration array in your NATS *includes/config.php* file.

For example:

```
$config['GATEWAY_ALLOWED_IPS'] = Array(
'0' => '111.111.111.111',
'1' => '222.222.222.222',
'2' => '333.333.333.333'
);
```

{% hint style="danger" %}
**WARNING:** Incorrectly formatting this line will break your NATS.
{% endhint %}

Each entry should be a single IP address -- ranges, masks, and globs are not supported. For multiple entries, place a comma between each entry.

### Enable Process Gateway

You must also enable the $config\['ALLOW\_\<biller>\_PROCESS\_GATEWAY'] configuration variable for each gateway biller you want to support. Replace *biller* with the gateway biller's shortname in all capital letters.

For example, to enable incoming Netbilling Cross Sales, add the following line to your *includes/config.php* file:

```
$config['ALLOW_NETBILLING_PROCESS_GATEWAY'] = 1;
```

### Allow Members to be created with Biller Details

Additionally, you must set NATS to allow new members to be created by POSTs from billers to properly receive a cross sale. This setting will be turned **off** by default in your NATS install.

To enable the creation of new members by biller posts, navigate to the [Configuration Admin](https://docs.toomuchmedia.com/nats-admin/configuration.md) and select the "Billers" tab. Search for the specific biller and locate the *ALLOW\_CREATE\_NEW\_MEMBER\_XXX* option, with "XXX" being the name of the biller in question. Select "Yes" and that biller will now be able to create new members in your database through POSTs.

<figure><img src="https://2232071635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWJVne6meHqGT8rzsBdod%2Fuploads%2FKDaoXDHrFNgXYb4gf47N%2Fnatsadmin-crossupsales-processinggateway-allowcreatenewmember.png?alt=media&amp;token=f6e6f01b-f5ff-4209-9932-ce37cdc56f98" alt=""><figcaption></figcaption></figure>

Once you have completed the above steps, you will be able to receive gateway cross sales from outside NATS.

## Sending Cross-Sale Data

You must send all of the following information to https\://[domain](https://docs.toomuchmedia.com/additional-resources/common-terms.md#domain)/signup/process\_gateway.php using HTTPS POST.

* xs\_nats: the ref code from *https\://*[domain](https://docs.toomuchmedia.com/additional-resources/common-terms.md#domain)*/internal.php?page=xsells.* This identifies the affiliate sending the cross sale and the cross sale id used.
* username: the new member's username. If this username is not unique on the receiving site, a new random username will be generated.
* password: the new member's password.
* email: the new member's email.
* cc: the credit card number
* cvv: the [Card Verification Value](http://en.wikipedia.org/wiki/Card_Verification_Value)

Depending on the Merchant's Biller setup, the following fields may also be needed:

* enddate\_year (4 digit year, ex: 2011)
* enddate\_month (2 digit month, ex: 12 for December)
* ip (the ip of the member, ex: 123.456.789.012)
* address1
* city
* state (two letter code)

An example HTTPS POST:

```
https://example.com/signup/process_gateway.php
xs_nats=refcode&username=example&password=example...
```

You may optionally send any of the following information about the member by appending it to the HTTPS POST:

* firstname
* lastname
* address1
* address2
* city
* state
* zip
* country (2 Letter ISO code)
* shipping\_firstname
* shipping\_lastname
* shipping\_address1
* shipping\_address2
* shipping\_zip
* shipping\_city
* shipping\_country
* shipping\_state

### Return Values

After NATS processes the information you've sent, it returns two lines. (Note: the lines are sent as text; in your web-browser, they may appear as one line.) The first line is either *SALE OK* or *SALE DECLINED*. After a SALE OK, the second line will be the new member's I.D. number. After a SALE DECLINED, the second line will describe the error. There are currently 17 possible error messages; the following two are most common:

* UNSUPPORTED REQUEST
  * $config\['ALLOW\_biller\_PROCESS\_GATEWAY'] (see above) is either not setup or not setup correctly
* NOT ALLOWED IP
  * The sending program's IP address is not in the $config\['GATEWAY\_ALLOWED\_IPS'] configuration array
