Global

Members

(readonly) KeyPress :string

Enumeration of key press codes
Type:
  • string
Properties:
Name Type Description
NONE string
ENTER string
ESC string
BACKSPACE string
TAB string
STAR string
BUTTON_1 string
BUTTON_2 string
BUTTON_3 string
BUTTON_4 string
BUTTON_5 string
BUTTON_6 string
DIGIT_1 string
DIGIT_2 string
DIGIT_3 string
DIGIT_4 string
DIGIT_5 string
DIGIT_6 string
DIGIT_7 string
DIGIT_8 string
DIGIT_9 string
DIGIT_0 string
Source:

(readonly) VoidReason :string

Enumeration of void reason codes
Type:
  • string
Properties:
Name Type Description
USER_CANCEL string
TRANSPORT_ERROR string
REJECT_SIGNATURE string
REJECT_PARTIAL_AUTH string
NOT_APPROVED string
FAILED string
AUTH_CLOSED_NEW_CARD string
REJECT_DUPLICATE string
Source:

Methods

DebugCloverConnectorListener()

Interface to the Clover remote-pay API. Defines the interface used to interact with remote pay adapters.
Source:

DelegateCloverConnectorListener()

Interface to the Clover remote-pay API. Defines the interface used to interact with remote pay adapters.
Source:

Type Definitions

CapturePreAuthRequest

Type:
  • Object
Properties:
Name Type Attributes Description
paymentId string the id of the payment to capture
amount number the final amount ofthe payment less any included tip
tipAmount number <optional>
the amount of the tip.
Source:

CardTransaction

Type:
  • Object
Properties:
Name Type Description
authcode number the authorization code. Must be an integer
entryType string SWIPED, KEYED, VOICE, VAULTED, OFFLINE_SWIPED, OFFLINE_KEYED, EMV_CONTACT, EMV_CONTACTLESS, MSD_CONTACTLESS, PINPAD_MANUAL_ENTRY
extra Object additional information on the transaction. EX: cvmResult - "SIGNATURE"
state string PENDING, CLOSED
referenceId string
type string AUTH, PREAUTH, PREAUTHCAPTURE, ADJUST, VOID, VOIDRETURN, RETURN, REFUND, NAKEDREFUND, GETBALANCE, BATCHCLOSE, ACTIVATE, BALANCE_LOCK, LOAD, CASHOUT, CASHOUT_ACTIVE_STATUS, REDEMPTION, REDEMPTION_UNLOCK, RELOAD
transactionNo. Number Must be an integer
last4 Number the last 4 digits of the card. Must be an integer
cardType string VISA, MC, AMEX, DISCOVER, DINERS_CLUB, JCB, MAESTRO, SOLO, LASER, CHINA_UNION_PAY, CARTE_BLANCHE, UNKNOWN, GIFT_CARD, EBT
Source:

CloseoutRequest

Type:
  • Object
Properties:
Name Type Attributes Description
allowOpenTabs boolean <optional>
if true, indicates that a closeout can proceed, even if open tabs are present. Defaults to false.
Source:

CloverConfig

The configuration for the Clover api object. This encapsulates the different ways that the Clover object can be configured for proper access to the device.

Possible configurations:

  1. deviceURL
  2. oauthToken, domain, merchantId, deviceSerialId
  3. clientId, domain, merchantId, deviceId (Requires log in to Clover server)
  4. clientId, domain, merchantId, deviceSerialId (Requires log in to Clover server)

Type:
  • Object
Properties:
Name Type Attributes Description
deviceURL string <optional>
the web socket url to use when connecting to the device. Optional if other configuration values allow this to be obtained.
oauthToken string <optional>
the authentication token used when communicating with the clover cos server. Required if deviceURL is not set. Optional if other configuration values allow this to be obtained.
domain string <optional>
the url to the clover cos server.
merchantId string <optional>
the merchant id.
deviceSerialId string <optional>
the serial id of the device to use.
clientId string <optional>
the Clover application id to use when obtaining the oauth token.
autoVerifySignature boolean <optional>
if set to false, a callback must be registered for signature verification requests. This defaults to true.
disableRestartTransactionWhenFailed boolean <optional>
if set to true, when the device times out during a transaction, it will return to the 'Welcome' screen when the customer selects 'ok'
remotePrint boolean <optional>
if set to true, then when the user selects "print" on the print receipt screen after a transaction, a PRINT_PAYMENT message will be sent from the device to the API. To get the message, a listener must be registered via Clover.device.on(LanMethod.PRINT_PAYMENT, ...)
Source:

Credit

Type:
  • Object
Properties:
Name Type Attributes Description
amount Number <optional>
the amount of the transaction, including tax. Must be an integer
createdTime Number <optional>
the time in milliseconds that the transaction successfully completed. Must be an integer
tender Tender <optional>
refund information
orderRef Object <optional>
order information. Ex: id - the order id
employee Object <optional>
employee information. Ex: id - the employee id
cardTransaction CardTransaction <optional>
successful transaction information
Source:

DisplayDiscount

A discount applied to a line item on the order.
Type:
  • Object
Properties:
Name Type Description
id string identifier for the discount
lineItemId string identifier for the line item this applies to
name string name of the discount
amount string amount of the discount
percentage string percentage of the discount
Source:

DisplayDiscountArray

A container object used when serializing a collection of display discount items
Type:
  • Object
Properties:
Name Type Description
elements Array.<DisplayDiscount> the array of items
Source:

DisplayLineItem

Type:
  • Object
Properties:
Name Type Description
id string identifier for the discount
orderId string identifier for the order this applies to
name string name of the discount
price string the price of the item
quantity string number of items
discounts DisplayDiscountArray number of items
discountAmount string the formatted discount total to display
Source:

DisplayLineItemArray

A container object used when serializing a collection of display line items
Type:
  • Object
Properties:
Name Type Description
elements Array.<DisplayLineItem> the array of items
Source:

DisplayOrder

An object used to control an order display on the device.
Type:
  • Object
Properties:
Name Type Description
id string identifier for the order
discounts DisplayDiscountArray
lineItems DisplayLineItemArray
tax string the formatted tax amount to display
subtotal string the formatted subtotal amount to display
total string the formatted total (subtotal+tax) to display
Source:

NotificationResponse

the result of a notification request. Contains information on how to connect to a device
Type:
  • Object
Properties:
Name Type Description
sent boolean
host string
token string
Source:

Operation

Type:
  • Object
Properties:
Name Type Description
orderId string the id of the order the operation is on
ids StringArray a array container of ids for the order operation
Source:

Payment

Type:
  • Object
Properties:
Name Type Attributes Description
result string the result code for the transaction - "SUCCESS", "CANCEL"
createdTime Number <optional>
the time in milliseconds that the transaction successfully completed. Must be an integer
cardTransaction CardTransaction <optional>
successful transaction information
amount Number <optional>
the amount of the transaction, including tax. Must be an integer
tipAmount Number <optional>
added tip amount. Must be an integer
order Object <optional>
order information. Ex: id - the order id
employee Object <optional>
employee information. Ex: id - the employee id
Source:

Point

Type:
  • Object
Properties:
Name Type Description
x Number the x coordinate location of the point in pixals. Must be an integer
y Number the y coordinate location of the point in pixals. Must be an integer
Source:

RefundRequest

Type:
  • Object
Properties:
Name Type Attributes Description
orderId string the id of the order to refund
paymentId string the id of the payment on the order to refund
fullRefund boolean <optional>
if true, then a full refund is done for the version 2 call.
amount number <optional>
the amount to refund. If not included or 0, version 1 will refund the full payment. If using the version 2 call, 0 will result in an error. The amount cannot exceed the original payment, and additional constraints apply to this (EX: if a partial refund has already been performed then the amount cannot exceed the remaining payment amount).
version Number <optional>
the version of the refund request. If not included, the current version of the call is used. Must be an integer
Source:

requestCallback(erroropt, resultopt)

This callback type is called `requestCallback` and is displayed as a global symbol. This type of callback adheres to the Node.js convention of 'Error-first' callbacks. The first argument of the callback is always reserved for an error object. On a successful response, the ‘err’ argument is null. Call the callback and include the successful data only. On an unsuccessful response, the ‘err’ argument is set. Call the callback with an actual error object. The error should describe what happened and include enough information to tell the callback what went wrong. Data can still be returned in the other arguments as well, but generally the error is passed alone.
Parameters:
Name Type Attributes Description
error Error <optional>
null iff there was no error, else an object that contains a code and a message text
result Object <optional>
data that results from the function. This is a hash of information. There will be a code within the object that indicates the operation completion status. This may be null, depending on the nature of the call, and the error state.
Source:
See:

Signature

Type:
  • Object
Properties:
Name Type Description
strokes Array.<Stroke> the strokes of the signature. A series of points representing a single contiguous line
height Number the pixal height of the canvas area needed to correctly represent the signature. Must be an integer
width Number the pixal width of the canvas area needed to correctly represent the signature. Must be an integer
Source:

SignatureVerifyRequest

Type:
  • Object
Properties:
Name Type Description
payment string the payment information, serialized to a sting
signature Signature the signature
Source:

StringArray

Type:
  • Object
Properties:
Name Type Description
elements Array.<string> string elements
Source:

Stroke

A series of points representing a single contiguous line
Type:
  • Object
Properties:
Name Type Description
points Array.<Point>
Source:

Tender

Type:
  • Object
Properties:
Name Type Description
id string the tender id
label string the label that describes the tender
Source:

TipAdjustRequest

Type:
  • Object
Properties:
Name Type Description
orderId string the id of the order to adjust
paymentId string the id of the payment on the order to adjust
tipAmount number the amount to adjust.
Source:

TransactionRequest

A payment
Type:
  • Object
Properties:
Name Type Attributes Description
amount Number the amount of a sale or refund, including tax. Must be an integer
tipAmount Number <optional>
the amount of a tip. Added to the amount for the total. Valid for sale operations. Must be an integer
tippableAmount Number <optional>
the amount that calculated tips are based on. If not set then 'amount' is used. Valid for sale operations. Must be an integer
employeeId string <optional>
the valid Clover id of an employee recognized by the device. Represents the employee making this sale or refund.
autoVerifySignature boolean <optional>
optional override to allow either automatic signature verification {true}, or expect that the caller has registered a listener for the request for signature verification {false}. This will override the internal object flag autoVerifySignature.
requestId string <optional>
optional CloverID compatible identifier used for the payment once the transaction is completed. See @CloverID
isPreAuth boolean <optional>
valid for auth calls. If set, the payment will be made as a pre authorization.
Source:

TransactionResponse

The response to a sale or naked refund
Type:
  • Object
Properties:
Name Type Attributes Description
code string the result code for the transaction - "SUCCESS", "CANCEL", "ERROR"
payment Payment the payment information
credit Credit the payment information
signature Signature <optional>
the signature, if present
request TransactionRequest <optional>
the request that resulted in this response
Source: