# Your software buys numbers through handler_api? Get paid on its volume

> If your bot, panel or test-automation service orders numbers for other people, the SimAggregator partner program pays you a percentage of everything they buy through it. The tag is one parameter on every order request. There is no cap, and your users pay the same price as before.

Source: https://otpwatch.com/software-program
Updated: 2026-11-24
API key: https://otpwatch.com/agent/key

## Who it is for

The program pays on your users' volume: your code places the order, your user gets the number. That covers three kinds of software:

- **Bots** in Telegram or on the web that sell numbers to their users. Building one: [Telegram number bot in Python and Node.js](https://otpwatch.com/telegram-number-bot.md).
- **Panels** where customers order activations from a dashboard you run. Pricing one: [markup and rules for an OTP number panel](https://otpwatch.com/otp-number-panel.md).
- **Test-automation services** that buy numbers for their customers' sign-up and login tests.

If your own team is the only buyer, there is no user volume to count. A plain API key and the [handler_api.php reference](https://otpwatch.com/handler-api.md) are all you need.

## How softId works

The partner portal shows the order request like this:

```text title="order request, as shown on the portal"
# handler_api reference: https://otpwatch.com/software-program
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
GET /stubs/handler_api.php?api_key=…&action=getNumber&service=…&country=…&softId=SW-…
```

`softId` carries your software's ID. The platform sees the tag, issues the number as usual and credits your partner balance for every completed activation. The payout is calculated from the full price of that activation, with no deductions. Your user pays the normal price: the tag does not change what the order costs.

In the API docs, `softId` is an optional string of up to 255 characters on `getNumber` and `getNumberV2`. Those are the two calls that place an order, so that is where it goes, every time. An order sent without it carries no tag. The rest of the protocol stays exactly as in the [reference](https://otpwatch.com/handler-api.md).

### Put it in one place

Add the tag where requests are built, not at each call site. Then no new code path can forget it, and an empty value stops the order instead of sending it untagged.

```env title=".env.example"
# handler_api reference: https://otpwatch.com/software-program
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
SMS_API_BASE_URL=https://sim-aggregator.org/stubs/handler_api.php
# Key from the SimAggregator dashboard: https://otpwatch.com/agent/key
SMS_API_KEY=
```


```js tab="Node.js" title="sms.mjs"
// handler_api reference: https://otpwatch.com/software-program
// Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
const BASE_URL = process.env.SMS_API_BASE_URL ?? "https://sim-aggregator.org/stubs/handler_api.php";
const API_KEY = process.env.SMS_API_KEY;
const SOFT_ID = process.env.SIM_SOFT_ID; // your software ID (SW-…)
const ORDERS = new Set(["getNumber", "getNumberV2"]);

export async function sms(action, params = {}) {
  const url = new URL(BASE_URL);
  url.search = new URLSearchParams({ action, api_key: API_KEY, ...params });
  if (ORDERS.has(action)) {
    if (!SOFT_ID) throw new Error("SIM_SOFT_ID is empty: this order would go out untagged");
    url.searchParams.set("softId", SOFT_ID);
  }
  const res = await fetch(url);
  if (!res.ok) throw new Error(`HTTP ${res.status} on ${action}`);
  return (await res.text()).trim();
}
```

```python tab="Python" title="sms.py"
# handler_api reference: https://otpwatch.com/software-program
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
import os

import requests

BASE_URL = os.getenv("SMS_API_BASE_URL", "https://sim-aggregator.org/stubs/handler_api.php")
API_KEY = os.environ["SMS_API_KEY"]
SOFT_ID = os.getenv("SIM_SOFT_ID", "")  # your software ID (SW-…)
ORDERS = {"getNumber", "getNumberV2"}


def sms(action: str, **params) -> str:
    query = {"action": action, "api_key": API_KEY, **params}
    if action in ORDERS:
        if not SOFT_ID:
            raise RuntimeError("SIM_SOFT_ID is empty: this order would go out untagged")
        query["softId"] = SOFT_ID
    r = requests.get(BASE_URL, params=query, timeout=30)
    r.raise_for_status()
    return r.text.strip()
```

```php tab="PHP" title="sms.php"
<?php
// handler_api reference: https://otpwatch.com/software-program
// Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
const ORDERS = ['getNumber', 'getNumberV2'];

function sms(string $action, array $params = []): string {
    $base = getenv('SMS_API_BASE_URL') ?: 'https://sim-aggregator.org/stubs/handler_api.php';
    $query = ['action' => $action, 'api_key' => getenv('SMS_API_KEY')] + $params;
    if (in_array($action, ORDERS, true)) {
        $softId = getenv('SIM_SOFT_ID');
        if (!$softId) throw new RuntimeException('SIM_SOFT_ID is empty: this order would go out untagged');
        $query['softId'] = $softId;
    }
    $body = file_get_contents($base . '?' . http_build_query($query));
    if ($body === false) throw new RuntimeException("request failed: $action");
    return trim($body);
}
```

### When the ID is wrong

An invalid `softId` gets the order refused with `BAD_SOFTWARE_ID` ("Invalid softId" in the API docs). That is a configuration error, not a shortage of numbers: do not retry it the way you retry `NO_NUMBERS`. Stop ordering, raise an alert and fix the value. The other refusals and what to do with them are on the [error codes](https://otpwatch.com/error-codes.md) page.

> **Check the tag in your logs**
Log each order URL with the key masked. Every `getNumber` line should contain `softId=`. A line without it is an untagged order.

## What you need


### API access

A SimAggregator account and an API key. The **Get API key** button at the top of this page opens the buyer sign-up on sim-aggregator.org; keys are issued in its dashboard, and the [handler_api reference](https://otpwatch.com/handler-api.md) lists every call.

### An application on the partner portal

Sign up on the [partner portal](https://otpwatch.com/agent/partner) and connect your software. The review takes one business day. A referral link needs no review; software does.

### softId on every order

Once the software is approved, put its ID into `softId` as in the examples above and ship it. Prices for your users stay the same.

### Payouts and withdrawal

Each completed activation through your software is credited to your partner balance. Withdraw from $10 by request in the dashboard: requests are processed within one business day, in USDT (TRC-20) or USDC (BEP-20, Polygon).

## Software program or referral link

The portal has two ways in. They differ in what gets tagged and where the payout stops.

| | Referral link | Software program |
|---|---|---|
| What is tagged | a person who comes through your link | every order your software sends with `softId` |
| Rate | a percentage of each purchase | set individually for each piece of software |
| Cap | $50 per referred client | no cap |
| How long it pays | until that person reaches the cap | as long as the software is active |
| To start | a link in a couple of minutes, no review | application and review, one business day |
| You need | an audience | API access and software with users |

The cap is the line that matters for software. Through a link, the payout from one client stops at $50, however much that client keeps buying. Orders your software places have no such line, for as long as it runs. If you also have a channel or a blog, a referral link and the software program work side by side and pay into the same balance.

## Moving your code to this base URL

If your software already speaks handler_api.php to another endpoint, the move is mostly a new base URL and a new key. [Migrate by base URL](https://otpwatch.com/migrate-base-url.md) has the checklist: ids, timers, cancellation, refunds and a staging run that costs cents.

Item 7 of that checklist says to drop parameters the reference does not list, and a software tag from your old setup is one of them. `softId` is the exception: it is in the API docs for `getNumber` and `getNumberV2`. Finish the migration first, then add `softId` and repeat one order on the staging key.
