← Integrate hub

PayShare · Mode 2

Template packs

Stack-specific patterns for create session, webhook receiver + HMAC, and calling record-payment after your PSP succeeds. PayShare never runs card capture; templates stay server-side only (NEXT_PUBLIC_* must never hold API keys or webhook secrets).

Before wiring templates, run scripts/mode2-self-test.sh against staging — shell exports are documented in docs/15-INTEGRATION-SELF-TEST.md (see environment reference and commented hints in .env.example).

Deploying to production (e.g. Vercel): configure PayShare's server env before traffic — Vercel / production checklist on the Integrate hub (dashboard cookies, cron, health). Keep API keys and webhook secrets server-side only.

Environment variables (illustrative)
VariableUse
PAYSHARE_API_BASEOrigin for all server calls
PAYSHARE_INTEGRATION_IDCreate-session body
PAYSHARE_API_KEYHeader X-PayShare-API-Key — never expose
PAYSHARE_WEBHOOK_SIGNING_SECRETVerify X-PayShare-Signature — never expose (legacy alias: PAYSHARE_WEBHOOK_SECRET)

Webhook HMAC uses sorted JSON keys like lib/webhook/canonical-json-sorted.ts / canonicalCompletionString — see Integrate hub for contract links and self-test. Live creates (?mode=live) need the Partner Settings live-session toggle on; optional env go-live gating is in docs/14.

Packs

Source of truth: Full snippets live in your repo clone as docs/16-TEMPLATE-PACKS.md. The zip downloads are a convenience starter — validate the contract against docs/14-INTEGRATION-CONTRACT.md.

Onboarding checklist · Integrate hub