Webhooks

Webhooks notify your backend when payments, virtual-account credits, invoices, and subscription events change.

Use webhooks for real-time updates, but always design your integration so it can recover by calling the relevant verify or list endpoint.

Endpoint Requirements

Your webhook endpoint should:

  • Accept POST requests.
  • Accept Content-Type: application/json.
  • Respond with a 2xx status after successful processing.
  • Be reachable over HTTPS.
  • Process events idempotently.

Recommended Processing Flow

  1. Receive the webhook.
  2. Verify the signature if signature headers are enabled for your account.
  3. Store the event ID or transaction reference before processing.
  4. Ignore duplicates you have already processed.
  5. Verify the payment or transfer state from the API when the event affects value delivery.
  6. Update your internal order, wallet, invoice, or subscription state.

Events To Expect

Common event families include:

Event FamilyUse For
charge.*Transaction and virtual-account collection updates.
invoice.*Subscription invoice lifecycle and payment results.
subscription.*Subscription lifecycle changes such as active, past due, cancelled, or completed.

Reconciliation

Webhooks can arrive more than once or arrive before your customer returns to your site. Use Kyshi references and IDs as stable reconciliation keys.