How to connect your terminal
View as MarkdownChoose a supported GoDaddy terminal, get it ready, and find the deviceId that payment requests target.
Overview
This page covers the GoDaddy terminals that take payment requests, how to get one ready, and how to find its deviceId with Commerce API v1.
A store represents one physical location, and a terminal belongs to exactly one store. A payment request names the store in its path and the terminal in deviceId. deviceId is optional on the create schema, but send it on every payment request so GoDaddy routes it to the terminal you chose. Go to About Payment Requests for how the request flows from your server to the terminal.
Note
If you don't include deviceId, the payment request is sent to all Smart Terminals in the store.
The following diagram shows how an account's stores and terminals relate:
Prerequisites
The following prerequisites are required before you can connect your terminal:
- the GoDaddy Payments account and environment variables from How to get set up to accept payments
- your
storeIdinSTORE_ID, from About the Commerce API - a Personal Access Token (PAT) with the
commerce.store:readscope - the serial number printed on your terminal, in
SERIAL_NUMBER - jq for the curl tab
Supported terminals
Payment requests run on the GoDaddy Smart Terminal Duo, Flex, and Pro. Buy the terminal for the account that owns the store.
Buy a terminal
Go to GoDaddy Payments point of sale to compare models and buy a terminal.
Get a terminal ready
GoDaddy configures each terminal for a store before shipping it, so you don't activate or set it up yourself. The store's storeDevices lists a configured terminal with the status ACTIVATED and a deviceId.
The following procedure gets a terminal ready:
- Power on the terminal and connect it to the internet.
- Confirm in person that the terminal is online before you send a payment request.
Stuck in QUEUED
A payment stuck in QUEUED almost always means the terminal is offline or the deviceId is wrong. Confirm the terminal is online, and that deviceId names a terminal in the store in the path. A request can stay QUEUED for days, and you can clear it only on the terminal.
Find your device ID
GET /v1/commerce/stores/{storeId}?includeField=storeDevice returns the store and every terminal registered to it. The call needs the commerce.store:read scope.
Each entry in storeDevices has a status. Match the serial number printed on the terminal, and use that terminal only when its status is ACTIVATED. A terminal that isn't ACTIVATED might omit deviceId and serialNumber. When the terminal you expect is missing or isn't ACTIVATED, contact GoDaddy support.
deviceId is urn:tid: followed by a UUID. Pass it unchanged, because the list filter matches deviceId exactly as you sent it on create. The API also accepts the bare UUID.
externalTerminalId isn't the deviceId, so don't send it on a payment request. MID and TID, the merchant and terminal identifiers the acquirer assigns, aren't the deviceId either.
The following procedure lists the ACTIVATED terminals for a store and matches one by the serial number printed on the terminal.
-
List the
ACTIVATEDterminals and match one byserialNumber:if response=$( curl -sS -f "https://api.godaddy.com/v1/commerce/stores/$STORE_ID?includeField=storeDevice" \ -H "Authorization: Bearer $GODADDY_PAT" ); then jq --arg sn "$SERIAL_NUMBER" ' (.storeDevices // []) | map(select(.status == "ACTIVATED")) | (.[] | {deviceId, serialNumber}), (map(select(.serialNumber == $sn)) | .[0].deviceId // "no match") ' <<< "$response" else echo "request failed" >&2 fi
Example response
The following response shows an ACTIVATED terminal and a CREATED terminal. Only the ACTIVATED terminal has a deviceId, and the store identifier is id:
{
"id": "$STORE_ID",
"storeDevices": [
{
"deviceId": "$DEVICE_ID",
"externalTerminalId": "$EXTERNAL_TERMINAL_ID",
"serialNumber": "$SERIAL_NUMBER",
"status": "ACTIVATED",
"type": "TERMINAL"
},
{
"status": "CREATED",
"type": "TERMINAL"
}
]
}Common errors
The following table lists common situations when you connect your terminal and what to do:
| Situation | Most likely cause | What to do |
|---|---|---|
The lookup prints no match | SERIAL_NUMBER differs from the terminal, or the terminal isn't ACTIVATED on this store | Check the serial number. If it matches, contact GoDaddy support with the serial number |
The terminal is missing from storeDevices | GoDaddy configured it for a different store | Contact GoDaddy support with the serial number and your storeId |
401 | A missing, expired, or invalid PAT, or a missing commerce.store:read scope | Create a token with commerce.store:read |
404 | A wrong storeId | Check STORE_ID |
A payment request fails with EXTERNAL_SERVICE_ERROR | An unknown deviceId | Look up the deviceId again, then retry with a new paymentRequestId |
Go to How to charge a card on a terminal for the create call that uses the deviceId.
Last updated on
How is this guide?