Payment terminals

Payment terminals webhooks

This page documents webhook events related to payment terminals from the Inventory API (payment-terminals resource).


Inventory API – payment-terminals resource

Emitted when a payment terminal is created (POST /payment-terminals), updated (PUT /payment-terminals/:paymentTerminalId), or deleted (DELETE /payment-terminals/:paymentTerminalId).

Events (Inventory API)

Action Event name Endpoint
Create a payment terminal paymentTerminals.created POST /payment-terminals
Update a payment terminal paymentTerminals.updated PUT /payment-terminals/:paymentTerminalId
Delete a payment terminal paymentTerminals.deleted DELETE /payment-terminals/:paymentTerminalId

Payload example – created (Inventory API)

The data object for paymentTerminals.created is the full created payment terminal (same shape as the API response paymentTerminal).

{
  "id": "string",
  "attemptId": "string",
  "livemode": true,
  "created": 1605014530,
  "event": "paymentTerminals.created",
  "data": {
    "_id": "5f243d100617680712e78dd5",
    "accountId": "5f243d100617680712e78dd6",
    "name": "Terminal 1",
    "protocol": "ws",
    "ip": "192.168.10.10",
    "locationId": "5f243d100617680712e78dd7",
    "partNumber": "TRD30110877A",
    "serialNumber": "SN12345",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    },
    "updatedAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    }
  }
}

Payload example – updated (Inventory API)

The data object for paymentTerminals.updated is the full updated payment terminal (same shape as the API response paymentTerminal).

{
  "id": "string",
  "attemptId": "string",
  "livemode": true,
  "created": 1605014530,
  "event": "paymentTerminals.updated",
  "data": {
    "_id": "5f243d100617680712e78dd5",
    "accountId": "5f243d100617680712e78dd6",
    "name": "Terminal 1",
    "protocol": "ws",
    "ip": "192.168.10.10",
    "locationId": "5f243d100617680712e78dd7",
    "partNumber": "TRD30110877A",
    "serialNumber": "SN12345",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    },
    "updatedAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    }
  }
}

Payload example – deleted (Inventory API)

The data object for paymentTerminals.deleted contains only the id of the deleted payment terminal.

{
  "id": "string",
  "attemptId": "string",
  "livemode": true,
  "created": 1605014530,
  "event": "paymentTerminals.deleted",
  "data": {
    "paymentTerminalId": "5f243d100617680712e78dd5"
  }
}

Field descriptions – data (created / updated)

data matches the Inventory API PaymentTerminal schema. Main fields:

Field Type Description
_id string The payment terminal id (24 hex characters).
accountId string The account id this resource belongs to.
name string A unique name to identify the terminal.
protocol string The protocol to communicate: ws or wss.
ip string The IP address of the terminal.
locationId string The location id where the terminal is located (24 hex characters).
partNumber string The part number of the terminal (e.g. starts with TRD).
serialNumber string The serial number of the terminal.
createdBy string The user that created this resource.
updatedBy string The last user that updated this resource.
createdAt object The date the object was created (BzDate: value, offset).
updatedAt object The date the object was last updated (BzDate: value, offset).

Field descriptions – data (deleted)

Field Type Description
paymentTerminalId string Id of the deleted payment terminal (24 hex characters).