PartenApp Guide

App Guide

Running a program

Parten is an affiliate marketing platform. Connect the Stripe account that collected the sale, define the commission, and let invoice events record it.

Programs

A program is an affiliate, customer referral, or creator offer. The commission is a percent of the invoice net of tax, or a flat amount tied to that invoice. Duration is the first invoice, a number of months, or the life of the customer. Hold days keep the commission out of payouts until your refund window has passed. The minimum payout is the balance required before a transfer is created.

Customer referral programs can also record a reward percent for the buyer. That reward is a note on the program. The partner is still paid from the invoice.

Partners

Inviting a partner creates a code and the link https://www.parten.app/r/your-code. The link redirects to the program destination with parten_ref set, and counts a click. Disabled partners and inactive programs return 404.

If STRIPE_SECRET_KEY is set, Parten also creates a Stripe Express account and an onboarding link. Stripe collects identity and bank details. Partners do not need a Parten login. Copy the payout link from the partner row if you need to send it again.

Attribution

  1. 1

    Share the link

    Traffic through the partner link lands on your site with parten_ref.

  2. 2

    Pass it to Checkout

    Use client_reference_id or metadata.parten_ref.

  3. 3

    Store it on the customer

    checkout.session.completed writes parten_ref onto the Stripe customer.

  4. 4

    Create the commission

    invoice.paid reads that customer and records the commission from the invoice net of tax.

You can also attribute a customer with the API. Create an API key in Settings, then:

POST /api/v1/referrals
Authorization: Bearer <api key>

{
  "code": "mia4f2a",
  "email": "buyer@company.com",
  "stripeCustomerId": "cus_123"
}

The webhook endpoint is /api/stripe/webhook. Subscribe to invoice.paid, checkout.session.completed, charge.refunded, and account.updated on the connected account. Set STRIPE_WEBHOOK_SECRET. Connect OAuth needs STRIPE_CLIENT_ID and STRIPE_SECRET_KEY.

Payouts

A payout runs only when the partner has finished Express onboarding, the company Stripe account is connected, the hold has passed, and the balance is at least the program minimum. Parten first transfers the amount from your connected account to the Parten platform balance, then transfers that same amount to the partner. Both calls use idempotency keys. If the debit succeeds and the partner transfer fails, Pay retries only the second leg.

Stripe prices the transfer. Parten does not add a payout fee.

Refunds

charge.refunded finds the invoice through the payment intent. Parten reverses that share of the partner transfer and transfers the same amount back to your connected account. Unpaid commission is reduced, or marked reversed, and is left out of the next payout.