Cashline

Docs

Paystack visitor_id

Paystack is the native payment story. Put the first-party visitor ID on initialize metadata so a later charge can sit on the same person who saw the landing page.

What Cashline already does on its own checkout

Our pricing and /test forms call cashline('identity') and POST visitor_id, session_id, landing_page, and first_referrer to /api/paystack/initialize. That route adds them to Paystack metadata. Plans stay PLN_su9arwmqh854pjm (R149) and PLN_eizhuzd8dckw0pm (R299). The secret is only PAYSTACK_SECRET_KEY.

How your SaaS should do the same

In the browser, after the snippet has loaded:

const id = cashline('identity');
// id.visitor_id, id.session_id, id.landing_page, id.first_referrer

On your server, initialize Paystack with those fields inside metadata:

{
  "email": "founder@store.co.za",
  "amount": "29900",
  "currency": "ZAR",
  "plan": "PLN_eizhuzd8dckw0pm",
  "metadata": {
    "visitor_id": "…from cashline('identity')",
    "session_id": "…",
    "landing_page": "…",
    "first_referrer": "…"
  }
}

After Paystack redirects, verify the reference. Only then fire:

cashline('purchase', {
  amount: 299,
  currency: 'ZAR',
  reference: 'the Paystack reference'
});

Webhook charge.success is the other honest path. Do not send purchase from the button that opens checkout. Do not treat initialize as a sale.

What this is not

This is not a hidden Stripe connector. It is not a Peach or Yoco OAuth app. Those processors are documented as text so you can fire purchase from your own webhook.