Cancel Transaction

The Cancel Transaction API provides a means to prevent a transaction from progressing. Once the API is invoked, the transaction status becomes "canceled", the transaction information is returned, and resuming the session will show the transaction canceled page. Depending on the geographical region, data retention policies applied to canceled transactions may be different from those applied to active ones.

Syntax

PUT /api/transaction/(uuid: transaction_id)/event

Examples

Example request

  1. PUT /api/transaction/968c1ceb-7508-4a92-aef7-3661b01ffcab/event
  2. Host: onespan.com
  3. Accept: application/json, text/javascript
  4. {
  5.   "trigger": "transaction_cancelled"
  6. }

Example response

  1. {
  2.   "id": "968c1ceb-7508-4a92-aef7-3661b01ffcab",
  3.   "status": "cancelled",
  4.   "request_ids": [],
  5.   "tenant_id": "dealflo",
  6.   "brand_id": "onespan",
  7.   "workflow_id": "00000000-0000-0000-0000-200000000001",
  8.   "language": "english",
  9.   "opaque_id": "WorkflowExternalMitAtPwd=1234",
  10.   "created": "2019-07-23T15:38:33.299Z",
  11.   "last_session_event": "2012-04-23T18:25:43.511Z",
  12.   "completed": "2012-04-23T18:25:43.511Z",
  13.   "last_api_request": "2019-07-23T15:38:33.299Z",
  14.   "users": [...],
  15.   "tokens": [],
  16.   "documents": [...],
  17.   "expiry_period": 90,
  18.   "expiry_timestamp": "2019-10-21T15:38:33.167Z",
  19.   "disable_notifications": false,
  20.   "disable_recording": false,
  21.   "verifications": [],
  22.   "version": 5
  23. }

Headers

The following headers are included in the request and response, respectively:

Request headers

  • Accept: The response content type depends on the Accept header
  • Authorization: The OAuth/JWT token to authenticate

Response headers

Status codes

Status codes
Status code Name Description
200 OK

No error.

400 Bad Request The transaction data is invalid.
401 Unauthorized Invalid token.
403 Forbidden The token does not grant transaction creation rights.
500 Internal Server Error Server or application error.