webhook-event
user

User state change

Triggered every time a user's state is updated. See the Webhooks guide for setup instructions, signature verification, and best practices.

Events may not be delivered in the order they occurred. Use data.occurred_at to reconcile the order. See the Event Ordering guide for details.

  • Event type: users#state-change
  • Profile level subscriptions: Not Supported
  • Application level subscriptions: Supported

User state change transitions

The possible previous_state and current_state values are:

  • ACTIVE - The user's account is active.
  • WITHDRAW_ONLY - The user has 90 calendar days to remove their money from their balance before we fully close their account. This can be done through sending from their balance to themselves and others or spending with their card. The user will still be able to order new cards, convert between balances, open and close balances, and download balance statements. After 90 calendar days, the account will move into a DEACTIVATED state.
  • DEACTIVATED - The user's account is deactivated and they will not be able to perform any actions on their account. The end-user tokens will be revoked and you will receive a 401 Unauthorized response for API calls.

{% img src="/images/diagrams/user-deactivation-flow.png" alt="User state change flow diagram" /%}

postWebhookusers#state-change

Headers

X-Signature-SHA256string

RSA-SHA256 signature of the request body, Base64 encoded. Verify this against the Wise public key to ensure the request is authentic and has not been tampered with.

X-Delivery-Idstring uuid

Unique identifier for this webhook delivery attempt.

X-Test-Notificationboolean

Present with the value true if this is a test notification sent to verify your callback URL during subscription setup.

Payload

OR

Example payload

{
  "schema_version": "4.0.0",
  "subscription_id": "f5b51f77-e14a-433b-9f7c-fc2834ffcff5",
  "event_type": "users#state-change",
  "sent_at": "2020-01-01T12:34:56.123Z",
  "data": {
    "resource": {
      "id": 1234,
      "type": "user"
    },
    "previous_state": "ACTIVE",
    "current_state": "WITHDRAW_ONLY",
    "deactivation_type": "ACCOUNT_SUSPENSION",
    "deactivation_reason": "REQUESTED_BY_CUSTOMER_CS",
    "occurred_at": "2020-01-01T12:34:56.789Z"
  }
}

Response

Return any 2xx status to acknowledge receipt of the event.

statusstring

Example response

{
  "status": "ok"
}

Changes