Path A — Priority Terminal API
Process card-present payments through Priority-supported terminals using the Terminal API — authentication, terminal discovery, transaction initiation, polling, and final record retrieval.
Use the Priority Terminal API when your software needs to drive a Priority-supported terminal directly — initiating transactions, polling for outcomes, and retrieving payment records through a single API surface. The API handles device communication on your behalf, so you don't integrate against the terminal vendor's SDK.
Who this is for — ISVs and developers building point-of-sale software for merchants using Priority-supported terminal devices. Partners and merchants should start with Choose Your Integration Path.
Supported Devices
The Priority Terminal API currently supports the following device families:
| Manufacturer | Devices |
|---|---|
| Dejavoo | Z3, Z6, Z8, Z9, Z11 |
| Dejavoo | QD2, QD3, QD4, QD5 |
| Dejavoo | P12 |
| Dejavoo | P1, P3, P8 [verify] |
| AnywhereCommerce | Nomad (WP3s) [verify] |
For devices not on this list — including PAX, Clover, Ingenico, Valor, and standalone variants — see Vendor-Direct Integrations or Standalone Terminals.
Before You Begin
| Requirement | Where to get it |
|---|---|
| Active PCE merchant account (approved through underwriting) | Priority Account Management |
| Registered terminal device with MID and T-number issued | Priority File Build Team (via the provisioning lifecycle) |
| Consumer Key and Consumer Secret | Priority Account Management |
| Stable network on the terminal (Wi-Fi or Ethernet) | Merchant network environment |
Environments
| Environment | API Base URL | Portal |
|---|---|---|
| Sandbox | https://sandbox-api2.mxmerchant.com/terminal/v1/ | https://sandbox.mxmerchant.com/ |
| Production | https://api2.mxmerchant.com/terminal/v1/ | https://mxmerchant.com/ |
The Five-Step Workflow
Every Priority Terminal API transaction runs through the same five sequential steps. Each step depends on the previous step's output — store the values you receive immediately so they are available for the next call.
- Authenticate — Obtain a JWT bearer token.
- Retrieve terminals — Fetch the list of registered terminals and pick an
enabledone. - Create a transaction — Send a transaction request to the terminal. Capture
devicePaymentAuditId. - Poll for status — Poll every 2 seconds until the transaction reaches a final state.
- Retrieve the payment record — Fetch the authoritative payment record from the Checkout API using your
replayId.
Step 1 — Authenticate
Obtain a JWT bearer token using your Consumer Key and Consumer Secret. Every other Terminal API call requires this token in the Authorization header.
Endpoint
POST https://api2.mxmerchant.com/security/v1/application/authorize
Request
curl --request POST \
--url 'https://api2.mxmerchant.com/security/v1/application/authorize' \
--header 'content-type: application/json' \
--data '{
"consumerKey": "{your_consumer_key}",
"consumerSecret": "{your_consumer_secret}"
}'Parameters
| Parameter | Required | Description |
|---|---|---|
consumerKey | ✓ | Your Consumer Key, issued by Priority Account Management. |
consumerSecret | ✓ | Your Consumer Secret, issued by Priority Account Management. |
Store the returned token and include it as a Bearer token on every subsequent request:
Authorization: Bearer {your_jwt_token}
JWT tokens expire. Implement token refresh logic so long-running terminal sessions don't fail mid-transaction.
Step 2 — Retrieve Available Terminals
Fetch every terminal registered to the merchant account and pick one to use for the transaction.
Endpoint
GET https://api2.mxmerchant.com/terminal/v1/merchantid/{merchantId}
Parameters
| Parameter | Required | Description |
|---|---|---|
merchantId | ✓ | Path parameter — the MID assigned during merchant onboarding. |
Choosing a terminal — check these fields on each record
| Field | What to check |
|---|---|
id | Unique identifier for the terminal. You'll pass this as terminalId in Step 3. |
enabled | Must be true. Disabled terminals cannot accept transactions. |
status | Should be Active for a fully provisioned terminal. |
Only terminals with
enabled: trueand anActivestatus are valid targets for a transaction.
Step 3 — Create a Transaction
Send the transaction to the terminal. The terminal prompts the customer for card entry and runs the authorization.
Endpoint
POST https://api2.mxmerchant.com/terminal/v1/transaction/merchantid/{merchantId}/terminalid/{terminalId}
Body parameters
| Parameter | Required | Description |
|---|---|---|
merchantId | ✓ | Path — the MID. |
terminalId | ✓ | Path — the id of an enabled terminal from Step 2. |
replayId | ✓ | Client-generated UUID for idempotency. This is the only value that links the terminal transaction to the final payment record in Step 5 — store it immediately. |
amount | ✓ | Transaction amount in USD. |
transactionType | ✓ | One of Sale, Refund, or Authorization (see below). |
Supported transaction types
| Type | Behavior |
|---|---|
Sale | Authorizes and captures the amount in a single step. |
Authorization | Reserves funds without capturing. Requires a Manager Approval code on the terminal by default — unless the file build is configured otherwise during Stage 4 of the provisioning lifecycle. |
Refund | Returns funds to the cardholder. Requires a Manager Approval code on the terminal by default — unless the file build is configured otherwise. |
posDatais auto-populated for Terminal API transactions. You do not sendposDatafields in the request body — the terminal supplies them automatically based on the file build. For card-present transactions without a terminal, see Card Present (Keyed) Transactions, whereposDatais required.
Initial response
The response returns a status of SENTTOTERMINAL and a devicePaymentAuditId.
| Field | What to do with it |
|---|---|
status: SENTTOTERMINAL | Confirms the transaction was dispatched to the terminal. This is not a final state. Move to Step 4. |
devicePaymentAuditId | Store immediately. This becomes your transactionId for polling in Step 4. |
Step 4 — Poll for Transaction Status
Poll the status endpoint every 2 seconds until the transaction reaches a final state, or until your 2-minute cap is hit.
Endpoint
GET https://api2.mxmerchant.com/terminal/v1/transaction/merchantid/{merchantId}/transactionid/{transactionId}
Parameters
| Parameter | Required | Description |
|---|---|---|
merchantId | ✓ | Path — the MID. |
transactionId | ✓ | Path — the devicePaymentAuditId from Step 3. |
Polling cadence
- Begin polling ~2 seconds after creating the transaction in Step 3.
- Poll once every 2 seconds.
- Cap at 2 minutes total. If no final state is reached, surface a timeout error and investigate via the terminal portal.
Final states — proceed to Step 5
| Status | Meaning |
|---|---|
approved | Transaction completed successfully. |
declined | Issuer declined the transaction. |
error | A processing error occurred. Check the response for details. |
Failed states — do not proceed
| Status | Meaning |
|---|---|
canceled / cancelled | Transaction was canceled. Check the message field. |
failed | Transaction failed. Check the message field. |
Cancel operations are not currently implemented for Dejavoo terminals. Polling will not return a
canceledstate from a programmatic cancel call — only from a terminal-side or manager-initiated cancel. Plan your error handling accordingly.
Any status not listed above should be treated as in-progress — continue polling.
Step 5 — Retrieve the Payment Record
Once a final state is reached, fetch the authoritative payment record from the Checkout API. The Terminal API does not return full payment details — only status.
Endpoint
GET https://api2.mxmerchant.com/checkout/v3/payment
Parameters
| Parameter | Required | Description |
|---|---|---|
merchantId | ✓ | The MID. |
replayId | ✓ | The same UUID you submitted in Step 3 — character-for-character match. |
Key fields in the response
| Field | Description |
|---|---|
approvalStatus | Final approval status. |
paymentType | Card type (credit, debit, etc.). |
amount | Final transaction amount. |
cardInformation | Tokenized card details. Raw PAN is never returned. |
authorizationDetails | Authorization code and network response codes. |
timestamps | Created and completed timestamps. |
Treat the Checkout API response as the system of record for the transaction.
Best Practices
| Practice | Why it matters |
|---|---|
Generate a new replayId per transaction | It's your only link to the final payment record. Reusing a UUID will mis-route record retrieval. |
Store devicePaymentAuditId immediately on Step 3 response | You cannot poll without it. It is not recoverable after the fact. |
| Implement JWT refresh logic | Tokens expire mid-session and silent failures are hard to debug. |
Validate enabled: true before sending a transaction | A disabled terminal will return an immediate failure. |
| Cap polling at 2 minutes | Avoid runaway loops on stalled transactions. Surface a timeout to your operator. |
| Always retrieve the final record from Checkout API | The Terminal API only confirms state — the payment object lives in Checkout. |
| Validate the full workflow in Sandbox first | Auth → terminal selection → transaction → polling → record retrieval — end-to-end before going live. |
Common Issues
| Symptom | Likely cause | Action |
|---|---|---|
| Authentication returns 401 | JWT expired or invalid credentials | Re-authenticate. Confirm Consumer Key/Secret are for the correct environment. |
| Terminal not appearing in Step 2 response | Device not yet provisioned, or not linked to this MID | Check Stage 7 in the provisioning lifecycle with the File Build Team. |
enabled: false on the terminal record | Device is inactive | Contact Priority Account Management. |
Transaction stuck on SENTTOTERMINAL | Device offline or disconnected | Verify the terminal displays Ready and has network. |
| Polling never reaches a final state within 2 minutes | Customer did not present a card, or device prompt was missed | Surface a timeout error to the operator. Investigate via the terminal portal. |
Step 5 returns no record for the replayId | replayId does not match the value sent in Step 3 | Confirm the value was stored before Step 3 was sent and is being passed unchanged. |
Where to Go Next
The eight-stage lifecycle that gets the terminal eligible for Step 2 of this workflow.
Specs, entry modes, and connectivity for every device on the Priority Terminal API path.
For devices not supported by this API — PAX, Clover, and other vendor-specific paths.