> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fintoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Charge

> Use this endpoint to cancel a Charge. Charges can only be cancelled when they are in status `created`.

**`v1`** · Base URL `https://api.fintoc.com/v1`


## OpenAPI

````yaml v2023-11-15/reference/fintoc-api.json POST /charges/{id}/cancel
openapi: 3.1.0
info:
  title: fintoc-api
  version: '2023-11-15'
servers:
  - url: https://api.fintoc.com/v1
security:
  - {}
paths:
  /charges/{id}/cancel:
    post:
      summary: Cancel Charge
      description: >-
        Use this endpoint to cancel a Charge. Charges can only be cancelled when
        they are in status `created`.
      operationId: cancel-charge
      parameters:
        - name: Authorization
          in: header
          description: Fintoc Secret Key
          schema:
            type: string
            default: sk_test_9c8d8CeyBTx1VcJzuDgpm4H
        - name: id
          in: path
          description: >-
            The `id` of the Charge you want to cancel. Only `pending` charges
            may be canceled.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n\t\"id\": \"ch_m7N9rAWJS9dWDKEe\",\n  \"object\": \"charge\",\n  \"amount\": 1000,\n\t\"currency\": \"CLP\",\n  \"status\": \"canceled\",\n\t\"failure_code\": null,\n\t\"created_at\": \"2021-11-11T02:29:16Z\",\n}"
      deprecated: false

````