Integration preview · provisional
Backend-first affiliate tracking
Examples below are provisional until the public interface is stable. The merchant backend owns verified payment events. Browser pages never receive a financial write credential.
Core calls
- Capture an eligible referral on the merchant website.
- Identify a customer from the trusted backend with referral evidence.
- Report a successful payment with stable customer and payment references.
- Report refunds with a unique refund reference.
- Read event processing status and commission records.
Supported reference stack
TypeScript/Hono on Workers with a local SQLite outbox and a Stripe test-mode recipe. Any backend can call the REST interface. The browser helper is framework-independent.
await affiliateKit.payments.record({
eventId: "event_123",
paymentId: "payment_456",
customerId: "customer_789",
occurredAt: "2026-09-21T10:00:00Z",
currency: "EUR",
commissionableAmountMinor: 4900,
});