Platform SDK
@payshare/platform-sdk — client, HMAC hooks, and payment method policy.
npm install @payshare/platform-sdk — server-side helpers for createSession, verify create-payment, recordPayment, and completion webhooks.
Environment
- PAYSHARE_API_BASE=https://app.payshare.nz
- PAYSHARE_INTEGRATION_ID, PAYSHARE_API_KEY
- PAYSHARE_PARTNER_CREATE_PAYMENT_SIGNING_SECRET
- PAYSHARE_WEBHOOK_SIGNING_SECRET
- Never send PSP secrets to PayShare.
Stripe Checkout payment methods
import {
resolvePaymentMethodPolicy,
stripeCheckoutSessionPaymentOptions,
} from "@payshare/platform-sdk";
const policy = resolvePaymentMethodPolicy({ allowMethods: ["card"] });
const paymentOptions = stripeCheckoutSessionPaymentOptions(policy);If Stripe rejects automatic_payment_methods, use allowMethods: ["card"] so the SDK emits payment_method_types instead.
Harness
npx @payshare/platform-sdk testAlso run Integration Wizard self-test in the Partner dashboard (Test & go live).