Get a payment's journey
The paying person's visits up to the payment (the latest 50), with their pages and the credit models that credit each. Needs sessions:read too (403 otherwise); 404 for an unknown payment.
Requires revenue:read on the site (an API key, or a signed-in member's role). Share links: 401.
x-api-key<token>An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).
Scope: revenue:read
siteId*stringpaymentId*string1 <= length <= 255provider?stringThe payment's provider (provider of the payment row), for an id two providers both use
"stripe""dodo""polar""custom"model?stringWhich visit of the paying person a payment is credited to: last_non_direct, first_visit (both within the site's lookback window) or last_visit; default: the site's model
"last_non_direct""first_visit""last_visit"OK
application/json- response
data*meta*curl -X GET 'https://pilotfox.app/api/v1/sites/string/payments/string/journey'{ "data": { "payment": { "payment_id": "string", "provider": "stripe", "ts": "string", "amount": 0, "currency": "string", "refunded_amount": 0, "status": "paid", "customer_email": "string", "attribution": "checkout_ref", "session_id": "string", "visitor_id": "string", "user_id": "string", "credited_session_id": "string", "channel": "string", "referrer_domain": "string", "utm_source": "string", "utm_medium": "string", "utm_campaign": "string", "country": "string", "city": "string", "device_type": "string", "browser": "string", "os": "string", "entry_page": "string", "affiliate": "string", "time_to_convert": 0 }, "first_seen_at": "string", "time_to_convert": 0, "credit_model": "last_non_direct", "credit_window_days": 0, "sessions": [ { "session_id": "string", "credited_by": [ "last_non_direct" ], "started_at": "string", "ended_at": "string", "duration": 0, "entry_page": "string", "exit_page": "string", "referrer_domain": "string", "channel": "string", "utm_source": "string", "utm_campaign": "string", "country": "string", "city": "string", "device_type": "string", "browser": "string", "os": "string", "affiliate": "string", "pageviews": [ { "ts": "string", "pathname": "string", "page_title": "string" } ] } ] }, "meta": { "window": { "from": "string", "to": "string", "tz": "string", "bucket": "minute" }, "compare": { "from": "string", "to": "string" }, "totalCount": -9007199254740991, "nextCursor": "string", "truncated": true, "cache": "hit" }}