Afglo Docs

Stripe Attribution Diagnostics

Diagnose paid Stripe orders that did not appear as referred conversions in Afglo.

Use this checklist when Stripe shows a successful payment but Afglo does not show a referred conversion or commission.

Afglo can record Stripe payments through Checkout Sessions, PaymentIntents, invoices, and direct conversion API calls. The safest integration passes the Afglo referral ID into Stripe at checkout and confirms the Stripe webhook can deliver the completed payment event.

What Should Be Present

Checkout flowRequired attribution valueStripe field Afglo checks
Stripe Checkout SessionAfglo referral visit IDclient_reference_id or metadata.afglo_referral_id
Direct PaymentIntentAfglo referral visit IDmetadata.afglo_referral_id or metadata.referral
Payment Link or Buy ButtonAfglo referral visit IDclient_reference_id passed into the link URL
Custom checkout APIAfglo referral visit IDRequest body passed to /api/tracking/convert

If the payment has no referral ID, Afglo can still use lead/email matching or last-touch attribution for the owner's active campaigns, but explicit Stripe metadata is easier to verify and less likely to miss.

Diagnostic Steps

  1. Confirm the customer clicked an Afglo affiliate link and that the owner or affiliate activity log shows a recent referral visit.
  2. Confirm the checkout request passed the referral ID to Stripe before the customer paid.
  3. Confirm the Stripe webhook endpoint in the owner dashboard is installed for the right account and mode.
  4. Confirm Stripe delivered the relevant event: checkout.session.completed, payment_intent.succeeded, or invoice.paid.
  5. Search Afglo conversions by the Stripe object ID:
    • Checkout flow: search for the cs_... Checkout Session ID.
    • Direct PaymentIntent flow: search for the pi_... PaymentIntent ID.
    • Invoice flow: search for the in_... Invoice ID.
  6. If the conversion is missing, compare the payment time against recent unconverted referral visits for the same campaign.

Stripe Dashboard Checks

Open the payment in Stripe and review:

  • Mode: live and test payments use different API keys and webhook endpoints.
  • Account: connected-account payments must send events to the webhook configured for that Stripe account.
  • Metadata: look for afglo_referral_id or referral.
  • Checkout Session: if the payment came from Checkout, open the related cs_... session and check client_reference_id.
  • Webhook delivery: confirm Stripe sent the event to Afglo and received a 2xx response.

Afglo Checks

In Afglo, verify:

  • The campaign is active.
  • The affiliate relationship is active.
  • The referral visit has not expired or been deactivated.
  • The payment was not already recorded under a different Stripe object ID.
  • The referral has not exceeded the campaign's commission period or maximum commission count.

Common Failure Patterns

SymptomLikely causeFix
Payment exists in Stripe, no Afglo conversionWebhook missing, wrong mode, or wrong Stripe accountReinstall the webhook from the owner Stripe settings
pi_... is not found in AfgloCheckout flow stored cs_..., or Stripe event did not reach AfgloCheck the related Checkout Session and webhook delivery
Referral visit exists but remains unconvertedReferral ID was not passed into Stripe or conversion APIAdd client_reference_id or metadata.afglo_referral_id
Stripe key cannot retrieve the paymentPayment belongs to another account or modeUse the account and environment that created the payment
Conversion exists but commission is missingCampaign reached max commission rules or affiliate is inactiveReview campaign reward limits and affiliate state

Prevention Checklist

Before launch, run a real test order:

  1. Open an affiliate link in a clean browser session.
  2. Confirm the referral visit appears in Afglo.
  3. Complete a small Stripe payment.
  4. Confirm the Stripe object contains the Afglo referral ID.
  5. Confirm the Afglo conversion uses the same Stripe object ID.
  6. Confirm the referral visit is marked converted and a commission is created when eligible.

Repeat this test any time the checkout implementation, Stripe account, webhook endpoint, or affiliate tracking script changes.

On this page