API Reference
Terminal
Accept in-person, card-present payments with Stripe Terminal readers. Create a connection token for the Terminal SDK, and manage the merchant’s locations and readers.
Create a connection token
/v1/terminal/connection-token Returns a short-lived secret used to initialize the Stripe Terminal SDK, scoped to the merchant’s connected account.
X-Api-Key Returns
secret string optional Connection token for the Terminal SDK.
curl -X POST https://payments.leffelconsulting.com/v1/terminal/connection-token \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" { "secret": "pst_test_..." } Create a location
/v1/terminal/locations Registers a physical location for Terminal readers.
X-Api-Key Request body
displayName string required Human-readable location name.
line1 string required Street address line 1.
line2 string optional Street address line 2.
city string required City.
state string required State / province.
postalCode string required Postal code.
country string optional Two-letter country code. Defaults to "US".
Returns
id string optional Location id (tml_…).
displayName string optional The location name.
curl https://payments.leffelconsulting.com/v1/terminal/locations \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{ "displayName": "Main Counter", "line1": "123 Main St", "city": "Austin", "state": "TX", "postalCode": "78701" }' { "id": "tml_1Nxyz...", "displayName": "Main Counter" } List locations
/v1/terminal/locations Lists the merchant’s Terminal locations.
X-Api-Key [
{ "id": "tml_1Nxyz...", "displayName": "Main Counter" }
] Register a reader
/v1/terminal/readers Registers a physical card reader to a location using the code shown on the device.
X-Api-Key Request body
registrationCode string required Registration code displayed on the reader.
locationId string required Location id (tml_…) to attach the reader to.
label string optional Optional friendly label.
Returns
id string optional Reader id.
label string optional Reader label.
deviceType string optional Reader hardware type.
status string optional Reader status (online/offline).
locationId string optional Attached location id.
curl https://payments.leffelconsulting.com/v1/terminal/readers \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{ "registrationCode": "simulated-wpe", "locationId": "tml_1Nxyz...", "label": "Front register" }' {
"id": "tmr_1Nabc...",
"label": "Front register",
"deviceType": "bbpos_wisepos_e",
"status": "online",
"locationId": "tml_1Nxyz..."
} List readers
/v1/terminal/readers Lists the merchant’s registered card readers.
X-Api-Key [
{ "id": "tmr_1Nabc...", "label": "Front register", "deviceType": "bbpos_wisepos_e", "status": "online", "locationId": "tml_1Nxyz..." }
]