--- title: "Cancel Transaction" slug: "cancel-transaction" updated: 2025-06-27T19:57:23Z published: 2025-06-27T19:57:23Z canonical: "docs.onespan.com/cancel-transaction" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # 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 ```http PUT /api/transaction/uuid: transaction_id/event ``` ## Examples ### Example request ```http PUT /api/transaction/968c1ceb-7508-4a92-aef7-3661b01ffcab/event Host: onespan.com Accept: application/json, text/javascript {  "trigger": "transaction_cancelled" } ``` ### Example response ```json {  "id": "968c1ceb-7508-4a92-aef7-3661b01ffcab",  "status": "cancelled",  "request_ids": [],  "tenant_id": "dealflo",  "brand_id": "onespan",  "workflow_id": "00000000-0000-0000-0000-200000000001",  "language": "english",  "opaque_id": "WorkflowExternalMitAtPwd=1234",  "created": "2019-07-23T15:38:33.299Z",  "last_session_event": "2012-04-23T18:25:43.511Z",  "completed": "2012-04-23T18:25:43.511Z",  "last_api_request": "2019-07-23T15:38:33.299Z",  "users": [...],  "tokens": [],  "documents": [...],  "expiry_period": 90,  "expiry_timestamp": "2019-10-21T15:38:33.167Z",  "disable_notifications": false,  "disable_recording": false,  "verifications": [],  "version": 5 } ``` ### Headers The following headers are included in the request and the response: #### Request headers - [Accept](https://tools.ietf.org/html/rfc7231#section-5.3.2): The response content type depends on the Accept header. - [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2): The OAuth/JWT token to authenticate. #### Response headers - [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5): application/json ### 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.