Revenue Payment API Reference

By AttribIQUpdated Intermediate

Send custom purchases, renewals, refunds, and subscription events with idempotency and optional journey identifiers.

Quick answer

The Payment API accepts normalized revenue events from custom billing systems and unsupported providers. Send stable transaction IDs, event type, amount, currency, timestamp, and AttribIQ visitor or session identifiers.

On this page
What you’ll learn
  • Send a revenue event to /v1/revenue
  • Use idempotency keys safely
  • Choose supported event types
  • Connect custom payments to attribution identifiers

The Payment API is for sending revenue events from custom billing systems and payment providers that are not connected natively yet.

Stripe users should usually prefer the Stripe webhook integration. Use this API when you already have normalized payment events in your own backend.

Endpoint

http
POST /v1/revenue
Authorization: Bearer sk_project_...
Idempotency-Key: txn_123
Content-Type: application/json

Request body

json
{
  "provider": "custom",
  "transaction_id": "txn_123",
  "event_type": "purchase",
  "amount": 2900,
  "currency": "EUR",
  "occurred_at": "2026-05-20T10:30:00Z",
  "visitor_id": "v_abc",
  "session_id": "s_def",
  "customer_id_hash": "hash_123",
  "metadata": {
    "plan": "builder",
    "product": "monthly_subscription"
  }
}

Fields

FieldRequiredNotes
providerYesUse custom or your provider key.
transaction_idYesStable provider or billing event ID.
event_typeYesOne of the supported normalized event types.
amountYesInteger in minor currency units.
currencyYesISO currency code such as EUR or USD.
occurred_atRecommendedISO timestamp. Defaults to receive time if omitted.
visitor_idOptionalAttribIQ visitor ID from the browser attribution object.
session_idOptionalAttribIQ session ID from the browser attribution object.
customer_id_hashOptionalStable one-way customer identifier.
metadataOptionalSmall debugging context such as plan or product.

Event types

Supported event types:

  • purchase
  • subscription_started
  • renewal
  • upgrade
  • downgrade
  • refund
  • cancellation
  • churn

Use stable event names. Reporting becomes harder when integrations invent provider-specific names for the same business event.

Idempotency

Retries are normal. Send the same Idempotency-Key for the same logical payment event and keep provider + transaction_id stable.

Do not generate a fresh random transaction ID on each retry. That creates duplicate revenue.

Next steps

Read generic Payment API revenue tracking for implementation guidance, or browser attribution API to pass visitor context into custom checkout.

Frequently asked questions

Should amount be in cents?
Send amount in minor currency units. For EUR and USD, 2900 means 29.00.
What should the idempotency key be?
Use the same stable transaction, invoice, or billing event ID every time you retry the same event.
Can I send events without visitor_id?
Yes. They will be recorded as unattributed revenue if no attribution identifiers are present.
What content type should I use?
Use application/json with a project API key in the Authorization header.

Continue learning

Put it into practice

See traffic and revenue in the same dashboard

Explore traffic sources, campaigns, goals and matched payments in the demo, then connect your own site.