Interacting with payment terminals
A payment terminal represents a device which can accept payment from the user physically, like a credit card terminal.
These devices are typically interacted with by applications running on check-in/check-out terminals, to accept direct payment from the user.
Querying Payment Terminals
Use the paymentTerminals connection to get all terminals:
query paymentTerminals { paymentTerminals { edges { node { id label } } }}You can provide the filters parameter to filter the payment terminals by campsite or external ID.
Note: This type of device is normally dedicated to a specific location or use case. It can be assumed, that the unique external ID does not change, even if a physical device needs to be replaced at some point. The IDs related to the location and intended use case of the devices can be provided by Cynox upon request. For convenience, API users could provide means to allow configuration by manually assigning devices from a list of available device instead.
Starting a payment or refund
To start the payment process on a payment terminal, use the initiatePayment mutation.
mutation startPaymentProcess($terminalId: GlobalID!, $amount: Decimal!) { initiatePayment(terminalId: $terminalId, amount: $amount) { __typename ...on PaymentTerminalPaymentCommand { id executionState } ...on OperationInfo { messages { kind, message } } }}You will receive either a PaymentTerminalPaymentCommand to indicate a successful request or a list of messages
indicating any errors:
{ "startPaymentProcess": { "__typename": "PaymentTerminalPaymentCommand", "executionState": "CONFIRMED" }}In the same way you can use initiateRefund to start a refund process.