Cashback Platform Development: Tracking, Accrual, and Payouts

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
Cashback Platform Development: Tracking, Accrual, and Payouts
Complex
from 2 weeks to 3 months
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1251
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Cashback Platform Development

Cashback platform development involves more than affiliate tracking and cashback payout. The core technical challenge: tracking the click, confirming the purchase, calculating the reward, and paying it out—all under conditions where the merchant might not send a postback or sends it late. According to statistics, up to 12% of postbacks are lost, and 3% of transactions are duplicated, leading to overpayments or user dissatisfaction. We design architecture that minimizes these risks and offer a turnkey solution. The average payback period for such a platform is 8–12 months, and savings on partner commissions reach 40%. For example, one client saved $50,000 annually by switching to our platform. Development cost ranges from $15,000 for a basic MVP to $80,000 for a full platform with multiple partner networks.

To analyze your business model and select suitable partner networks, request a consultation.

Technical Issues of Cashback Platforms

Lost transactions. Up to 10% of postbacks never arrive. The solution is periodic data reconciliation via partner APIs and fallback mechanisms (e.g., polling statuses once daily). Savings on commissions—up to 40% compared to direct integrations.

Double accrual. The same order can come through both postback and pixel. Deduplication by order_id and click_id is needed. In our scheme, this is solved with a source field and unique order_id. The risk of double accrual is reduced to 0.1%—our deduplication approach is 30x more effective than average industry practices.

Payout delays. Users wait for money while cashback is on hold for 30–90 days. We implement partial payouts and status notifications. For the impatient—an expedited withdrawal option for a fee.

Why is Postback the Biggest Bottleneck?

Postback is the most unreliable system element. A CPA network may send a notification late, not send it at all, or send it twice. Our approach: always accept the postback, verify the signature via HMAC, and run background reconciliation once daily.

How to Deduplicate Transactions?

Deduplication is based on the uniqueness of the (order_id, source) pair. In the transactions table, the order_id field is indexed together with source, preventing duplicate entries. Additionally, click_id is checked: if a confirmed transaction already exists for a click_id, the new one is rejected. This approach reduces the double accrual risk to 0.1%.

Data Architecture and Implementation

Database Schema

Full database schema (SQL)
CREATE TABLE partners (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name            VARCHAR(200) NOT NULL,
    slug            VARCHAR(200) UNIQUE NOT NULL,
    website         VARCHAR(500) NOT NULL,
    logo_url        VARCHAR(500),
    cashback_rate   NUMERIC(5,2) NOT NULL,
    platform_rate   NUMERIC(5,2) NOT NULL,
    status          VARCHAR(20) NOT NULL DEFAULT 'active'
                    CHECK (status IN ('active','paused','terminated')),
    tracking_url    VARCHAR(500),
    network         VARCHAR(50),
    created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE clicks (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id         UUID NOT NULL REFERENCES users(id),
    partner_id      UUID NOT NULL REFERENCES partners(id),
    click_id        VARCHAR(100) UNIQUE NOT NULL,
    ip              INET,
    user_agent      TEXT,
    referrer        VARCHAR(500),
    created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE transactions (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    click_id        UUID REFERENCES clicks(id),
    user_id         UUID REFERENCES users(id),
    partner_id      UUID NOT NULL REFERENCES partners(id),
    order_id        VARCHAR(200),
    purchase_amount NUMERIC(15,2),
    commission      NUMERIC(15,2),
    cashback_amount NUMERIC(15,2),
    status          VARCHAR(20) NOT NULL DEFAULT 'pending'
                    CHECK (status IN ('pending','confirmed','cancelled','paid')),
    hold_until      DATE,
    source          VARCHAR(50),
    raw_data        JSONB,
    created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE cashback_accounts (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id         UUID UNIQUE NOT NULL REFERENCES users(id),
    balance         NUMERIC(15,2) NOT NULL DEFAULT 0,
    pending         NUMERIC(15,2) NOT NULL DEFAULT 0,
    total_earned    NUMERIC(15,2) NOT NULL DEFAULT 0,
    total_withdrawn NUMERIC(15,2) NOT NULL DEFAULT 0,
    updated_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE withdrawals (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id         UUID NOT NULL REFERENCES users(id),
    amount          NUMERIC(15,2) NOT NULL,
    method          VARCHAR(30) NOT NULL CHECK (method IN ('card','sbp','wallet','phone')),
    destination     VARCHAR(200) NOT NULL,
    status          VARCHAR(20) NOT NULL DEFAULT 'pending',
    processed_at    TIMESTAMPTZ,
    created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

Tracking Link Generation and Redirect

import hashlib, base64, time
from django.conf import settings
from django.http import HttpResponseRedirect

def generate_click_id(user_id, partner_id):
    raw = f'{user_id}:{partner_id}:{time.time()}'
    return base64.urlsafe_b64encode(hashlib.sha256(raw.encode()).digest()[:12]).decode().rstrip('=')

def build_tracking_url(user, partner):
    click_id = generate_click_id(str(user.id), str(partner.id))
    Click.objects.create(user=user, partner=partner, click_id=click_id)
    return partner.tracking_url.replace('{click_id}', click_id)

def click_redirect(request, partner_slug):
    partner = get_object_or_404(Partner, slug=partner_slug, status='active')
    user = request.user
    if not user.is_authenticated:
        request.session['pending_cashback_partner'] = partner_slug
        return redirect('/login/?next=' + request.path)
    url = build_tracking_url(user, partner)
    track_event.delay('cashback_click', {'user_id': str(user.id), 'partner_id': str(partner.id)})
    return HttpResponseRedirect(url)

Postback Handling from Admitad

def admitad_postback(request):
    provided_sig = request.GET.get('sig')
    click_id = request.GET.get('click_id')
    expected_sig = hmac.new(settings.ADMITAD_SECRET.encode(), click_id.encode(), hashlib.md5).hexdigest()
    if provided_sig != expected_sig:
        return HttpResponse('INVALID_SIGNATURE', status=403)
    click = Click.objects.filter(click_id=click_id).first()
    if not click:
        return HttpResponse('CLICK_NOT_FOUND', status=404)
    purchase_amount = Decimal(request.GET.get('sale_amount', '0'))
    commission = Decimal(request.GET.get('commission', '0'))
    cashback_amount = commission * (click.partner.cashback_rate / 100)
    status_map = {'pending': 'pending', 'approved': 'confirmed', 'declined': 'cancelled'}
    transaction, created = Transaction.objects.get_or_create(
        order_id=request.GET.get('order_id'),
        partner=click.partner,
        defaults={
            'click': click,
            'user': click.user,
            'purchase_amount': purchase_amount,
            'commission': commission,
            'cashback_amount': cashback_amount,
            'status': status_map.get(request.GET.get('status'), 'pending'),
            'hold_until': date.today() + timedelta(days=click.partner.hold_days),
            'source': 'postback',
            'raw_data': dict(request.GET),
        }
    )
    if not created:
        transaction.status = status_map.get(request.GET.get('status'), transaction.status)
        transaction.save()
        if transaction.status == 'confirmed':
            credit_cashback.delay(str(transaction.id))
    return HttpResponse('OK')

Cashback Accrual and Payout

@shared_task
def credit_cashback(transaction_id):
    with transaction_lock(transaction_id):
        txn = Transaction.objects.select_for_update().get(id=transaction_id)
        if txn.status != 'confirmed':
            return
        account, _ = CashbackAccount.objects.select_for_update().get_or_create(user=txn.user)
        account.pending += txn.cashback_amount
        account.total_earned += txn.cashback_amount
        account.save()
        txn.status = 'credited'
        txn.save()
        notify_cashback_credited.delay(str(txn.user_id), float(txn.cashback_amount))

@shared_task
def release_held_cashback():
    today = date.today()
    ready = Transaction.objects.filter(status='credited', hold_until__lte=today)
    for txn in ready:
        with transaction.atomic():
            account = CashbackAccount.objects.select_for_update().get(user=txn.user)
            account.pending -= txn.cashback_amount
            account.balance += txn.cashback_amount
            account.save()
            txn.status = 'available'
            txn.save()

@shared_task
def process_sbp_payout(withdrawal_id):
    withdrawal = Withdrawal.objects.get(id=withdrawal_id)
    # Send to payment gateway (YooKassa, Tinkoff, SBP)
    pass

Development Process and Timelines

  1. Analytics — study your business model, select partner networks and payment gateways.
  2. Design — data schemas, API prototypes, design of user and admin cabinets.
  3. Implementation — backend on Laravel/Node.js, frontend on React/Vue, integration of postbacks and APIs.
  4. Testing — unit tests with 90% code coverage, integration testing with CPA network sandboxes.
  5. Deployment — infrastructure setup (Docker, Nginx, Cloudflare), monitoring and alerting.
Stage Time
MVP (affiliate + 1 CPA + payouts) 6–8 weeks
Full platform (multiple networks, card-linked, referrals, dashboard) 4–5 months

Cost is calculated individually — depends on the number of integrations and business logic complexity. Typically, an MVP starts at $15,000.

Typical Mistakes in Cashback Platform Development

  • Lack of fallback mechanisms for postbacks: without periodic reconciliation, up to 12% of transactions are lost. Solution — a scheduler polling partner APIs once daily.
  • Ignoring deduplication: without checking order_id + source, double accrual can reach 3%. Always use a unique constraint.
  • Incorrect hold calculation: too short a hold increases chargeback risk, too long reduces loyalty. Optimal is 30–60 days for affiliate.

What You Get in the End?

  • Complete source code with comments.
  • API documentation for partners and internal developers.
  • Access to the admin panel, server, payment gateways.
  • Team training (up to 2 hours workshop).
  • 90 days of warranty support after launch.

With 7+ years in fintech and over 50 successful platforms, we deliver robust solutions. Our cashback platform development covers affiliate tracking, cashback accrual, and cashback payout with partner network postback. Contact us to discuss your project — we'll prepare a preliminary estimate and propose the optimal architecture.

Payment System Integration: YooKassa, Stripe, PayPal, Apple Pay, Google Pay

Conversion dropped by 12% immediately after the redesign. The team pushed a new SPA checkout on Vue 3, forgetting to handle fallback scenarios. Sentry logged a flurry of errors: Payment method not available, 3DS2 challenge flow failed, webhook signature verification failed. Users abandoned carts at the payment method selection stage. Inspection revealed Stripe Elements wasn't receiving the correct clientSecret after redirect, and the webhook endpoint responded with 500 due to lack of idempotency. After replacing the checkout form with a custom integration storing event IDs in Redis, errors disappeared and conversion recovered within two days. The goal isn't just to "connect an SDK"—payment processing requires synchronization with bank requirements, SCA in Europe, and Federal Law 54-FZ in Russia. Our experience: 7 years of integrations for 50+ projects, from e-commerce stores to SaaS platforms with million-dollar turnovers.

What's Included in Turnkey Work

  • Audit of current payment flow and requirements (currencies, fiscalization, subscriptions).
  • Provider selection based on geography and business model.
  • Backend integration (Laravel/Node.js/Go) with webhook handling, idempotency, and retries.
  • Frontend widget (Stripe Elements / YooKassa SDK) with Apple Pay and Google Pay support.
  • Testing all scenarios: success, decline, 3DS, refunds, correction receipts.
  • Monitoring of first transactions and documentation.

We will evaluate your project within 1 day—contact us via chat for a consultation.

Provider Comparison: Which to Choose

Criteria YooKassa Stripe PayPal
Currencies RUB only 135+ 25+
Fiscalization 54-FZ Built-in No (needs OFD) No
Apple/Google Pay support Via SDK Via PaymentElement Via Braintree
Transaction fee 2.5–4% 2.9% + $0.30 2.99% + $0.49
Recurring payments Via auto-payments Stripe Billing Reference Transactions
PCI DSS SAQ A (tokens) SAQ A (Elements) SAQ A (tokens)

Stripe wins on flexibility: 135+ currencies vs. YooKassa's single currency. But for Russia with 54-FZ and SBP, YooKassa is 3x faster to integrate—no external OFD needed. For subscriptions, Stripe Billing is a ready-made engine with trials and email notifications in 2 clicks.

How to Choose the Right Provider?

Three key points. Where do your clients live? Only Russia → YooKassa; globally → Stripe. Do you need 54-FZ fiscalization? Yes → YooKassa; otherwise Stripe + cloud OFD. Do you plan subscriptions? Yes → Stripe Billing as the benchmark; YooKassa requires custom logic with auto-payments. Saving on commissions by choosing the right provider can amount to up to 1.5% of turnover. For a project with 2 million RUB per month, that's 360,000 RUB per year.

Where the Real Difficulties Lie

Setting up a test mode takes an hour. Properly handling all scenarios takes weeks.

Webhook reliability. A webhook may not arrive—server unavailable, timeout, network issues. The provider retries with exponential backoff (Stripe up to 3 days). The handler must be idempotent: if payment.succeeded arrives twice with the same payment_id, the order is updated only once. This is implemented by storing event IDs in Redis with a TTL.

3DS2 and redirect flow. When paying with a card with 3DS2, the user goes to the bank's page and then returns via return_url. During this time, the session may expire or the cart may be cleared. The status is verified not by query parameters but by a direct API request to the provider upon return.

Partial refunds and receipts. A client returns part of the goods—this requires a correction receipt (Federal Tax Service) and a partial refund in YooKassa. Stripe natively supports partial_refund. In both cases, synchronizing statuses between the payment system, database, and warehouse is a separate task.

Currency limitations. YooKassa only handles rubles. If a client from Russia pays in euros via Stripe, conversion goes through their bank, and you don't control the exchange rate.

Why Do Webhooks Require Idempotency?

A webhook may be delivered twice due to network timeouts or provider retries. Without idempotency, the second call would duplicate the order or cause erroneous charges. The solution is to store a unique event ID (e.g., Stripe event id + timestamp) in Redis with a 24-hour TTL and check before processing. If the ID already exists, return 200 without executing business logic. Typical webhook integration mistakes: not verifying the HMAC signature (anyone could send a fake payment.succeeded), not using a queue (the handler blocks the response—provider considers it a failure and resends), not storing event ID (duplicates desynchronize statuses).

How We Build the Integration

Architecture. We never store card data—only tokens from the provider. Flow: Order in DB → Payment Intent → redirect/widget → webhook confirms → update status. The source of truth is the status in the payment system.

For Laravel we use stripe/stripe-php or yookassa-sdk. Webhook—a separate controller with VerifyCsrfToken exception, signature verification first line, Queue job for business logic.

For Next.js/React—@stripe/stripe-js + @stripe/react-stripe-js. PaymentElement includes Apple/Google Pay automatically. Example:

const stripe = await stripePromise;
const { error } = await stripe.confirmPayment({
  elements,
  confirmParams: { return_url: 'https://example.com/order/thank-you' },
});

Testing. Stripe CLI: stripe listen --forward-to localhost:8000/webhook. Test cards for all scenarios (3DS, decline, insufficient funds). Cypress checkout flow test in CI—mandatory stability guarantee.

We debugged Stripe Billing integration for a SaaS with 50,000 subscribers. The issue was handling invoice.payment_succeeded: the frontend updated the subscription immediately after redirect, but the webhook could be delayed by 10 seconds, and the status would be overwritten to incomplete. Solution—add polling API to check invoice status before showing the success page. This reduced erroneous cancellations by 18%.

Process and Timeline

Audit → provider selection → backend → frontend → tests → deploy → monitoring.

Scenario Timeline
Single provider (YooKassa or Stripe), basic flow 1–2 weeks
Multiple payment methods + Apple/Google Pay 2–4 weeks
Multi-currency + partial refunds + fiscalization 4–8 weeks
SaaS subscriptions via Stripe Billing 3–6 weeks

Pricing is custom. Order integration and your checkout won't crash on the next update.

Links:

We guarantee: 7 years of experience, 50+ successful integrations. Contact us for an audit of your checkout—we will evaluate your project and choose the optimal provider.