Integrate Checks

To integrate your POS to be able to send Flyt check data as well as to be able to receive payments onto a check, you can integrate by implementing the following endpoints.

Send Check

Firstly you need to send Flyt a copy of every check that is happening on your POS in real time. This includes all table service checks as well as takeaway and delivery checks. If a check is updated at all whenever it is saved on the POS it should be sent to Flyt. This should be done as a background process and shouldn't lock up the POS interface.

// POST /v1/pos/push-pull/check

Note: This endpoint requires an authenticated accessToken.

{
	"tableNumber": 85,
	"checkNumber": 13322,
	"locationId": 18,
	"staffId": "ROBERTOB",
	"guests": 3,
	"status": "closed",
	"totalAmount": 108.16,
	"outstandingAmount": 81.12,
	"serviceChargeAmount": 6.13,
	"tipsPaid": 0,
	"discounts": [{
			"name": "before 5pm 20% off",
			"value": -21.63
		},
		{
			"name": "5% comp",
			"value": -5.41
		}
	],
	"menuItems": [{
			"id": 244,
			"name": "Beef burger",
			"quantity": 1,
			"price": 7.69,
			"priceSold": 8.08,
			"modifiers": [{
					"id": 123,
					"name": "extra cheese",
					"price": 0.39,
					"modifiers": null
				},
				{
					"id": 124,
					"name": "cook level",
					"price": 0,
					"modifiers": [{
						"id": 125,
						"name": "medium rare",
						"price": 0,
						"modifiers": null
					}]
				}
			],
			"discount": null,
			"category": {
				"name": "burgers",
				"category": {
					"name": "mains",
					"category": null
				}
			}
		},
		{
			"id": 12,
			"name": "Diet Coke",
			"quantity": 1,
			"price": 1.99,
			"priceSold": 0,
			"modifiers": null,
			"discount": {
				"name": "birthday drink!",
				"value": -1.99
			},
			"category": {
				"name": "soft drinks",
				"category": {
					"name": "beverages",
					"category": null
				}
			}
		},
		{
			"id": 12,
			"name": "Diet Coke",
			"quantity": 1,
			"price": 1.99,
			"priceSold": 1.99,
			"modifiers": null,
			"discount": null,
			"category": {
				"name": "soft drinks",
				"category": {
					"name": "beverages",
					"category": null
				}
			}
		},
		{
			"id": 788,
			"name": "Bodega Noemía Malbec 2011",
			"quantity": 1,
			"price": 95.99,
			"priceSold": 95.99,
			"modifiers": null,
			"discount": null,
			"category": {
				"name": "argentinian",
				"category": {
					"name": "wines",
					"category": {
						"name": "beverages",
						"category": null
					}
				}
			}
		}
	]
}

Response 200 OK

Get Payments

Every 30 seconds your system in the background should call Flyt to check for any new payments. This shouldn't block the UI.

// GET /v1/pos/push-pull/payments/{locationId}

Note: This endpoint requires an authenticated accessToken.

Response 200 OK

{
	"checks": {
		"13332": [{
				"paymentId": 288722,
				"paymentExTip": 8.99,
				"tip": 0.59
			},
			{
				"paymentId": 288745,
				"paymentExTip": 1.54,
				"tip": 0.00
			}
		],
		"13334": [{
			"paymentId": 288731,
			"paymentExTip": 76.99,
			"tip": 10.00
		}]
	}
}

Accept Payment

For each payment that the POS gets in the previous call, the POS should save this payment to the corresponding check and then call accept payment to say that the POS has accepted that payment.

// POST /v1/pos/push-pull/accept-payment

Note: This endpoint requires an authenticated accessToken.

{
    "paymentId": 12345
}


Response 200 OK

Heartbeat

Flyt requires the POS to tell Flyt every 5 minutes that the location is still available and online. To do this the POS should call Flyt every 5 minutes using the below endpoint.

// POST /v1/pos/push-pull/heartbeat/{locationId}

Note: This endpoint requires an authenticated accessToken.

Response 200 OK