Swipelux

Events and payloads

Learn about the events and payloads that are available for webhooks, including detailed examples and best practices.

Available Events

Webhooks provide real-time notifications about important events in your application. You can subscribe to these events to automate workflows, maintain data synchronization, or trigger custom business logic.

Event Structure

Each webhook event follows this structure:

{
  "id": "evt_123456789",
  "type": "event.type",
  "created": "2024-03-20T10:00:00Z",
  "data": {
    // Event-specific data
  }
}

Customer Events

  • customer.created - Triggered when a new customer is created. Use case: Initialize customer records in your system, send welcome emails, or trigger onboarding workflows.

  • customer.updated - Triggered when customer information is modified. Use case: Sync customer data changes, update user profiles, or log audit trails.

Transfer Events

  • transfer.created - Triggered when a new transfer is initiated. Use case: Show pending status to users, initialize transfer tracking, or trigger notifications.

  • transfer.updated - Triggered when transfer status changes. Use case: Update UI with latest status, log state transitions, or trigger retry logic for failed transfers.

  • transfer.completed - Triggered when transfer successfully completes. Use case: Update balances, send success notifications, trigger fulfillment workflows, or update accounting records.

  • transfer.failed - Triggered when transfer processing fails. Use case: Alert users, trigger retry mechanisms, log errors for debugging, or notify support teams.

Wallet Events

  • wallets.provision.requested - Triggered when wallet creation is requested for specific chains. Use case: Track wallet provisioning status, initialize wallet-related workflows, or log provisioning requests.
  • kyc_link.updated - Triggered whenever the state of a KYC Link changes. Use case: Track verification progress, update customer verification status, or trigger post-verification workflows.

Available data:

  • id: KYC Link identifier
  • email: Email associated with the link
  • type: "individual" or "business"
  • kycStatus: Current verification state
  • tosStatus: Terms of Service acceptance state
  • customerId: Linked customer identifier (if available)
  • updatedAt: Timestamp of the update

Example payload:

{
  "id": "kyc_ln_123",
  "kycStatus": "approved",
  "customerId": "cus_456"
}

On this page