---
updatedAt: 2025-06-12T21:07:25.000Z
agentTools:
  projectIndex: https://docs.beeteller.com/v1.0-international-pix/llms.txt
---

# Cancelling a Pix Transaction

To cancel an order, its status must be "PENDING". Otherwise, the response will be status code 400

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "international-pix",
    "version": "1.0-international-pix"
  },
  "servers": [
    {
      "url": "https://api-test.beeteller.com/pix-pos"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/transaction/{transaction_id}/cancel": {
      "put": {
        "summary": "Cancelling a Pix Transaction",
        "description": "To cancel an order, its status must be \"PENDING\". Otherwise, the response will be status code 400",
        "operationId": "cancelling-a-pix-transaction",
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "description": "Order's ID",
            "schema": {
              "type": "string",
              "default": "a0f23d92-f0cf-4021-a27f-d2272f369174"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "auth_code"
                ],
                "properties": {
                  "auth_code": {
                    "type": "string",
                    "description": "The valid 2FA 6-digits code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"a0f23d92-f0cf-4021-a27f-d2272f369174\",\n    \"currency\": \"USD\",\n    \"value\": 1000.85,\n    \"method\": \"PIX\",\n    \"status\": \"CANCELED\",\n    \"created_at\": \"2023-08-09T21:37:08.233702-03:00\",\n    \"reverted_at\": None,\n    \"reference\": \"123141241231\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid auth code": {
                    "value": {
                      "errors": {
                        "authCode": "Without authorization. The auth code is wrong."
                      },
                      "errors_details": [
                        {
                          "field": "authCode",
                          "error_code": "0006",
                          "error_label": "without.authorization",
                          "error_detail": "Without authorization. The auth code is wrong.",
                          "action": "Verify the authorization code provided in the request. Ensure that it is valid and correctly associated with the user's session or API credentials."
                        }
                      ]
                    }
                  },
                  "Invalid order's status": {
                    "value": {
                      "errors": {
                        "status": "Order status must be \"PENDING\"."
                      },
                      "errors_details": [
                        {
                          "field": "status",
                          "error_code": "0079",
                          "error_label": "invalid.order.state",
                          "error_detail": "Order status must be \"PENDING\".",
                          "action": "Ensure the order is in the 'PENDING' payment state before attempting this operation."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "properties": {
                        "authCode": {
                          "type": "string",
                          "example": "Without authorization. The auth code is wrong."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```