• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Cancel terminal action BETA

POST /v2/terminals/actions/{action_id}/cancel

Cancels a Terminal action request if the status of the request permits it.


Permissions
PAYMENTS_WRITE
Guide
Cancel a Terminal Action
Try in API Explorer
Name Description
action_id
string

Required

Unique ID for the desired TerminalAction

Name Description

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request.

action
TerminalAction

The canceled TerminalAction

Examples

You are viewing an old version of the API
POST /v2/terminals/actions/{action_id}/cancel
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/terminals/actions/termapia%3AjveJIAkkAjILHkdCE/cancel \
  -X POST \
  -H 'Square-Version: 2022-07-20' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
Response JSON
{
  "action": {
    "id": "termapia:jveJIAkkAjILHkdCE",
    "device_id": "DEVICE_ID",
    "deadline_duration": "PT5M",
    "created_at": "2021-07-28T23:22:07.476Z",
    "updated_at": "2021-07-28T23:22:29.511Z",
    "status": "CANCELED",
    "cancel_reason": "SELLER_CANCELED",
    "location_id": "LOCATION_ID",
    "type": "SAVE_CARD",
    "app_id": "APP_ID",
    "save_card_options": {
      "customer_id": "CUSTOMER_ID",
      "reference_id": "user-id-1"
    }
  }
}

Error Descriptions

503 Service unavailable TEMPORARY_ERROR

A temporary internal error occurred. You can safely retry your call using the same idempotency key.

>
503 Service unavailable
{
  "errors": [
    {
      "code": "TEMPORARY_ERROR",
      "category": "PAYMENT_METHOD_ERROR"
    }
  ]
}