Overview
On a carrier-billing offer the subscriber pays through their phone bill. Before the operator may charge them, the subscriber has to give consent — either by typing a PIN the operator texts them, or by sending an SMS to the operator's short code. That consent step is what Mobile Subscriptions handles.
| Flow | Also called | What the subscriber does |
|---|---|---|
| PIN | MT, two-click, PIN flow | Enters their number on the landing page, receives a PIN by SMS and types it back. |
| MO | Mobile-originated, click-to-SMS | Taps a button that opens their SMS app with a pre-filled message (for example GAME 4K7QM) and sends it to the short code. |
| PIN + MO | — | The landing page offers both. Each attempt uses one of them. |
Because Affclix sees the operator's answer directly, the conversion is recorded the moment the subscription is confirmed (or on the first charge, if you prefer). There is no advertiser postback to wire up and no delay waiting for one.
In the dashboard go to Integrations → Mobile Subscriptions. It is available on plans that include Mobile Subscriptions (PIN & MO). Team members need the Mobile subscriptions permission.
Before You Begin
Collect the following from the operator or aggregator (the advertiser) before you start:
You also need at least one campaign for the offer. Create it as you would any CPA campaign — the payout is what the affiliate earns per confirmed subscriber.
How It Works
-
The subscriber lands on the publisher's page
Either through the affiliate's Affclix tracking link (the page receives a click_id), or on the affiliate's own page using the Affiliate API, which records the click server-side.
-
The page calls Affclix, Affclix calls the operator
PIN: the page calls Send PIN with the subscriber's number; Affclix calls the operator's Send PIN API and the operator texts the PIN. MO: the page calls MO start and gets a unique code to show the subscriber.
-
The subscriber confirms
PIN: the page calls Verify PIN with the typed PIN; Affclix asks the operator to confirm it. MO: the aggregator forwards the subscriber's SMS to Affclix, which matches the code back to the click.
-
Affclix books the conversion
The CPA is recorded on the campaign for the affiliate who sent the click — immediately, after a hold period, or on the first charge, depending on your settings. The affiliate's postback fires as usual.
-
The operator reports what happens next
Charges, renewals, failed charges, unsubscribes and refunds arrive on the integration's lifecycle URL. Early churn and refunds claw the CPA back automatically.
The operator generates and sends the PIN. Entering it is the subscriber's billing consent, recorded on the operator's side. Affclix only relays the calls — which is why a regular OTP gateway cannot be used for carrier billing.
Set Up an Integration
Create one integration per operator or aggregator API. One integration can serve several campaigns (for example the same service on two operators), but each campaign uses at most one integration.
-
Open Integrations → Mobile Subscriptions and click Add integration
The form is split into numbered sections, with a progress panel on the right that ticks each section off as it is completed.
-
Integration
Give it a name you will recognise (operator — service, for example "Airtel India — Gaming Club"), pick the advertiser, and select the campaigns that bill through this API. Campaigns already linked to another integration are not listed. Leave Live on to accept traffic.
-
Subscription flow
Choose PIN, MO or PIN + MO. For MO, enter the short code and keyword — see MO (Send SMS) Flow.
-
Send PIN and Verify PIN APIs
Enter the operator's endpoints, parameters and success rule. A live request preview under each section shows exactly what Affclix will send. Skipped for MO-only integrations.
-
Billing & payout
Decide when the conversion is booked and how churn is handled. The "What happens" box spells out the resulting policy in plain words.
-
Security & limits
Add the operator's API key header and review the limits, then click Create integration. After saving, the edit page shows the lifecycle URL (and the MO notification URL) to send to the operator.
Send & Verify PIN APIs
Each of the two calls is configured the same way.
| Setting | What to enter |
|---|---|
| Method & URL | GET or POST, and the operator's HTTPS endpoint. Private and internal addresses are refused, and redirects are not followed. Macros may be used in the URL and are URL-encoded. |
| Body | POST only: Form (application/x-www-form-urlencoded) or JSON. With GET the parameters go in the query string. |
| Parameters | Key / value pairs. Values can be fixed text (a service ID) or macros. Use the quick-add chips for the common ones. |
| Success rule | Any HTTP 2xx; the response body contains a text; or a JSON field equals a value (dot paths such as data.status are supported). A non-2xx answer always counts as a failure. Comparisons ignore case. |
| Operator transaction id | Send PIN only, optional. If the operator returns an id that Verify PIN must echo, name its JSON field (for example data.session_id) and use {advertiser_ref} in Verify PIN. |
Macros
Macros are filled per subscriber when the call is made. Click a macro in the panel on the right of the form to insert it into the field you were editing.
| Macro | Value |
|---|---|
{msisdn} | Subscriber number, E.164 without +, e.g. 919876543210 |
{msisdn_e164} | Subscriber number with + |
{msisdn_national} | National number, e.g. 9876543210 |
{pin} | The PIN the subscriber typed (Verify PIN only) |
{otp} | Same as {pin} (Offer18 spelling) |
{click_id} | Affclix click id |
{pin_ref} | Affclix PIN transaction reference |
{advertiser_ref} | Transaction id the advertiser returned from Send PIN |
{campaign_id} | Campaign id |
{affiliate_id} | Affiliate (publisher) id |
{operator} | Mobile operator the publisher passed, if any |
{country} | Click country (ISO-2) |
{ip} | Subscriber IP |
{user_agent} | Subscriber browser user agent |
Example
An operator that expects a JSON POST and answers {"status":"PIN_SENT"} would be configured as:
POST https://api.operator.example/v2/subscription/sendpin
Content-Type: application/json
X-Api-Key: ••••••
{ "msisdn": "{msisdn}", "service_id": "GAMES_DAILY", "txn_id": "{pin_ref}", "ip": "{ip}" }
Success when: JSON field status = PIN_SENT
Operator transaction id: data.session_idPassing {pin_ref} in Send PIN lets the operator quote it back in lifecycle notifications, which is the most reliable way to match a charge to the right subscription.
MO (Send SMS) Flow
With MO the subscriber confirms by sending an SMS. Every visit gets its own attribution code, so the SMS can be matched to the click that produced it.
| Setting | Meaning |
|---|---|
| Short code | The number the subscriber texts, for example 93055. |
| Keyword | Optional word before the code, for example GAME. The subscriber sends "GAME 4K7QM". |
| Code length | 4–10 characters. Codes avoid look-alike characters (0/O, 1/I). |
| Code valid for | How long the code can be redeemed (5 minutes to 24 hours). An SMS after that is recorded as expired. |
After saving, copy the MO notification URL from the edit page and ask the aggregator to call it for every incoming SMS on the short code, with the sender's number and the full message text:
https://api.affclix.com/v1/pin/mo/notify/lc_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX?msisdn={msisdn}&text={text}&operator={operator}- text is the SMS exactly as received; code alone is also accepted.
- Affclix answers HTTP 200 for every final decision (subscribed, already confirmed, unattributed, expired, not credited), so the aggregator does not retry needlessly.
- A matched SMS confirms the subscription exactly like a verified PIN.
Billing, Hold & Churn
| Setting | Options | Effect |
|---|---|---|
| Book the conversion when | The subscriber confirms · The first charge succeeds | Confirm = fastest feedback for affiliates. First charge ("pay on billing") waits for a charged notification and books its amount, so you only pay for subscribers who were actually billed. |
| Hold period | 0–2160 hours | The CPA is booked as pending and approves automatically when the hold ends if the subscriber is still active. An unsubscribe or refund during the hold rejects it before it is ever paid. |
| Early-churn protection | 0–720 hours | An unsubscribe within this many hours of subscribing claws the CPA back — even after it was approved. |
| Refunds | — | Always claw the CPA back. |
Pay on confirmation with a 48–72 hour hold and 24 hours of early-churn protection. That matches how most operators report churn and keeps fraud from incentivised or auto-subscribed traffic off your invoices.
Campaign events (optional)
- Subscription recorded as — the campaign event the confirmed subscription is booked on. Blank = the campaign's default goal.
- Renewals recorded as — each renewal becomes a conversion on this event with its amount, for revenue-share payouts.
- Unsubscribes recorded as — for churn reports and affiliate postbacks. Give this event a zero payout.
Use the event token (for example renewal), and add the event to the campaign first.
Lifecycle Postback
Each integration has its own secret lifecycle URL, shown on its edit page after saving. Give it to the operator so they can report what happens to every subscription. Treat it like a password — the token in the URL is the credential.
https://api.affclix.com/v1/pin/lifecycle/lc_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX?event={event}&pin_ref={pin_ref}&amount={amount}¤cy={currency}&event_id={event_id}| Parameter | Required | Description |
|---|---|---|
event | Yes | charged, renewed, charge_failed, unsubscribed or refunded. |
pin_ref / advertiser_ref / click_id / msisdn | One of them | Identifies the subscription. pin_ref is the most reliable; msisdn matches the latest subscription for that number. |
amount, currency | For charges | The amount billed and its ISO currency code. |
event_id | Recommended | The operator's own id for the notification. Makes retries safe — a repeated event_id is ignored. |
timestamp, reason, operator | No | Stored with the event for your reference. |
| Event | What Affclix does |
|---|---|
charged | Records the first charge. With pay on billing, books the CPA with this amount. |
renewed | Adds to the renewal count and billed total; books a renewal conversion if a renewal event is set. |
charge_failed | Recorded only (for example a low balance). |
unsubscribed | Ends the subscription. Inside the hold or the early-churn window, the CPA is rejected. |
refunded | Marks the subscription refunded and always rejects the CPA. |
Publisher Integration
Publishers can connect in three ways. All three are listed with copy buttons under API reference on the Mobile Subscriptions page.
| Option | Best for | How it authenticates |
|---|---|---|
| Ready-made landing page | Publishers without developers | A single PHP file generated per affiliate and campaign. The API key stays on the server and never reaches the browser. |
| Landing page API | Pages that receive traffic through the Affclix tracking link | The click_id from the tracking link. No API key; the click must be under 24 hours old. |
| Affiliate API (server-to-server) | Publishers with their own pages and back end | The affiliate's API credentials in headers. The click is recorded on Send PIN — no tracking link needed. |
Generating the landing page
- On the integration card, click the download icon (or Landing page on the edit screen).
- Pick the campaign and the affiliate. The affiliate needs API access turned on — see Affiliate API Access.
- Set the title, headline, button colour, terms text and an optional thank-you URL, then download.
- The publisher uploads the file to any PHP 7.4+ host. It shows the number form, then the PIN form (or the SMS button for MO), and calls Affclix server-side.
The file contains the affiliate's API key. Send it only to that affiliate, and regenerate it if the key is revoked.
API Reference
| Endpoint | Use | Rate limit |
|---|---|---|
POST https://api.affclix.com/v1/pin/send | Send PIN (landing page) | 10 / min per IP |
POST https://api.affclix.com/v1/pin/verify | Verify PIN (landing page) | 20 / min per IP |
GET https://api.affclix.com/v1/pin/status/pin_XXXXXXXXXXXXXXXXXXXX?click_id=… | Status of an attempt | 60 / min per IP |
POST https://api.affclix.com/v1/pin/mo/start | Start an MO attempt (landing page) | 10 / min per IP |
POST https://api.affclix.com/v1/pin/affiliate/send | Send PIN (Affiliate API) | 300 / min and 20,000 / day per affiliate |
POST https://api.affclix.com/v1/pin/affiliate/verify | Verify PIN (Affiliate API) | |
GET https://api.affclix.com/v1/pin/affiliate/status/pin_XXXXXXXXXXXXXXXXXXXX | Status (Affiliate API) | |
POST https://api.affclix.com/v1/pin/affiliate/mo/start | Start an MO attempt (Affiliate API) |
Landing page flow
POST https://api.affclix.com/v1/pin/send
Content-Type: application/json
{ "click_id": "CLICK_ID", "msisdn": "919876543210", "operator": "airtel" }
200 { "success": true, "code": "pin_sent",
"data": { "pin_ref": "pin_…", "expires_at": "2026-11-26T10:15:00Z" } }POST https://api.affclix.com/v1/pin/verify
Content-Type: application/json
{ "click_id": "CLICK_ID", "pin_ref": "pin_…", "pin": "4567" }
200 { "success": true, "code": "verified" }
422 { "success": false, "code": "pin_rejected",
"data": { "attempts_left": 2, "advertiser_response": "…" } }Affiliate API
Send these headers on every call. The subscriber's IP and user agent are required, because the click is created on their behalf.
POST https://api.affclix.com/v1/pin/affiliate/send
X-Domain-Id: YOUR_DOMAIN_ID
X-Affiliate-Id: AFFILIATE_ID
X-Api-Key: AFFILIATE_API_KEY
Content-Type: application/json
{ "campaign_id": 123, "msisdn": "919876543210",
"user_ip": "SUBSCRIBER_IP", "user_agent": "SUBSCRIBER_UA",
"operator": "airtel", "aff_click_id": "optional", "sub_aff_id": "optional" }
200 { "success": true, "code": "pin_sent", "data": { "click_id": "…", "pin_ref": "pin_…" } }Verify with { "pin_ref": "pin_…", "pin": "4567" } on the affiliate verify endpoint.
MO start
POST https://api.affclix.com/v1/pin/mo/start
{ "click_id": "CLICK_ID" }
200 { "success": true, "code": "mo_pending", "data": {
"pin_ref": "pin_…", "shortcode": "93055", "sms_body": "GAME 4K7QM",
"sms_uri": "sms:93055?body=GAME%204K7QM",
"sms_uri_ios": "sms:93055&body=GAME%204K7QM" } }Show "Send GAME 4K7QM to 93055" with a button that opens sms_uri (sms_uri_ios on iPhone), then poll the status endpoint every few seconds until it reports verified. Calling MO start again for the same click returns the same code while it is valid.
Response codes
Every answer carries a machine-readable code. Show the subscriber a friendly message for each.
| Code | HTTP | Meaning |
|---|---|---|
pin_sent / mo_pending | 200 | PIN sent, or MO code issued. |
verified / already_verified | 200 | Subscription confirmed; the conversion is booked. |
unavailable | 404 | No live integration for this campaign, or the wrong flow was called. |
click_rejected | 4xx | The click is unknown, older than 24 hours or from another account. |
invalid_msisdn | 422 | Not a valid mobile number. |
msisdn_country_mismatch | 422 | The number is from a different country than the visitor. |
already_subscribed | 409 | This number subscribed to the campaign in the last 30 days. |
cooldown | 429 | Less than 30 seconds since the last PIN. retry_after gives the seconds to wait. |
too_many_requests | 429 | PIN resends per click reached, or 3 PINs for this number in 24 hours. |
advertiser_rejected | 4xx | The operator refused to send the PIN; advertiser_response has their answer. |
invalid_pin | 422 | PIN missing or malformed. |
pin_rejected | 422 | The operator says the PIN is wrong; attempts_left shows how many tries remain. |
pin_expired | 410 | The PIN is older than its validity. Request a new one. |
too_many_attempts | 429 | Wrong-PIN limit reached. Request a new PIN. |
not_found / not_verifiable | 404 / 409 | Unknown pin_ref, or the attempt can no longer be confirmed. |
tracker_unavailable | 503 | Temporary — retry shortly. |
Monitoring Attempts
The Mobile Subscriptions page shows the last 7 days at a glance — attempts, how many reached the subscriber, subscribed (with conversion rate), operator rejections and churn — plus a card per integration with its own attempts, subscribers, conversion rate and amount billed.
Below, Subscription attempts lists every attempt. Filter by status with the chips, by integration, or search by number, pin_ref or click_id. Click a row for the full log: the exact request and response of each operator call, timings and the lifecycle events received.
| Status | Meaning |
|---|---|
| Subscribed | PIN verified or SMS matched — the conversion was booked. |
| PIN sent | The operator accepted Send PIN; waiting for the subscriber to type it. |
| Awaiting SMS | MO code issued; waiting for the subscriber's SMS. |
| Wrong PIN | The operator rejected the PIN on the last attempt. |
| Send failed | The operator refused Send PIN (not eligible, already subscribed, blacklisted, wrong operator). |
| SMS not credited | An SMS arrived but cannot be credited — the reason is shown on the attempt. |
| Expired | The PIN or MO code ran out before it was used. |
The Conversion column shows Booked, On hold (with the date it approves), Awaiting charge, Needs review or Clawed back (with the reason). The Subscription column shows Active, Unsubscribed or Refunded, the renewal count and the total billed.
Compliance Checklist
Operators and regulators audit carrier-billing flows closely, and a non-compliant page can get a whole service suspended. Share this checklist with publishers:
Troubleshooting
| Symptom | What to check |
|---|---|
| Every attempt is "Send failed" | Open one and read the operator's response. Usually a missing or wrong API key header, a parameter name the operator does not expect, or a success rule that does not match their answer. |
| Publishers get "unavailable" | The integration is paused, the campaign is not linked to it, or the page calls the PIN endpoints on an MO-only integration (or the reverse). |
| "click_rejected" on Send PIN | The page is not passing the click_id from the tracking link, or the click is older than 24 hours. Use the Affiliate API if the publisher has no tracking link. |
| Verify PIN fails although the PIN is right | The operator probably needs its own transaction id: set Operator transaction id on Send PIN and pass {advertiser_ref} in Verify PIN. |
| MO attempts stay "Awaiting SMS" | The aggregator is not calling the MO notification URL, or sends the text without the code. Check that the short code and keyword match exactly. |
| Pay-on-billing conversions stay "Awaiting charge" | No charged event has arrived on the lifecycle URL. Ask the operator to send charged with pin_ref (or another identifier). |
| Conversion shows "Needs review" | The hold ended but the conversion is still pending for another reason (for example manual approval on the campaign). Review it in Conversion Logs. |