Skip to content

Cancel

METHOD NAME cancel

Requires cancelable state

Description

Cancel any cancelable process. The method will return immediately; if it's processing, the canceled process will also return.

Example 1: Cancel the readCard process while waiting for a card will cause the readCard request to return with the result of CANCELED, and this cancel request will return successfully.

Example 2: Cancelling a transaction while waiting for the continueTransaction command will only cause the device to move back to the IDLE state, and this cancel request will be returned successfully.

Parameters

object

  • referenceId string REQUIRED
    The reference id of the processing request

Result

null on success

Errors

  • MissingParams
  • InvalidParams on invalid referenceId
  • IllegalState

Example

Request

1
2
3
4
5
6
7
8
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "cancel",
  "params": {
    "referenceId": "6c7d34ba-940e-4aa6-81ed-b54dcf2c37b1"
  }
}

Response

1
2
3
4
5
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": null
}