Skip to content

REST API v2. Authenticate with a Bearer JWT in the Authorization header unless an endpoint is marked public.

Servers​

https://v2-staging.tscheckout.comCurrent host

Create a Square Mobile Authorization code​

POST
/api/v2/payment-processor/square/mobile-authorization-code

Creates a short-lived Square Mobile Authorization code for the given location. The mobile app uses the returned authorizationCode to initialize Square Reader SDK / mobile payments. Codes are single-use and expire after 60 minutes.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"location_id": "LXXXX1XXXXXX"
}

Responses​

The created mobile authorization code.

application/json
JSON
{
  
"data": {
  
  
"authorizationCode": "sq0cma-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  
}
}

Playground​

Authorization
Body

Samples​


Create a Square Terminal device pairing code​

POST
/api/v2/payment-processor/square/device-code

Creates a Square Terminal device pairing code. The operator enters the returned code on the physical Square Terminal to pair it; poll its status via GET /square/device-code/{id}.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"name": "string"
}

Responses​

The created device pairing code.

application/json
JSON
{
  
"count": 0,
  
"data": {
  
  
"id": "string",
  
  
"code": "string",
  
  
"status": "string",
  
  
"deviceId": "string"
  
}
}

Playground​

Authorization
Body

Samples​


Get the status of a Square Terminal device pairing code​

GET
/api/v2/payment-processor/square/device-code/{id}

Returns the pairing status of a Square Terminal device code. When status is PAIRED, deviceId is the terminal device used at checkout.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Device code id.

Type
string
Required

Responses​

The current pairing status.

application/json
JSON
{
  
"count": 0,
  
"data": {
  
  
"id": "string",
  
  
"status": "string",
  
  
"deviceId": "string"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


List paired Square Terminal devices​

GET
/api/v2/payment-processor/square/terminals

Lists the paired Square Terminal devices.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Responses​

The list of paired Square devices.

application/json
JSON
{
  
"count": 0,
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"label": "string",
  
  
  
"location": "string",
  
  
  
"serialNumber": "string",
  
  
  
"status": "string"
  
  
}
  
]
}

Playground​

Authorization

Samples​


Get Stripe publishable key​

GET
/api/v2/payment-processor/stripe/publishable-key

Returns the active site/venue Stripe publishable key (pk_live_… / pk_test_…) for initialising the client Stripe SDK.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Responses​

The Stripe publishable key.

application/json
JSON
{
  
"data": {
  
  
"publishableKey": "pk_test_51ExampleKey"
  
}
}

Playground​

Authorization

Samples​


Get a Stripe Terminal connection token​

GET
/api/v2/payment-processor/stripe/sdk

Returns a Stripe Terminal connection token used to initialise the frontend Terminal SDK.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Responses​

The connection token.

application/json
JSON
{
  
"count": 0,
  
"data": {
  
  
"token": "string"
  
}
}

Playground​

Authorization

Samples​


List Stripe Terminal readers​

GET
/api/v2/payment-processor/stripe/terminals

Lists the Stripe Terminal readers registered on the account.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Responses​

The list of registered Stripe readers.

application/json
JSON
{
  
"count": 0,
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"label": "string",
  
  
  
"location": "string",
  
  
  
"serialNumber": "string",
  
  
  
"status": "string"
  
  
}
  
]
}

Playground​

Authorization

Samples​


Register a Stripe Terminal reader​

POST
/api/v2/payment-processor/stripe/readers

Registers a physical Stripe Terminal reader against the configured terminal location using its pairing/registration code.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"registrationCode": "string",
  
"label": "string"
}

Responses​

The reader was registered.

application/json
JSON
{
  
"count": 0,
  
"data": {
  
  
"id": "string",
  
  
"label": "string",
  
  
"status": "string",
  
  
"location": "string",
  
  
"serialNumber": "string"
  
}
}

Playground​

Authorization
Body

Samples​


Remove a Stripe Terminal reader​

DELETE
/api/v2/payment-processor/stripe/readers/{id}

Deregisters a Stripe Terminal reader.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Stripe reader id.

Type
string
Required

Responses​

The reader was removed.

Playground​

Authorization
Variables
Key
Value

Samples​


Simulate a Stripe Terminal reader payment​

POST
/api/v2/payment-processor/stripe/readers/{id}/simulate

Sandbox-only: simulate a card tap on a simulated Stripe Terminal reader so an in-progress card_present PaymentIntent can complete without hardware.

Authorizations​

bearerAuth
Type
HTTP (bearer)

Parameters​

Path Parameters

id*

Simulated Stripe reader id.

Type
string
Required

Request Body​

application/json
JSON
{
  
"testCardNumber": "string"
}

Responses​

The simulated payment method was presented.

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Powered by VitePress OpenAPI