v1

latestOpenAPI 3.1.02026-08-06911,228852.2 KB
PMS Integration

Transaction Details

What subscriber endpoint implementation will receive when a transaction is made. Subscriber path need to end with /charge. Subscriber implementation should follow the payload backward compatibility rules below:

  • What considered as backward compatible:
    • Addition of new fields, enums, headers, or parameters.
    • Transition from optional to required fields. Which means Lightspeed will consistently send the parameter/field from now on.
  • What considered as backward incompatible:
    • Alteration of schema structure, such as switching from a map to an array.
    • Removal of field/enum/header
    • Changes in data types, such as converting from string to integer.
    • Changes of property name
postWebhookpms-integration{subscriber-host}/charge

Headers

Acceptstring required

The expected response content type from subscriber. Only application/json is supported.

Example:application/json
X-Lightspeed-Idempotency-Keystring required

Subscribers should utilize the Idempotency Key to ensure duplicates are handled appropriately on their end.

Example:LS1_123e4567-e89b-12d3-a456-426614174000

Payload

namestring

Name of the transaction

openDatestring date-time

The date and time when the transaction was opened in UTC

closeDatestring date-time

The date and time when the transaction was closed in UTC

coversnumber

The number of covers (guests) in this transaction.

ownerIdinteger

The ID of the POS user (staff) who owns this transaction

ownerNamestring

The name of the POS user (staff) who owns this transaction

deviceIdinteger

The ID of the device on which the transaction was started

businessExternalReferencestring

Client name

apiKeystring

API Key.

receiptIdstring

Receipt ID

fiscIdstring

Unique identifier for the transaction, can be used this for any identification purposes.

uuidstring

A b64 encoded uuid which also act as unique identifier for the transaction, also can be used for any identification purposes.

initialAccountIdstring

Initial Account ID, if any. This is used to correlate the transaction with the initial account, such on REFUND or VOID.

identifierstring

Refer to the non null value of either the fiscId or uuid as fallback.

revenueCenterIdinteger

Revenue Center (POS Configuration) ID

revenueCenterNamestring

Revenue Center (POS Configuration) Name

Example payload

{
  "openDate": "2021-01-01T00:00:00Z",
  "closeDate": "2021-01-01T00:00:00Z",
  "covers": 2,
  "ownerId": 12345,
  "ownerName": "John Doe",
  "deviceId": 12345,
  "businessExternalReference": "quickbooks-123",
  "apiKey": "quickbooks-key-345",
  "receiptId": "R51.3",
  "fiscId": "A1234.5",
  "uuid": "xfe9ldKWSfW8VrAYUcnvGA==",
  "initialAccountId": "A1234.1",
  "identifier": "A1234.5",
  "revenueCenterId": 94489280528,
  "revenueCenterName": "Fixed POS",
  "transactions": [
    {
      "unitAmount": 10,
      "quantity": 2,
      "amount": 20,
      "description": "French Fries",
      "staffId": 6,
      "staffName": "John Doe",
      "groupId": 25769803810,
      "groupName": "Food",
      "taxId": 12345,
      "taxName": "VAT 10%",
      "taxRate": 1.1,
      "taxIncluded": true,
      "sku": "F07",
      "serviceChargeContribution": 4.5,
      "taxLines": [
        {
          "taxId": "12345",
          "taxName": "VAT 10%",
          "taxAmount": 1,
          "taxRate": 1.1,
          "taxIncluded": true
        }
      ]
    }
  ],
  "payments": [
    {
      "paymentDate": "2021-01-01T00:00:00Z",
      "staffId": 6,
      "staffName": "John Doe",
      "gratuity": 1,
      "amount": 66,
      "methodName": "MEWS",
      "methodCode": "IKPMS",
      "reservationId": "001"
    }
  ],
  "serviceCharge": {
    "amount": 1,
    "type": "UNTAXED"
  }
}

Response

Subscriber should return this code if it successfully processed the charge request at PMS. Following that, Lightspeed will mark the PMS charge transaction as SUCCESS as well.