Pular para o conteúdo principal

Spend from other platforms — next to their deposits

Qubix counts clicks, registrations and deposits for traffic from any platform through its own links and postbacks. Now spend joins them: the spend of a platform that has no import of its own into Qubix is sent by key — and the payback of that traffic is calculated in the same reports as Facebook's.

This is spend intake by key. The key is issued on the MCP/API page, and your program — any program that can send an HTTP request — sends hourly spend to your panel's address: per ad or for a whole website, in the platform's currency. Qubix imports Facebook spend on its own, as before.

What it gives you​

Payback — in the same place as for Facebook. An ad's spend lands next to its clicks, registrations and deposits and goes on into the reports just like Facebook spend: to the ad list, to the Painel, to the traffic source card. ROAS and the cost per deposit for such traffic are calculated in Qubix.

New ads are registered automatically. Ads and campaigns Qubix does not know yet are registered by the very first batch. In the ad list they carry the External badge, and their status is changed in the platform's own ad account: from the platform Qubix receives only the spend. Qubix determines the owner of a new campaign the same way as for Facebook — by an administrator's assignment or by a name pattern that appears in the campaign name.

Website spend — as its own row. If traffic is paid for a website as a whole rather than per ad, the spend is sent for the website. In the lists of campaigns, offers and networks it stands as a separate Site spend row — apart from the Sem campanha, Sem oferta and Sem rede rows.

The platform's currency. Amounts are sent in the platform's currency, and Qubix converts them to US dollars at the exchange rate of the day the row belongs to.

A repeat replaces, it does not double. A cell is the day, the hour, the ad or website, and the source the spend was sent under. The same cell sent again in the same time zone replaces the earlier numbers. So a batch can be sent on a schedule in full, for the whole period the platform has updated. The spend of the same ad for the same hour sent under another source lands separately and is added to the first.

Spend can also be passed in words. The Assistente de AI writes it through the same intake — the Submit spend tool — and asks for confirmation before writing. The same intake is also open to an external AI client connected over MCP.

And straight from a script. A script in the Scripts section — on a schedule or with the Executar button — submits spend through the same intake with the QubixApp.submitSpend command, in rows of the same shape as in a request with a key. It writes with its owner's permissions: the owner needs the Gerenciar fontes de tráfego permission, and spend is submitted only by code that the script's owner or an administrator changed and saved, in the panel or with the script_save tool over MCP — more in Writing a script.

How it works​

The key decides on whose behalf the spend is written, and so which sources, ads and websites it may be written to. An administrator can also issue a key for another person: then the spend is written within that person's permissions. The key is shown once and is not stored anywhere. It works while the account is active and its sessions have not been reset with the Invalidar todas as sessões button in the user card; a new key does not cancel the earlier ones.

The whole batch has one source, and each row describes one cell: the day and the hour, exactly one of the two — an ad or a website — and the spend, optionally with impressions and clicks. A batch's spend is written as a whole or not at all, and with a refusal the intake answers with the reason. While the rate for the row's date has not been published yet — this happens with the current day — or the rate sources did not answer, the intake answers with code 503 and a Retry-After header, and the same batch is sent later; if no source has a rate for that date, such rows are sent in US dollars.

The source in the batch is the platform's traffic source from the Fontes section — one you are allowed to edit. The intake does not take the sources of platforms whose spend Qubix imports on its own: otherwise the spend would land twice.

Check the first batch in the reports

To a key that does not work (revoked, mistyped or not a key at all), the intake answers the same way as to an accepted batch, but writes nothing. After the first send, make sure the spend has appeared in Qubix.

Example​

Spend for one hour: for an ad Qubix does not know yet, and for a whole website. The amounts are in euros, the day and hour — Berlin time:

Bash
curl -X POST 'https://your-panel-address/cost-intake' \
-H 'Content-Type: application/json' \
-d '{
"key": "the key from the «Spend intake by key» block",
"source": "traffic source identifier",
"currency": "EUR",
"tz": "Europe/Berlin",
"rows": [
{"date": "2026-09-28", "hour": 14, "ad_id": "7700123",
"campaign_id": "881", "campaign_name": "BR push 881", "ad_name": "banner 3",
"spend": 12.5, "impressions": 1000, "clicks": 40},
{"date": "2026-09-28", "hour": 14, "website_id": "website identifier", "spend": 3}
]
}'

The first row registers ad 7700123 in a campaign that is stored under its number with the ext- prefix — so it does not take the number of the platform's own campaign. Every row of a new ad names the same campaign_id, campaign_name and ad_name. The campaign is registered only if it has an owner among the people whose ads you may write to; a campaign without an owner is registered only by an administrator. The second row is website spend: it has website_id instead of ad_id. The currency and the time zone can be omitted — then they are US dollars and UTC. The response carries the number of rows written.

Where to turn it on​

  1. Create a source for the platform in the Fontes section, if there is none yet.
  2. Open the MCP/API page, the Spend intake by key block. An administrator chooses whom the key is issued for: For myself or another person.
  3. Click Issue a key and save the key right away — it is not shown a second time.
  4. Set up your program to send batches to the address from the block. A sample body with your key is right there, under the Request body heading.

The block on the page and the Submit spend tool are available to those who have the Gerenciar fontes de tráfego permission.


A platform's spend, clicks and deposits now come together in the same reports — next to Facebook.

What's next​