External wallets

These events are emitted by the Inventory API (btrz-api-inventory) when SaldoMax external wallets are created or updated.

Events

Action Event name Endpoint
Create an external wallet external-wallets.created POST /external-wallets/saldo-max
Update an external wallet external-wallets.updated PUT /external-wallets/saldo-max/:walletId

Note: Adding a movement via PUT /external-wallets/saldo-max/:walletId/movements does not emit a webhook.

Payload example created

{
  "attemptId": "9287826c-04d1-46ab-acc8-4f49e73d160d",
  "created": 1623794394,
  "data": {
    "_id": "5ff377bbd383cf7df687fedc",
    "accountId": "52a377ec430c7d4e220001fc",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "tel": "+123456789",
    "dob": "1990-01-01",
    "nip": 6789,
    "status": "active",
    "blocked": false,
    "createdBy": "55fc2f318791db6e1a0000b6",
    "updatedBy": "55fc2f318791db6e1a0000b6",
    "createdAt": { "offset": 0, "value": "2021-01-04T20:16:59.548Z" },
    "updatedAt": { "offset": 0, "value": "2021-01-04T20:16:59.548Z" }
  },
  "event": "external-wallets.created",
  "id": "f7cf105e-e83d-4986-8171-70ba5c6c57cd",
  "livemode": true
}

Field descriptions — data (external-wallets.created / external-wallets.updated)

Field Type Description
_id string External wallet id (24 hex characters).
accountId string Account (provider) id.
firstName string First name of the user.
lastName string Last name of the user.
email string Email of the user.
tel string Telephone number of the user.
dob string Date of birth of the user (YYYY-MM-DD).
nip number Personal identification number of the user.
status string Status of the external wallet (e.g. active).
blocked boolean Whether the external wallet is blocked.
createdBy string User id that created this resource (24 hex).
updatedBy string User id that last updated this resource (24 hex).
createdAt object BzDate: date the object was created.
updatedAt object BzDate: date the object was last updated.

Payload example updated

{
  "attemptId": "43489008-c98f-4711-beb8-362b4026f0fa",
  "created": 1628024836,
  "data": {
    "_id": "5ff377bbd383cf7df687fedc",
    "accountId": "52a377ec430c7d4e220001fc",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "tel": "+123456789",
    "dob": "1990-01-01",
    "nip": 6789,
    "status": "active",
    "blocked": false,
    "createdBy": "55fc2f318791db6e1a0000b6",
    "updatedBy": "55fc2f318791db6e1a0000b6",
    "createdAt": { "offset": 0, "value": "2021-01-04T20:16:59.548Z" },
    "updatedAt": { "offset": 0, "value": "2021-08-03T21:06:32.034Z" }
  },
  "event": "external-wallets.updated",
  "id": "24b4fd63-c0ba-4732-9aef-d379cfc81d4f",
  "livemode": true
}

(Field descriptions for data are the same as for external-wallets.created above.)