Delivery format
Events arrive as a JSONPOST to your webhook URL:
token is an HS256-signed JWT whose payload is { event, data, iat, exp }, signed with your organization’s webhook secret. The outer event and data fields are unauthenticated convenience copies — always verify the token before trusting anything.
Verifying deliveries
Every SDK ships the same two helpers:resolvePviumWebhookPayload (recommended — verifies the token and returns the unwrapped event and data) and verifyPviumWebhookToken (low-level, when you already hold the raw token).
Events
All payloads carryappId — your organization’s ID.
Payloads
batch.payee.added
batch.payee.added
Emitted in two flows — invite acceptance and direct add — so the field set varies slightly between them; code against the union.
batch.funded
batch.funded
Instant batches fire once, on the single payment transaction. Scheduled and pool batches fire on every funding transaction — watch
batch.fullyFunded for the transition into fully funded.batch.payee.claimed
batch.payee.claimed
Fires the first time a payment transitions from unclaimed to claimed — duplicate claim events are debounced.
oauth.invite.accepted
oauth.invite.accepted
Delivers the payee’s resolved identity plus the authorization your organization was granted, including access and refresh tokens.
contract.created
contract.created
payment.attached
payment.attached
Retries and idempotency
Pvium retries failed deliveries with exponential backoff, so treat your handler as idempotent. Dedup on the stable key each event carries:batch.fundedandbatch.payee.claimed— thetransactionHashpayment.attached—paymentData.idoauth.invite.acceptedandbatch.payee.added—invite.idorauthorization.id
2xx and process asynchronously, and reconcile against payout records rather than relying on webhooks alone — records are the source of truth for settled payments.
