DOCS
API reference

Terminals

Payments API operations for Terminals.

Payments API

These operations are generated from the Payments API Swagger document. Use the sandbox host https://api.dhangodemo.com while testing and https://api.dhango.com in production.

GET /v1/terminals

Returns the list of terminals, active ones only unless includeInactive is set.

Parameter In Required Description
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.
page query The current page of the search results starting at 1.
pageSize query The number of records per page. The default is 25 and the maximum is 50.
includeInactive query Set to true to include deactivated terminals.

Responses:

Status Description Schema
200 The page of terminals. GetTerminalResponseSearchResults
403 The credential may not read terminals. ProblemDetails

POST /v1/terminals

Registers a terminal for the account at one of its locations. Registration is local: no call is made to the processor. A terminal is identified by its processor credential and processor terminal id, so repeating the request for an active terminal at the same location returns the existing terminal. A deactivated terminal is not re-registered; activate it instead.

Parameter In Required Description
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.

Request body: PostTerminalRequest.

PostTerminalRequest

Field Type Required Description
processor Processor yes
processorTerminalId string yes The identifier the processor uses for this terminal: the reader id for Stripe, the POIID for Adyen. Matched case-insensitively against terminals already registered under the credential.
locationId integer yes The identifier of an active location of the account at which the terminal sits.
name string The friendly name for the terminal. Defaults to the processor terminal id for a new terminal; an omitted name keeps the existing name when a previously unregistered terminal is re-registered.

Processor values: Fake, AdyenPlatform, AdyenMerchant, StripePlatform, StripeMerchant, TokenEx, LegacyGatewaySupport, NachaDirect, NachaTpsFnboPlatform, NachaTpsFnboMerchant, NachaTpsFakePlatform, NachaTpsFakeMerchant, Flex, Payout, StripeRecipient, CyberSource, AuthorizeDotNet, TrustCommerce, PayPalPayflowPro. Responses:

Status Description Schema
200 The terminal was already registered at that location. GetTerminalResponse
201 The terminal was registered. GetTerminalResponse
400 The request is invalid: the account does not have exactly one credential for the processor, or the location is not a location of the account. Error messages can be found in the body of the response. ValidationProblemDetails
403 The credential may not manage terminals (a merchant's own credential, or a platform credential without accountKey). ProblemDetails
409 The terminal is registered at another location (move it with PATCH), or it is deactivated (activate it with POST /v1/terminals/{id}/activate). ProblemDetails

GET /v1/terminals/{id}

Gets a single terminal of the account. A deactivated terminal is returned with isActive = false.

Parameter In Required Description
id path yes The unique identifier of the terminal.
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.

Responses:

Status Description Schema
200 The terminal. GetTerminalResponse
403 The credential may not read terminals. ProblemDetails
404 The terminal does not exist for the account.

PATCH /v1/terminals/{id}

Updates a terminal, active or deactivated: its name and/or the location of the account it sits at. The processor and processor terminal id cannot be changed.

Parameter In Required Description
id path yes The unique identifier of the terminal.
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.

Request body: PatchTerminalRequest.

PatchTerminalRequest

Field Type Required Description
name string The new friendly name of the terminal. Omit to keep the current name.
locationId integer The identifier of an active location of the account to move the terminal to. Omit to keep the current location.

Responses:

Status Description Schema
200 The updated terminal. GetTerminalResponse
400 Neither a name nor a location was sent, the location is not a location of the account, or the body names the processor or processor terminal id. ValidationProblemDetails
403 The credential may not manage terminals. ProblemDetails
404 The terminal does not exist for the account.

POST /v1/terminals/{id}/deactivate

Deactivates a terminal. The terminal is kept with its session and transaction history and can no longer start terminal sessions until it is activated again. Deactivating an already deactivated terminal changes nothing.

Parameter In Required Description
id path yes The unique identifier of the terminal.
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.

Responses:

Status Description Schema
200 The terminal, with isActive = false. GetTerminalResponse
403 The credential may not manage terminals. ProblemDetails
404 The terminal does not exist for the account.

POST /v1/terminals/{id}/activate

Activates a deactivated terminal at its current location, keeping its name. Activating an active terminal changes nothing. A terminal whose location no longer exists must first be moved to another location with PATCH.

Parameter In Required Description
id path yes The unique identifier of the terminal.
accountKey header Used to make API calls on behalf of another account.
culture header The culture to be used when setting the language for error messages.

Responses:

Status Description Schema
200 The terminal, with isActive = true. GetTerminalResponse
403 The credential may not manage terminals. ProblemDetails
404 The terminal does not exist for the account.
409 The terminal's location was deleted; move the terminal with PATCH first. ProblemDetails