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 flow | Required attribution value | Stripe field Afglo checks |
|---|---|---|
| Stripe Checkout Session | Afglo referral visit ID | client_reference_id or metadata.afglo_referral_id |
| Direct PaymentIntent | Afglo referral visit ID | metadata.afglo_referral_id or metadata.referral |
| Payment Link or Buy Button | Afglo referral visit ID | client_reference_id passed into the link URL |
| Custom checkout API | Afglo referral visit ID | Request 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
- Confirm the customer clicked an Afglo affiliate link and that the owner or affiliate activity log shows a recent referral visit.
- Confirm the checkout request passed the referral ID to Stripe before the customer paid.
- Confirm the Stripe webhook endpoint in the owner dashboard is installed for the right account and mode.
- Confirm Stripe delivered the relevant event:
checkout.session.completed,payment_intent.succeeded, orinvoice.paid. - 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.
- Checkout flow: search for the
- 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_idorreferral. - Checkout Session: if the payment came from Checkout, open the related
cs_...session and checkclient_reference_id. - Webhook delivery: confirm Stripe sent the event to Afglo and received a
2xxresponse.
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
| Symptom | Likely cause | Fix |
|---|---|---|
| Payment exists in Stripe, no Afglo conversion | Webhook missing, wrong mode, or wrong Stripe account | Reinstall the webhook from the owner Stripe settings |
pi_... is not found in Afglo | Checkout flow stored cs_..., or Stripe event did not reach Afglo | Check the related Checkout Session and webhook delivery |
| Referral visit exists but remains unconverted | Referral ID was not passed into Stripe or conversion API | Add client_reference_id or metadata.afglo_referral_id |
| Stripe key cannot retrieve the payment | Payment belongs to another account or mode | Use the account and environment that created the payment |
| Conversion exists but commission is missing | Campaign reached max commission rules or affiliate is inactive | Review campaign reward limits and affiliate state |
Prevention Checklist
Before launch, run a real test order:
- Open an affiliate link in a clean browser session.
- Confirm the referral visit appears in Afglo.
- Complete a small Stripe payment.
- Confirm the Stripe object contains the Afglo referral ID.
- Confirm the Afglo conversion uses the same Stripe object ID.
- 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.