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

# Issue access token

> Issues the access token from the API key, using HTTP Basic authentication. The token lifetime is given in `expiresIn`, in milliseconds.



## OpenAPI

````yaml /openapi.yaml post /auth
openapi: 3.0.3
info:
  title: Fincle API
  version: 1.0.0
  description: >-
    Fincle payments API: charges by Pix, credit card and boleto, subscriptions,
    transactions, refunds, infractions, notifications and transfers.
servers:
  - url: https://api.fincle.com.br
    description: Production server
security: []
tags:
  - name: Authentication
    description: Issuance of the access token from the API key.
  - name: Charges
    description: Creation of charges by Pix, credit card and boleto.
  - name: Subscriptions
    description: Recurring billing on credit card.
  - name: Transactions
    description: Retrieval and refund of transactions.
  - name: Refunds
    description: Refund requests submitted by payers.
  - name: Infractions and MED
    description: Pix infraction reports and the amounts blocked as a result.
  - name: Webhooks
    description: Registration of notification endpoints and tracking of deliveries.
  - name: Balance and transfers
    description: Balance, statement, fees and transfer of the amounts received.
paths:
  /auth:
    post:
      tags:
        - Authentication
      summary: Issue access token
      description: >-
        Issues the access token from the API key, using HTTP Basic
        authentication. The token lifetime is given in `expiresIn`, in
        milliseconds.
      operationId: createToken
      responses:
        '200':
          description: Request processed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  token:
                    type: string
                  tokenType:
                    type: string
                  expiresIn:
                    type: number
                required:
                  - success
                  - token
                  - tokenType
                  - expiresIn
                additionalProperties: false
              example:
                success: true
                token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                tokenType: Bearer
                expiresIn: 60000
        '401':
          description: Invalid API key or secret.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                required:
                  - success
                  - message
              example:
                success: false
                message: Credenciais inválidas.
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.