Cancel transaction

The Cancel Transaction API prevents a transaction from progressing. Once the API is invoked, the transaction status becomes cancelled. The transaction information is returned, and when the session is resumed, the transaction canceled page is displayed.

Depending on the geographical region, data retention policies applied to canceled transactions may be different from the policies that are applied to active transactions.

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 the response:

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.