Skip to content

docs: payments are trackEvent with payment fields in eventData, capturePayment deprecated - #265

Open
ChetanBhosale wants to merge 16 commits into
mainfrom
chetan/lin-3231-trackevent-payments-docs
Open

ChetanBhosale wants to merge 16 commits into
mainfrom
chetan/lin-3231-trackevent-payments-docs

Conversation

@ChetanBhosale

@ChetanBhosale ChetanBhosale commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Payments are now documented as in-app events sent with trackEvent: put amount, paymentId and currency (plus userId and optional status) in eventData. trackPayment and the payment object are gone from every example; capturePayment and removePayment are marked deprecated for the old SDK versions.

Pages

  • sdk/migrate-to-track-event (rewritten, "Migrate payments to in-app events"): before/after per SDK at the top with product details, the same-spelling warning (FIRST_PAYMENT must stay uppercase or Meta/Google mappings won't match), 3-step migration, field table, old types list, versions, refunds via PAYMENT_CANCELLED, new names need a mapping, server API.
  • sdk/track-payments ("Track payments with trackEvent"): every tab converted, payment keys table, statuses, per-platform behaviour on an invalid payment (Android rejects/throws, iOS drops and logs).
  • Tracking Payments section on every SDK page (Android, iOS, React Native, Flutter, Expo, Capacitor, Cordova, Unity).
  • Smaller fixes: api-reference/event-capture, api-reference/revenue-tracking (website payments stay on /capture-payment with source: web), testing, events tab, Google commerce manager, SDK-less minimal guides.
  • Old type names in examples use uppercase (SUBSCRIPTION_RENEWED, WALLET_TOPUP).

Checks

  • npm run check:agents and npm run check:routes -- origin/main pass (135 pages, no unredirected removals).
  • Changed pages render on a local Mintlify preview (200).
  • Examples checked against the SDK branches: Capacitor trackEvent(eventName, eventData, eventId), Flutter PlatformException(TRACK_EVENT_FAILED) on Android.

SDK PRs: linkrunner-labs/linkrunner-android#41, linkrunner-labs/linkrunner-ios#33, RathodDarshil/linkrunner#45, RathodDarshil/rn-linkrunner#47, linkrunner-labs/expo-linkrunner#22, linkrunner-labs/capacitor-linkrunner#13, linkrunner-labs/cordova-linkrunner-sdk#8, linkrunner-labs/linkrunner-unity-sdk#4. Backend: linkrunner-labs/hazelnut#884.

Linear: https://linear.app/linkrunner/issue/LIN-3231/in-app-events-trackevent-with-amount-becomes-the-payment-api

🤖 Generated with Claude Code

ChetanBhosale and others added 6 commits October 12, 2026 00:31
…ePayment

The SDK guides, API reference, SDK-less guides, feature pages and testing
guide now send payments through trackEvent / capture-event with amount,
payment_id and currency. The event name becomes the payment type.
removePayment and remove-captured-payment are no longer documented, and
there is no replacement. The Appbrew page is unchanged because its tracker
still calls capturePayment and removePayment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
New page sdk/migrate-to-track-event covers the deprecation, the event
naming rule (old payment types keep their mappings, new names need one),
before/after code per platform, field mapping and the server API. SDK
guides and the API reference link to it and state the naming rule. The
revenue sharing sections now send revenue as the payment amount instead
of an amount inside eventData.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each SDK guide now leads Tracking Payments with trackPayment (type renamed
to eventName, currency required, userId still required, status defaults to
PAYMENT_COMPLETED), with trackEvent plus a payment as a short alternative.
Every payment example carries userId. The migration guide maps
capturePayment to trackPayment field by field. The Unity bridges pass
userId to the 5.0.0 EventPayment and the wrapper gains TrackPayment. API
pages explain that user_id links a payment to your user.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add sdk/track-payments with how a payment flows from trackPayment to
reports, ad networks and analytics, a fields table with why each field
is required, a payment status section with a lifecycle walk-through,
and examples for every SDK (one-step purchase with products, status
lifecycle, subscription renewal with an old type name) plus how each
SDK reports an invalid payment, ad network revenue rules,
deduplication, verification steps and an FAQ.

Migrate page: inline field comments, eventData product details and a
with-status example in every platform tab, PaymentStatus constants for
JS SDKs, and payment rules that say why each field is required.

Link the guide from each SDK's Tracking Payments section, the revenue
tracking API page and the events and payments testing page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ch SDK guide

The Tracking Payments example in each SDK guide now sets every parameter
the SDK accepts, with a one-line comment for each: whether it is required,
what it is for, and its default. eventId appears only where trackPayment
takes it (Android Kotlin, iOS, Capacitor).

Each guide also gets a PaymentStatus subsection that shows the enum as that
SDK defines it, plus a table of when to use each status and what it does.
The parameter table now has a Default column. Expo gets a compact full
example that uses the rn-linkrunner API.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ChetanBhosale and others added 10 commits October 23, 2026 14:09
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant