Create an account → get your keys instantly → create your first session in minutes. Live mode requires payout onboarding.

API Reference

Base URL: https://app.payshare.nz

Auth: All session-creation and merchant endpoints require header X-PayShare-API-Key: ps_... (server-to-server only; never call from the browser).

Create session (canonical)

POST /api/v1/payments/sessions

Headers: Content-Type: application/json, X-PayShare-API-Key: ps_...

Request body:

FieldTypeRequiredDescription
integrationIdstring (UUID)YesYour integration ID from Admin
amountnumberYesTotal amount to split (> 0)
currencystringNoDefault NZD
unconfiguredbooleanNoDefault true — host configures participants and split on first visit
successUrlstringNoRedirect when session completes (allowlisted)
cancelUrlstringNoRedirect when user cancels
metadataobjectNoCustom data (e.g. merchantOrderRef)
merchantOrderRefstringNoYour order/booking reference; echoed in webhook as orderReference

Success (200):

{
  "success": true,
  "sessionId": "uuid",
  "hostToken": "opaque-token",
  "participantIds": [],
  "mode": "live",
  "message": "Unconfigured session created - host must configure before inviting participants"
}

Redirect URL: Build the pay URL as: https://app.payshare.nz/pay/{sessionId}?host=1&hostToken={hostToken}. Redirect the host to this URL.

Use sessionId and hostToken only for server-side redirects; never log them or expose in client-side analytics.

Errors: See Error codes. Typical: INVALID_AMOUNT, MISSING_API_KEY, INVALID_API_KEY, INTEGRATION_DISABLED, RATE_LIMIT_EXCEEDED (429).

Legacy alias: POST /api/payments/sessions is supported; prefer /api/v1/... for new integrations.