Skip to main content
POST
/
v1
/
terminal
/
commands
Create Terminal commands
curl --request POST \
  --url https://terminal-dev.xendit.co/v1/terminal/commands \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "terminal_id": "abcd-3254fsd-3242",
  "type": "PRINT_RECEIPT",
  "properties": {
    "order_id": "order-12345",
    "payment_method": "ID_INSERT_CARD"
  }
}
'
{
  "id": "abcd-3254fsd-3242",
  "status": "ACTIVE",
  "terminal_id": "abcd-3254fsd-3242",
  "business_id": "abcd-3254fsd-3242",
  "type": "PRINT_RECEIPT",
  "created": "2024-11-06T15:32:42Z",
  "updated": "2024-11-06T15:32:42Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
terminal_id
string
required
Example:

"abcd-3254fsd-3242"

type
enum<string>
required
Available options:
PRINT_RECEIPT,
SETTLE
properties
object

Response

Create command successfully

id
string
required
Example:

"abcd-3254fsd-3242"

status
enum<string>
required
Available options:
ACTIVE,
COMPLETED
Example:

"ACTIVE"

terminal_id
string
required
Example:

"abcd-3254fsd-3242"

business_id
string
required
Example:

"abcd-3254fsd-3242"

type
enum<string>
required
Available options:
PRINT_RECEIPT,
SETTLE
Example:

"PRINT_RECEIPT"

created
string<date-time>
Example:

"2024-11-06T15:32:42Z"

updated
string<date-time>
Example:

"2024-11-06T15:32:42Z"