Terminal Transaction

Processing a terminal transaction lets you accept card-present payments through a registered physical device. PCE handles real-time authorization, end-to-end encrypted card capture, and returns a complete payment record through a single authenticated API workflow.

PCE's Terminal API connects your point-of-sale system to registered devices across multiple terminal providers — supporting EMV, NFC, and magnetic stripe entry modes within a single integration.

Before initiating any transaction, ensure the following conditions are met:

Prerequisites

RequirementDetailsWhere to get it
Active PCE Merchant AccountThe merchant must be fully onboarded, underwritten, and approved.PCE Account Management team
Registered Terminal DeviceA Terminal device must be registered and in ENABLED status under the merchant account.PCE Account Management team
Correct POS DataEvery card-present transaction must include accurate POS data fields to ensure network approval and correct interchange classification.See POS Data and Network Authorization below
⚠️

Important — Transactions submitted with incorrect or missing POS data may be declined by the card network or processed at a higher interchange rate.


Terminal Setup

Before processing terminal transactions, you must be fully onboarded on PCE. Terminals can be configured for both retail and restaurant environments, with restaurant builds supporting tip collection at the point of sale.

📌

Note — Contact the PCE Account Management team to initiate the terminal setup process for your account.

POS Data and Network Authorization

Every card-present transaction must include accurate POS (Point of Sale) data — contextual information about the terminal device and the environment from which the transaction is initiated. The card network uses this data to authenticate the transaction and assess fraud risk. The key fields required for every terminal transaction are:

FieldAccepted ValuesImpact if Incorrect
panCaptureMethodManual, Swipe, Chip, ContactlessChip, FallbackWrong interchange classification, potential downgrade to a higher rate
cardPresenttrue, falseIncorrect fee tier applied — card-not-present rates charged for card-present transactions
cardholderPresencePresent, NotPresent, Phone, EcomNetwork compliance violations, transaction declined
deviceAttendanceAttended, UnattendedIncorrect liability assignment in chargeback disputes
deviceLocationOnPremise, OffPremiseIncorrect network routing
deviceInputCapabilityKeyedOnly, Swipe, ChipSwipe, ChipSwipeKeyedInterchange downgrade, transaction declined
partialApprovalSupportSupported, NotSupportedTransaction failures for partially approved amounts
transactionStatusNormal, Preauthorization, DeferredIncorrect processing path, authorization failures

How it Works

Processing a terminal transaction involves four sequential steps. Each step must be completed in order before proceeding to the next.

Step 1: Retrieve Available Terminals

Retrieve the list of terminals registered to your merchant account and identify an active terminal for transaction initiation.

  1. Make a GET request to /terminal/v1/merchantid/{merchantId} endpoint with required parameters.
ParameterRequiredDescription
merchantIdstring
  1. From the response, identify a terminal to use for the transaction. Check the following fields:
FieldDescription
terminalIdUnique identifier for the registered terminal. Required for transaction creation in Step 2.
enabledIndicates whether the terminal is available for transactions. Must be true before proceeding.

Each terminal returned in the response represents a registered device available for transactions. Only terminals with enabled: true can be used for transaction creation.


Step 2: Create a Terminal Transaction

Initiate a transaction on the selected terminal using the terminalId retrieved in Step 1.

  1. Make a POST request to /terminal/v1/transaction/merchantid/{merchantId}/terminalid/{terminalId}endpoint with required parameters.
ParameterRequiredTypeDescription
merchantIdstringYour unique merchant identifier.
terminalIdstringThe ID of the active terminal selected in Step 1. Must have enabled: true.
replayIdstringA client-generated UUID used for idempotency. Required to retrieve the final payment record in Step 4. Store it immediately — it cannot be recovered if lost.
amountnumberTransaction amount in USD.
transactionTypestringType of transaction to initiate. Accepted values: Sale, Refund, Authorization.
📘

Transaction Type Reference — Use Sale to immediately authorize and capture the transaction amount. Use Refund to return funds to the cardholder, or Authorization to reserve funds without capturing.

  1. The initial response returns a status of SENTTOTERMINAL, confirming the transaction request has been dispatched to the terminal.
  2. Store the devicePaymentAuditId from the response — this becomes the transactionId used during polling in Step 3.

SENTTOTERMINAL is not a final state. Do not treat it as a completed transaction. Proceed to Step 3 to monitor the transaction outcome.


Step 3: Poll for Transaction Status

Monitor the transaction by polling the status endpoint until a final state is reached.

  1. Begin polling approximately 2 seconds after transaction creation. Make a GET request to /terminal/v1/transaction/merchantid/{merchantId}/transactionid/{transactionId}endpoint with required parameters.
ParameterRequiredTypeDescription
merchantIdstringYour unique merchant identifier.
transactionIdstringThe devicePaymentAuditId returned in Step 2.
  1. Poll every 2 seconds for up to 2 minutes, or until a final state is returned in the status field.

Successful Final States — Proceed to Step 4

StatusDescription
approvedTransaction completed successfully.
declinedTransaction was declined by the issuer.
errorA processing error occurred.

Failed States — Do Not Proceed

StatusDescription
canceled / cancelledTransaction was canceled. Check the message field for details.
failedTransaction failed. Check the message field for details.

Any status not listed above should be treated as in-progress — continue polling.


Step 4: Retrieve Final Transaction Details

Once a final state is reached in Step 3, retrieve the complete payment record from the Checkout API. Payment details are not returned by terminal endpoints.

  1. Make a GET request to /checkout/v3/paymentendpoint with required parameters.
ParameterRequiredTypeDescription
merchantIdstringYour unique merchant identifier.
replayIdstringThe UUID submitted during transaction creation in Step 2. Must match the original value exactly.
  1. The response returns the complete payment object. Treat this as the authoritative transaction record.
FieldDescription
approvalStatusFinal approval status of the transaction.
paymentTypeThe payment method used (e.g., credit, debit).
amountFinal transaction amount.
cardInformationTokenized card details. Raw card data is never returned.
authorizationDetailsAuthorization code and network response details.
timestampsTransaction creation and completion timestamps.
metadataAdditional transaction metadata.

Best Practices

PracticeDescription
Implement token refresh logicJWT tokens expire after a set period. Build token refresh logic to prevent authentication failures during active sessions.
Validate terminal status before transactingAlways check enabled: true before selecting a terminal in Step 1. Initiating a transaction on a disabled terminal will result in a failed request.
Use the Checkout API for payment recordsThe Terminal API does not return complete payment details. Always retrieve the authoritative record from GET /checkout/v3/payment after a final state is reached.
Test in sandbox firstValidate the complete workflow in the sandbox environment before going live.




















.readme-logo { display: none !important; }