Mastering PIN API: Build, Host & Optimize Your Own Campaigns

Mastering PIN API: Build, Host & Optimize Your Own Campaigns

Posted on 25-02-2025 by Tess Bosma

What is PIN API and why is it a game-changer?

As a Traffic Company affiliate, your goal is clear: get the highest possible conversion rate. The easier you make it for users, the more money you make. That’s where PIN API comes in! This isn’t just another standard PIN-submit offer - it’s a white-label solution that gives you full control over the landing page.

With Traffic Company’s PIN API, you build and control your landing page; the place where the key action takes place. Unlike traditional offers where landing pages are fixed, PIN API allows you to build and customize your own page, optimizing every element to drive conversions. Once the user completes the flow and reached the final product, they land on a standardized page provided by the advertiser. 

💡 There’s no need to add a pre-lander as an additional step.

🚨 Compliance reminder: While PIN API gives you more flexibility in building your own landing page, it’s essential to ensure that your page complies with the specific guidelines provided per campaign. These guidelines are available on our offer wall. 

Why this guide is different from the others.

You might have read our previous articles on PIN API, like ‘’New at Traffic Company: PIN API’’ and ‘’Create your own PIN flow campaign’’. Those posts introduced the concept and explained why Traffic Company’s PIN API is a game-changer. But this guide goes a step further by giving you a complete hands-on approach for those ready to launch PIN API campaigns.

  • In-depth technical guidance - Unlike previous posts that provided an introduction to PIN API, this guide offers detailed instructions on building a custom landing page with specific code examples, allowing affiliate to implement the API quickly.
  • Practical implementation steps - Learn how to host your landing page, set up tracking with tools like Voluum or BeMob, and generate traffic with paid ads.
  • Optimization tips & best practices - Discover valuable insights on improving campaign performance.

But before we dive in, let’s highlight a few key advantages of using PIN API:

  • You can work with Google traffic - Unlike standard affiliate redirects, PIN API works seamlessly with Google Ads. Since Google doesn’t allow direct affiliate redirects, API calls allow you to run campaigns without issues.
  • Avoid domain flags - Hosting your campaigns on your own domain reduces the risk of domain flags, ensuring more stability in your campaigns.
  • Faster load times - Hosting your own landing page gives you more control over performance optimization, which can positively impact conversions.

Now, let’s dive into exactly how to set up and implement your PIN API campaign to start maximizing your conversions!

Step 1: Building a killer landing page with Traffic Company.

Before you go live, you need to build a high-converting landing page. This is where users enter their phone number and receive a PIN. Follow the following steps to create your winning landing page:

1.1 Create the necessary files.

Set up a folder on your computer and create the following essential files:

  • index.php - The first page users see.
  • form.php - The page where users enter their phone number.
  • verify.php - The page where users enter their PIN code. 

Use a solid code editor like PHPStorm, Visual Studio Code, or Sublime Text to edit these files. 

1.2 Code the basic structure.

Here’s a simple index.php example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome to Traffic Company's Exclusive Offer!</title>
</head>
<body>
    <h1>Enter your phone number and WIN BIG!</h1>
    <a href="form.php">Start here</a>
</body>
</html>

Example of a form.php:

<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['msisdn'])) {
    header('Location: verify.php?msisdn=' . urlencode($_POST['msisdn']));
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>Enter Your Number - Powered by Traffic Company</title>
</head>
<body>
    <form method="POST">
        <label>Phone Number:</label>
        <input type="text" name="msisdn" required>
        <button type="submit">Submit</button>
    </form>
</body>
</html>

Example of a simple verify.php :

<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['pin'])) {
    echo "PIN successfully verified! Welcome to Traffic Company";
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>Enter Your PIN - Traffic Company</title>
</head>
<body>
    <form method="POST">
        <label>PIN Code:</label>
        <input type="text" name="pin" required>
        <button type="submit">Verify</button>
    </form>
</body>
</html>

With these three files, you have the foundation for a fully functional Traffic Company PIN API landing page! 

Step 2: Hosting your landing page.

To make your landing page live, you need reliable hosting. Here’s how to get started!

Best hosting options:

  • 000webhost (Free, but limited for real campaigns).
  • Hostinger / SiteGround (Great for beginner affiliates).
  • Hetzner / DigitalOcean) (Recommended for serious affiliates)!

Uploading your files with FileZilla

  1. Open FileZilla and log in to your hosting server.
  2. Navigate to the public_html directory.
  3. Upload index.php, form.php, and verify.php.
  4. Test your site by visiting yourdomain.com

Step 3: Setting up tracking.

If you’re serious about making money, you NEED to track your results.

How to add your offers in Voluum / Bemob:

  1. Log in to Voluum or Bemob.
  2. Go to ‘’Offers’’ and click ‘’Add new offer’’.
  3. Enter your landing page URL, e.g., https://yourdomain.com/form.php
  4. Save the offer and copy the tracking link.

Creating a campaign in Voluum:

  1. Click ‘’Create new campaign’’.
  2. Add the offer you just created and generate a tracking URL. 
  3. Use this tracking URL in your ads.

Step 4: Using the Traffic Company API.

Traffic Company’s API allows you to fully automate your PIN campaigns. The process consists of two main steps:

Step 4.1 Sending a PIN

When a user enters their phone number, your system must request a PIN from Traffic Company’s API:

$url = 'https://api.tc-clicks.com/api/v1/sendpin?' . http_build_query([
  'access-token' => 'yourAccessToken',
  'offer' => 139136,
  'msisdn' => $_POST['msisdn'],
  'ip' => $_SERVER['REMOTE_ADDR']
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

Step 4.2 Verifying the PIN

When a user enters their PIN, your system must verify it with Traffic Company:

$url = 'https://api.tc-clicks.com/api/v1/verify?' . http_build_query([
    'tracker' => $_POST['tracker'],
    'pin' => $_POST['pin']
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

For full details, check out the Traffic Company API documentation: Traffic Company API Documentation (hyperlink naar: https://controlpanel.trafficcompany.com/support/api )

Step 5: Driving traffic with paid ads

Now that your tracking is set up, it’s time to get real traffic ;) 

How to launch your ad campaign:

  1. Select your ad network.
  2. Create a campaign and choose targeting options (country, operator, etc.).
  3. Use the Traffic Company tracking URL as the final destination.
  4. Set your budget and launch the campaigns.
  5. Optimize based on clicks & conversions.

Final Traffic Company tips & tricks

  • Use a CDN like Cloudflare to improve load speed.
  • A/B test different landing pages to see what converts best.
  • Monitor your stats in Traffic Company and optimize daily.
  • Avoid bot traffic! Redirect your bot-traffic to avoid wasting your money. 

Ready to get started? Log in to your Traffic Company account and launch your first campaign today! 

Other stories

TESTING

Is this the end of push collection and push traffic?

Account Manager in Affiliate Marketing: How to explain your job