TrackReward Logo

Billing

Stripe

Integrate Stripe with your TrackReward account to manage billing and payouts. Stripe is a payment gateway that allows you to accept payments and manage subscriptions.

Level of Difficulty: Easy


Developer Needed: No

This means the task is straightforward and can be completed without requiring a developer's help.

TrackPromoter allows you to automatically track sales, refunds, upgrades, and cancellations by integrating with your Stripe account, whether in Test or Live mode.

Connecting TrackReward with Stripe

TrackReward enables automatic tracking of sales, refunds, upgrades, and cancellations from Stripe.

Setting Up

To get started, follow the steps below.

  1. Click on the 'Connect Stripe' button. This will redirect you to the Stripe marketplace, where you will be prompted to install TrackReward.
  2. Select your Stripe account and install the app.
  3. After the installation is complete, you will be redirected back to this page to finish the setup.
Stripe Switching

Switching between test and live mode on Stripe allows you to toggle between testing transactions and processing real payments. To switch between test mode and live mode on Stripe, you will need to disconnect and then reconnect to the desired mode.

API

Tracking Sales with our API

TrackReward allows you to track sales, refunds, upgrades, and cancellations by integrating with your Stripe account using our API. This allows you to track sales in real-time and automate the process.

Setting Up

To get started, follow the steps below.

  1. Get your API key from the TrackReward settings.
  2. On your website need to add this POST API https://trackreward.com/api/tracker/v1/track-sale with the following parameters:
Available Params
Key Type Required Description
account_idstringYesThe app ID provided by TrackReward
customer_emailstringYes (if customer_uid empty)Lead's authentic email address
customer_uidstringYes (if customer_email empty)user id of the lead
planstringNoplan of the product
track_idstringNoplan of the product
amountnumberYesAmount of the sale
eventstringYesEvent of the sale
affiliate_codestringNoAffiliate code of the sale

Example

const axios = require('axios'); async function trackSale(data) { try { const response = await axios.post( 'https://trackreward.com/api/tracker/v1/track-sale', { account_id: data.account_id, // required customer_email: data.customer_email, // required if customer_uid is empty customer_uid: data.customer_uid, // required if customer_email is empty plan: data.plan, // optional track_id: data.track_id, // optional amount: data.amount, // required event: data.event, // required affiliate_code: data.affiliate_code // optional }, { headers: { 'Content-Type': 'application/json', 'API-Key': '<your-api-key-here<', // Replace this with your actual API key from TrackReward settings } } ); console.log('Success:', response.data); } catch (error) { console.error('Error:', error.response ? error.response.data : error.message); } } // Example data for the function call const saleData = { account_id: 'your_account_id', customer_email: 'customer@example.com', // Required if customer_uid is not provided customer_uid: '', // Leave blank if using customer_email plan: 'basic', track_id: '12345', amount: 99.99, event: 'sale', affiliate_code: 'AFF123' }; // Call the function trackSale(saleData);