@payshare/platform-sdk
v1.1.0
Published
PayShare Platform SDK — server-side client, hook verification, and integration harness for Mode 2 split-pay.
Downloads
75
Readme
@payshare/platform-sdk
Server-side PayShare Platform SDK for Mode 2 split-pay integrations.
Install
npm install @payshare/platform-sdkEnvironment
| Variable | Purpose |
|----------|---------|
| PAYSHARE_API_BASE | PayShare app origin (e.g. https://app.payshare.nz) |
| PAYSHARE_INTEGRATION_ID | Integration UUID |
| PAYSHARE_API_KEY | API key for /api/v1 |
| PAYSHARE_PARTNER_CREATE_PAYMENT_SIGNING_SECRET | Verify inbound create-payment hook |
| PAYSHARE_WEBHOOK_SIGNING_SECRET | Verify inbound completion webhook |
Never send PSP secrets (Stripe keys) to PayShare.
Three calls
createSession— start a split session from your platform- Implement create-payment hook — verify signature, return PSP
redirectUrl recordPayment+ completion webhook handler
Harness
npx @payshare/platform-sdk testDocs
See PayShare repo docs/PLATFORM-SDK.md and docs/HOOK-CONTRACT-V1.md.
