Skip to content

Add payment command

POST
/api/connector/v1/commands/addPaymentTerminal

Restricted!

This operation is part of a custom workflow for Mews partners such as POS systems to access Mews Payment Terminals. See Mews Payment Terminals.

Adds a new Mews Payment Terminal command for taking a customer payment. The operation instructs a specified terminal device to take a payment from a specified customer for a specified amount.

PaymentTerminalCommandParameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
TerminalId
required

Unique identifier of the payment terminal.

string format: uuid
CustomerId
required

Unique identifier of the Customer.

string format: uuid
Type
required

The type of payment, e.g. Preauthorization.

Payment

Preauthorization

string
Allowed values: Payment Preauthorization
Amount
required
Currency value (ver 2018-06-07)

Amount of the payment.

object
Currency
required
string format: currency
>= 1 characters
Value
number format: double
nullable
Net
number format: double
nullable
Tax
number format: double
nullable
TaxRate
number format: double
nullable
BillId

Unique identifier of the Bill.

string format: uuid
nullable
PaymentRequestId

Unique identifier of the PaymentRequest.

string format: uuid
nullable
ReservationId

Unique identifier of the Reservation.

string format: uuid
nullable
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "7059D2C25BF64EA681ACAB3A00B859CC-D91BFF2B1E3047A3E0DEC1D57BE1382",
"Client": "MyPOS 1.0",
"Type": "Payment",
"TerminalId": "be35b39e-ad7e-460a-8de9-4c7581e016a2",
"CustomerId": "35d4b117-4e60-44a3-9580-c582117eff98",
"BillId": null,
"Amount": {
"Currency": "EUR",
"Value": 230
}
}

OK

DeviceCommandAddResult
object
CommandId
required

Unique identifier of the created Command.

string format: uuid
Example
{
"CommandId": "2391a3df-1c61-4131-b6f8-c85b4234adcb"
}

Server has successfully fulfilled the request and there is no additional information to send back.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see Request timeouts

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by too many requests sent in a given amount of time. Response contains Retry-After header indicating how long the user agent should wait before making a follow-up request. For more information, see Request limits.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our documentation repository.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable