Skip to main content

Tracking Sessions Across Webhooks

Overview

Every transaction webhook Paysight sends includes two session identifiers — paysightSession and partnerSession. These fields let you tie any billing event (charge, refund, chargeback) back to the original user visit or click on your side.

How the session fields work

1 — Card Submit API (direct integration)

When you call the Card Submit API, pass your own identifier in partnerSession:
{
  "partnerSession": "your-click-or-visit-id",
  "card": { ... },
  "email": "customer@example.com",
  "amount": 9.99
}
The response returns both identifiers:
{
  "partnerSession": "your-click-or-visit-id",
  "paysightSession": "202602231518583780223233",
  ...
}
FieldWho sets itWhen
partnerSessionYouPassed in the Card Submit request
paysightSessionPaysightGenerated automatically and returned in the response

2 — Widget SDK integration

If you integrate via the Widget SDK, supply your identifier as sessionId in the widget config:
createWidget({
  targetId: 'payment-widget',
  config: {
    productId: 1234,
    sessionId: 'your-click-or-visit-id', // forwarded to Card Submit as partnerSession
    amount: 9.99,
    environment: 'production'
  }
});
The Widget forwards sessionId to Card Submit as partnerSession automatically. No extra work required.

How they appear in transaction webhooks

Every New Transaction and Updated Transaction webhook payload contains both fields:
{
  "transactionId": "90a0bbed-752a-4445-8112-b44de14a865c",
  "orderId": 193777233,
  "paysightSession": "202602231518583780223233",
  "partnerSession": "your-click-or-visit-id",
  ...
}
Use partnerSession to look up the original visit in your own data. Use paysightSession when working with Paysight support.

End-to-end reference

Your site / CRM

  ├─ Widget config:  sessionId = "click_abc123"
  │        OR
  ├─ Card Submit:    partnerSession = "click_abc123"


Paysight Card Submit API

  ├─ Response:  partnerSession = "click_abc123"
  │             paysightSession = "202602231518583780223233"


Transaction Webhook (New / Updated)
  ├─ partnerSession = "click_abc123"       ← matches your internal record
  └─ paysightSession = "202602231518583780223233"

Tips

  • Unique per visit — generate a fresh partnerSession / sessionId for every new click or page visit. Reusing the same value across sessions will make reconciliation harder.
  • Store it early — persist partnerSession in your database before calling Card Submit so it is available when the webhook arrives later (e.g. for subscription rebills).
  • All transaction typespartnerSession and paysightSession are present on every transaction webhook type: initial charges, subscription rebills, refunds, chargebacks, and chargeback alerts.

Card Submit API

Full quickstart and request/response reference

Widget SDK

Embed the payment widget with a sessionId

Webhooks

Full transaction webhook payload reference