Integration overview
Choose between Stripe automatic and API/SDK advanced, then connect referrals, payments and commissions through the appropriate path.
Updated August 3, 2026
AffiHQ supports two product integration modes. Choose the mode that owns the payment journey for that product; do not send the same product’s native and advanced payment facts as if they were separate sales.
Decision matrix
| Question | Stripe automatic | API/SDK advanced |
|---|---|---|
| Where does Checkout happen? | On one selected Stripe-hosted Payment Link | In your Checkout or billing system |
| What is the recommended use? | Stripe is the payment source and the Payment Link shape fits the product | Custom Checkout, non-Stripe billing, pre-Checkout attribution, custom discounts/trials/onboarding or non-financial events |
| What credentials are required? | A connected Stripe Standard account and a supported Payment Link; no AffiHQ API or SDK credentials | Product API key and fingerprint key, kept on your server |
| Who handles Stripe webhook delivery? | AffiHQ verifies and processes it automatically; your application does not forward Stripe webhooks | Your server verifies the original provider webhook before sending the billing fact to AffiHQ |
| What does the affiliate redirect do? | Records the click, then opens the selected Payment Link with an opaque client_reference_id=clk_* | Records or carries an opaque affihq_ref to your destination for server-side attribution |
Start with the Stripe automatic guide when Stripe is your payment source. Use API authentication and the Server SDK for the advanced path.
Stripe automatic end to end
- In Products, choose Stripe automatic and connect the Stripe Standard account that owns the Payment Link.
- Select one active
buy.stripe.comPayment Link with exactly one fixed-price line, quantity1, a positive amount, one currency and either one-time or subscription billing. Subscription links must be monthly or annual. - An affiliate’s
/r/link records the click, then opens that Payment Link with an opaqueclient_reference_id=clk_*. Existing URL parameters are kept and a previousclient_reference_idis replaced. - For one-time billing, a successful immediate Checkout or later asynchronous payment success creates the payment. An asynchronous failure creates no commission.
- For subscriptions, Checkout locks the attribution and each
invoice.paidcreates a recurring payment using the selected monthly or annual link. - AffiHQ applies the campaign’s commission and validation rules and handles Stripe signatures, account ownership, test/live mode, durable receipt, retries, idempotence and matching automatically.
- Successful refunds and dispute outcomes create the applicable cumulative correction. Ready commissions can then be included in a payout that you send separately.
If native state is invalid or unavailable, /r/ falls back to the historical destination with affihq_ref. That fallback requires the advanced server flow to complete attribution and payment reporting.
API/SDK advanced end to end
- Configure the product for API/SDK advanced and keep its API key and fingerprint key in your server secret store.
- Capture the opaque
affihq_refin the browser or accept a manual partner code according to your consent and storage rules. Never put a product secret in browser code. - When your application creates the customer or prospect, your server creates the attribution with a stable opaque customer ID and product-scoped fingerprint. The first qualified attribution remains authoritative.
- Your server completes its own signup or Checkout, verifies the original payment-provider webhook and sends the verified payment with a stable provider event identity.
- Send verified refunds and dispute outcomes with the original payment identity when the provider reports them.
- AffiHQ creates or corrects the matching commission. Retry temporary failures without changing the original event identity; review stable business rejections instead of changing financial data automatically.
The advanced path is appropriate when AffiHQ cannot receive the payment directly from the selected Stripe Payment Link or when your business event is not a Stripe payment. Continue with Browser referral capture, Server SDK, Billing events and Durable delivery.
Credentials, webhooks and responsibilities
Stripe automatic requires no AffiHQ product API key, fingerprint key or Stripe SDK. AffiHQ receives and verifies the connected account’s Stripe deliveries. You remain the merchant of record on your Stripe Standard account, and AffiHQ’s own subscription billing is separate. AffiHQ records affiliate payout obligations but does not transfer the funds through Stripe.
API/SDK advanced requires the product API and fingerprint keys on your server. Your server must verify the original provider webhook before sending a billing event, keep customer email out of AffiHQ payloads and use stable idempotency identities for retries. The browser should carry only the opaque referral reference.
For native errors and safe fallback behavior, see Stripe automatic troubleshooting. For access boundaries, see Workspace permissions.