# Verify the integration is live

> Prove your InfluTo integration works before launch — the dashboard checks, an end-to-end sandbox purchase, and the eight-step integration status for scripts and AI agents.

An integration is done when a referred test purchase shows up in InfluTo as attributed to a creator. This page shows three ways to get there: the dashboard, a full test on a device, and the integration-status API that scripts and AI agents use.

## In the dashboard

- **Setup & SDK** confirms the SDK has connected: after your app's first `initialize` it shows the platform and SDK version it last saw.
- **Send Test Webhook** on **Setup & SDK** pushes a simulated sandbox purchase through the attribution pipeline. It needs an active campaign with at least one creator.
- **Real-Time Events** lists SDK events and purchase events as they arrive, with filters, and marks which purchases were attributed and to which code.

## A full test on a device

<!-- steps -->

### Get a referral link

Activate a campaign, then join it with a creator account that isn't a member of your organization (a second email address or a colleague) and copy the referral link — `https://influ.to/{app_slug}/{CODE}`.

### Install through the link

On a test device, open the link, then install your test build. Use the same network for the tap and the first launch: link-click matching works on the tap you just made. Typing the code into your code field works on any network.

### Launch the app

`checkAttribution` should return `attributed: true` and your code. **Real-Time Events** shows the install.

### Make a sandbox purchase

Use a TestFlight or sandbox tester on iOS, or a license tester on Google Play. On store-direct, set the Apple environment to **Sandbox** first. The purchase appears in **Real-Time Events** as attributed to your code.

<!-- /steps -->

Sandbox purchases never move money, never change your stats and never count toward payouts — you can repeat the test as often as you like.

To start over on the same device, call `clearAttribution()` (or reinstall the app).

## The integration status API

For scripts, CI and AI agents, one call rolls everything up:

```bash
curl https://influ.to/api/agent/apps/$APP_ID/integration-status \
  -H "Authorization: Bearer $INFLUTO_AGENT_KEY"
```

Use an agent key (`it_mcp_…`) from **Connect AI Agent** in the dashboard, or an OAuth token from the MCP connection. The app's SDK key (`it_…`) doesn't work here.

The response contains `live`, a `checklist` of eight steps and `next_actions` for whatever is still open:

| Step | Done when |
|---|---|
| `app_created` | Always true for an existing app |
| `campaign_active` | At least one campaign is active — codes don't attribute without one |
| `sdk_initialized` | The SDK has called `initialize` (shows SDK, version and platform) |
| `sdk_event_received` | At least one SDK event arrived |
| `validation_configured` | A purchase-validation path is set up and ready for the enabled platforms |
| `revenuecat_webhook_wired` | The RevenueCat webhook was connected automatically (RevenueCat path only) |
| `purchase_webhook_seen` | At least one purchase event was received |
| `attributed_conversion` | At least one purchase was attributed to a creator — the integration is proven |

Two more endpoints help when something is off:

```bash
# Recent SDK events and purchase events, with attribution flags
curl "https://influ.to/api/agent/apps/$APP_ID/events/recent?environment=SANDBOX&limit=20" \
  -H "Authorization: Bearer $INFLUTO_AGENT_KEY"

# Push a sandbox INITIAL_PURCHASE through the real pipeline
curl -X POST https://influ.to/api/agent/apps/$APP_ID/test-integration \
  -H "Authorization: Bearer $INFLUTO_AGENT_KEY"
```

With the InfluTo MCP connected, the same checks are the tools `influto_integration_status`, `influto_recent_events` and `influto_test_integration`. If anything about the connection itself looks wrong, run `influto_doctor` first.

## If the test fails

| What you see | Likely cause |
|---|---|
| Nothing on **Setup & SDK** or in Real-Time Events | `initialize` didn't run, or the API key is wrong |
| Install shows as organic | Tap and first launch were on different networks, the window passed, or the campaign isn't active — typing the code is the reliable test |
| No purchase events (RevenueCat) | Webhook URL or Authorization value is wrong — **Setup & SDK** shows rejected calls |
| No purchase events (store-direct) | Credentials aren't green yet, or the platform isn't switched to store-direct |
| Purchase arrives but isn't attributed | The subscriber has no `influto_code` (RevenueCat setter or hook missing on iOS, Flutter or web), or the user was already attributed to someone else |

Everything else: [Troubleshooting](https://docs.influ.to/advanced/troubleshooting.md).
