openapi: 3.0.3
info:
  title: OpenPix
  description: |-
    A OpenPix é uma Plataforma de Gestão de Pagamentos. 

     Para utilizar nossa API de Produção, utilize exclusivamente o seguinte endpoint: 

     👉 __[https://api.openpix.com.br/](https://api.openpix.com.br/)__ 

     Além disso, oferecemos também um ambiente de sandbox (ambiente de testes), ideal para desenvolvimento e validação de integrações sem impactar dados reais. 

     👉 __[https://api.woovi-sandbox.com/](https://api.woovi-sandbox.com/)__ 

     Veja como configurar seu acesso a nossa API [aqui](https://developers.openpix.com.br/docs/apis/api-getting-started).
  version: 1.0.0
servers:
  - url: https://api.openpix.com.br
    description: API de Produção
  - url: https://api.woovi-sandbox.com
    description: API de Testes
security:
  - AppID: []
paths:
  /api/v1/account/{accountId}:
    delete:
      tags:
        - account
      summary: Close an Account
      description: |
        Closes an Account.

        Notes:
        - Accounts with balance cannot be closed.
      x-required-scope: ACCOUNT_DELETE
      security:
        - AppID:
            - ACCOUNT_DELETE
      parameters:
        - name: accountId
          in: path
          description: ID of the Account
          required: true
          schema:
            type: string
          example: 6290ccfd42831958a405debc
      responses:
        '200':
          description: Account closed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Operation status
                    example: OK
                  accountId:
                    type: string
                    description: ID of the Account
                    example: 6290ccfd42831958a405debc
              example:
                status: OK
                accountId: 6290ccfd42831958a405debc
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                InvalidAccountId:
                  value:
                    error: Account ID is invalid
                AlreadyClosed:
                  value:
                    error: Account already closed
                AccountWithBalance:
                  value:
                    error: Account with balance cannot be deleted
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: This feature is not enabled for your company
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Account not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account/6290ccfd42831958a405debc',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("DELETE", "/api/v1/account/6290ccfd42831958a405debc",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Delete.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    get:
      tags:
        - account
      summary: Get an Account
      x-required-scope: ACCOUNT_GET
      x-permissions:
        - ACCOUNT_GET
      security:
        - AppID:
            - ACCOUNT_GET
      parameters:
        - name: accountId
          in: path
          description: ID of the Account
          required: true
          schema:
            type: string
          example: 6290ccfd42831958a405debc
      responses:
        '200':
          description: The Account retrieve using the given Account ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: object
                    $ref: '#/components/schemas/CompanyBankAccount'
              example:
                account:
                  accountId: 6290ccfd42831958a405debc
                  isDefault: true
                  balance:
                    total: 129430
                    blocked: 0
                    available: 129430
                    blockedBySecurity: 0
                    blockedByWithdrawSafety: 0
                  taxId: '12345678901'
                  officialName: Company Name LLC
                  tradeName: Company Trade Name
                  branch: '0001'
                  account: '123456'
                  accountName: Main Account
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account/6290ccfd42831958a405debc',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET", "/api/v1/account/6290ccfd42831958a405debc",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/account/:
    get:
      tags:
        - account
      summary: Get a list of Accounts
      x-required-scope: ACCOUNT_GET_LIST
      security:
        - AppID:
            - ACCOUNT_GET_LIST
      parameters:
        - in: query
          name: email
          description: You can use the email to filter accounts
          schema:
            type: string
          example: email0@example.com
        - in: query
          name: skip
          description: Number of items to skip for pagination
          schema:
            type: number
          example: 0
        - in: query
          name: limit
          description: Maximum number of items to return
          schema:
            type: number
          example: 10
      responses:
        '200':
          description: A list of Accounts
          content:
            application/json:
              schema:
                type: object
                properties:
                  accounts:
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyBankAccount'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
              example:
                pageInfo:
                  skip: 0
                  limit: 10
                  hasPreviousPage: false
                  hasNextPage: true
                accounts:
                  - accountId: 6290ccfd42831958a405debc
                    isDefault: true
                    balance:
                      total: 129430
                      blocked: 0
                      available: 129430
                  - accountId: 6286b467a7910113577e00ce
                    isDefault: false
                    balance:
                      total: 130
                      blocked: 100
                      available: 30
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account/?email=email0%40example.com&skip=0&limit=10',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/account/?email=email0%40example.com&skip=0&limit=10' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account/?email=email0%40example.com&skip=0&limit=10",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/account/?email=email0%40example.com&skip=0&limit=10",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account/?email=email0%40example.com&skip=0&limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account/?email=email0%40example.com&skip=0&limit=10")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/account/?email=email0%40example.com&skip=0&limit=10")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/account:
    post:
      tags:
        - account
      summary: Duplicates the Account
      description: >-
        Duplicates the account associated with the authorization appId. Requires
        the bank account feature to be enabled.
      x-required-scope: ACCOUNT_POST
      security:
        - AppID:
            - ACCOUNT_POST
      responses:
        '200':
          description: The created Account information
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: object
                    $ref: '#/components/schemas/CompanyBankAccount'
              example:
                account:
                  accountId: 6290ccfd42831958a405debc
                  isDefault: true
                  balance:
                    total: 129430
                    blocked: 0
                    available: 129430
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Bank account feature is not enabled
        '403':
          description: Forbidden - Wrong API type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Wrong API type
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/account \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/api/v1/account", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account")
              .post(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/account")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /api/v1/account-register/{id}:
    delete:
      tags:
        - account register
      summary: Delete an account registration
      description: Deletes an account registration that is in PENDING status
      x-required-scope: ACCOUNT_REGISTER_DELETE
      security:
        - AppID:
            - ACCOUNT_REGISTER_DELETE
      parameters:
        - name: correlationID
          in: path
          required: true
          description: CorrelationID of the account register to delete
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Account register successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Account register successfully deleted
                  accountRegisterId:
                    type: string
                    example: '12345678901234'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                AccountRegisterIDRequired:
                  value:
                    error: Account register ID is required
                InvalidStatus:
                  value:
                    error: Only account registers in PENDING status can be deleted
        '404':
          description: Account register not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                AccountRegisterNotFound:
                  value:
                    error: Account register not found
                DeleteFailed:
                  value:
                    error: Failed to delete account register
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples: []
  /api/v1/account-register:
    get:
      tags:
        - account register
      summary: Get account register by CorrelationID
      description: Retrieves an existing account registration by CorrelationID
      x-required-scope: ACCOUNT_REGISTER_GET
      security:
        - AppID:
            - ACCOUNT_REGISTER_GET
      parameters:
        - name: CorrelationID
          in: path
          required: true
          description: CorrelationID of the account register
          schema:
            type: string
            example: 6fe18d8e-5009-4f57-8f1d-5b084b6b83ac
      responses:
        '200':
          description: Account register found and returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  officialName:
                    type: string
                    example: Company Official Name
                  tradeName:
                    type: string
                    example: Company Trade Name
                  type:
                    type: string
                    example: BAAS
                  taxID:
                    type: object
                    properties:
                      taxID:
                        type: string
                        example: '12345678901234'
                      type:
                        type: string
                        example: BR_CNPJ
                  status:
                    type: string
                    example: PENDING
                  correlationID:
                    type: string
                    example: 6fe18d8e-5009-4f57-8f1d-5b084b6b83ac
        '400':
          description: Bad request - validation error or missing authorization
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: object
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                ValidationError:
                  value:
                    error:
                      - code: too_small
                        minimum: 1
                        type: string
                        inclusive: true
                        exact: false
                        message: Tax ID is required
                        path:
                          - taxID
        '404':
          description: Account register not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Account register not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account-register',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/account-register \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account-register",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/account-register", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account-register\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account-register")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/account-register")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /api/v1/account/{accountId}/withdraw:
    post:
      tags:
        - account
      summary: Withdraw from an Account
      description: >-
        An additional fee may be charged depending on the minimum free
        withdrawal amount. See more about at
        https://developers.openpix.com.br/docs/FAQ/faq-virtual-account/#onde-posso-consultar-as-taxas-da-minha-conta-virtual
      x-required-scope: ACCOUNT_WITHDRAW_POST
      security:
        - AppID:
            - ACCOUNT_WITHDRAW_POST
      parameters:
        - name: accountId
          in: path
          description: ID of the Account
          required: true
          schema:
            type: string
          example: 6290ccfd42831958a405debc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: number
                  description: Value in cents
            example:
              value: 7000
      responses:
        '200':
          description: Withdraw and Acccount information
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdraw:
                    type: object
                    properties:
                      account:
                        type: object
                        $ref: '#/components/schemas/CompanyBankAccount'
                      transaction:
                        type: object
                        $ref: '#/components/schemas/WithdrawTransaction'
              example:
                withdraw:
                  account:
                    accountId: 6290ccfd42831958a405debc
                    isDefault: true
                    balance:
                      total: 122430
                      blocked: 0
                      available: 122430
                  transaction:
                    endToEndId: E23114447202205191817cx6VMrbwtw6
                    transaction: 7000
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/account/6290ccfd42831958a405debc/withdraw',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc/withdraw \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc/withdraw",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/account/6290ccfd42831958a405debc/withdraw", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc/withdraw\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\"value\":0}");
            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc/withdraw")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/account/6290ccfd42831958a405debc/withdraw")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0}"


            response = http.request(request)

            puts response.read_body
  /api/v1/application:
    delete:
      tags:
        - application
      summary: Delete an application
      description: >-
        Deactivates an application by setting isActive to false and adding a
        removedAt timestamp
      x-required-scope: APPLICATION_DELETE
      security:
        - AppID:
            - APPLICATION_DELETE
      responses:
        '200':
          description: Application successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates the operation was successful
              example:
                success: true
        '400':
          description: Validation error or other client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
              examples:
                ValidationError:
                  value:
                    error: Validation error
                    details:
                      - field: clientId
                        message: Application client ID is required
                CannotDeleteMaster:
                  value:
                    error: You cannot delete a master application
        '404':
          description: Application not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Application not found
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/application',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/application \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/application",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/api/v1/application", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/application\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/application")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/application")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - application
      summary: Create a new application
      description: >
        Creates a new application for a company.

        If the company has the APPLICATION_SCOPES_REQUIRED feature enabled, the
        scopes field is required.
      x-required-scope: APPLICATION_POST
      security:
        - AppID:
            - APPLICATION_POST
      requestBody:
        description: Data to create a new application
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationPayload'
            examples:
              Application:
                value:
                  accountId: 507f1f77bcf86cd799439011
                  application:
                    name: Test API
                    type: API
              ApplicationWithScopes:
                value:
                  accountId: 507f1f77bcf86cd799439011
                  application:
                    name: Test API with Scopes
                    type: API
                    scopes:
                      - CHARGE_POST
                      - CHARGE_GET
      responses:
        '201':
          description: >
            Application successfully created.

            The response includes the scopes field when scopes are assigned to
            the application.
          content:
            application/json:
              schema:
                type: object
                properties:
                  application:
                    $ref: '#/components/schemas/Application'
              examples:
                ApplicationWithScopes:
                  summary: Application with scopes (recommended)
                  value:
                    application:
                      name: Test API with Scopes
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
                      appID: app_789ghi
                      scopes:
                        - CHARGE_POST
                        - CHARGE_GET
                ApplicationWithoutScopes:
                  summary: Application without scopes (legacy)
                  value:
                    application:
                      name: Test API
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
                      appID: app_789ghi
        '400':
          description: Validation error or other client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
              examples:
                ValidationError:
                  value:
                    error: Validation error
                    details:
                      - field: accountId
                        message: Company bank account ID is required
                InvalidScopes:
                  value:
                    error: 'Invalid scopes: INVALID_SCOPE'
                ScopesRequired:
                  value:
                    error: Scopes are required
                NoMasterApplication:
                  value:
                    error: Only MASTER application can create other application types
        '403':
          description: Forbidden - Missing required feature
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: You need feature BAAS to access this endpoint
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/application',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              accountId: 'string',
              application: {name: 'string', type: 'API', scopes: ['string']}
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/application \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"accountId":"string","application":{"name":"string","type":"API","scopes":["string"]}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/application",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'accountId' => 'string',
                'application' => [
                    'name' => 'string',
                    'type' => 'API',
                    'scopes' => [
                            'string'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"accountId\":\"string\",\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/application", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/application\"\n\n\tpayload := strings.NewReader(\"{\\\"accountId\\\":\\\"string\\\",\\\"application\\\":{\\\"name\\\":\\\"string\\\",\\\"type\\\":\\\"API\\\",\\\"scopes\\\":[\\\"string\\\"]}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"accountId\":\"string\",\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/application")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/application")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"accountId\":\"string\",\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/cashback-fidelity/balance/{taxID}:
    get:
      tags:
        - cashback-fidelity
      summary: Get the exclusive cashback amount an user still has to receive by taxID.
      x-required-scope: CASHBACK_FIDELITY_BALANCE_GET
      security:
        - AppID:
            - CASHBACK_FIDELITY_BALANCE_GET
      parameters:
        - name: taxID
          in: path
          description: The raw tax ID from the customer you want to get the balance.
          required: true
          schema:
            type: string
          examples:
            taxID:
              value: '60151449000182'
      responses:
        '200':
          description: Amount the user still has to receive.
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance:
                    type: number
                  status:
                    type: string
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/cashback-fidelity/balance/60151449000182',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/cashback-fidelity/balance/60151449000182 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/cashback-fidelity/balance/60151449000182",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/cashback-fidelity/balance/60151449000182", headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/cashback-fidelity/balance/60151449000182\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/cashback-fidelity/balance/60151449000182")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/cashback-fidelity/balance/60151449000182")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/cashback-fidelity:
    post:
      tags:
        - cashback-fidelity
      summary: Get or create cashback for a customer.
      description: >-
        Create a new cashback exclusive for the customer with a given taxID. If
        the customer already has a pending excluisve cashback, this endpoint
        will return it instead.
      x-required-scope: CASHBACK_FIDELITY_POST
      security:
        - AppID:
            - CASHBACK_FIDELITY_POST
      requestBody:
        description: Customer's taxID and the cash
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                taxID:
                  type: string
                  description: Customer taxID (CPF or CNPJ)
                value:
                  type: number
                  description: Cashback value in centavos
            example:
              value: 100
              taxID: 11111111111
      responses:
        '200':
          description: >-
            Didn't create a new cashback, returning previously existing cashback
            information instead.
          content:
            application/json:
              schema:
                type: object
                properties:
                  cashback:
                    description: Object representing the existing cashback
                    type: object
                    properties:
                      value:
                        type: number
                        description: Cashback value in centavos
                  message:
                    type: string
                    description: String explaining what happened
        '201':
          description: New cashback created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  cashback:
                    description: Object representing the new cashback
                    type: object
                    properties:
                      value:
                        type: number
                        description: Cashback value in centavos
                  message:
                    type: string
                    description: String explaining what happened
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/cashback-fidelity',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({taxID: 'string', value: 0}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/cashback-fidelity \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"taxID":"string","value":0}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/cashback-fidelity",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'taxID' => 'string',
                'value' => 0
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            payload = "{\"taxID\":\"string\",\"value\":0}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }

            conn.request("POST", "/api/v1/cashback-fidelity", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/cashback-fidelity\"\n\n\tpayload := strings.NewReader(\"{\\\"taxID\\\":\\\"string\\\",\\\"value\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"taxID\":\"string\",\"value\":0}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/cashback-fidelity")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/cashback-fidelity")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
            request["content-type"] = 'application/json'
            request.body = "{\"taxID\":\"string\",\"value\":0}"

            response = http.request(request)
            puts response.read_body
  /openpix/charge/brcode/image/{id}.png:
    get:
      tags:
        - charge
      summary: Get an image of Qr Code from a Charge
      x-required-scope: CHARGE_IMAGE_GET
      security:
        - AppID:
            - CHARGE_IMAGE_GET
      parameters:
        - in: path
          name: id
          description: charge link payment ID
          required: true
          schema:
            type: string
          examples:
            paymentLinkID:
              value: fe7834b4060c488a9b0f89811be5f5cf
        - in: query
          name: size
          description: >-
            Size for the image. This size should be between 600 and 4096. if the
            size parameter was not passed, the default value will be 1024.
          required: false
          schema:
            type: string
          examples:
            size:
              value: 768
      responses:
        '200':
          description: The Qr Code image as MIME type
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png?size=768")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/image/qrcode/base64/{id}:
    get:
      tags:
        - charge
      summary: Get a base64 encoded QR Code image from a Charge
      x-required-scope: CHARGE_BRCODE_IMAGE_GET
      security:
        - AppID:
            - CHARGE_BRCODE_IMAGE_GET
      parameters:
        - in: path
          name: id
          description: charge ID, payment link ID, or QR code ID
          required: true
          schema:
            type: string
          examples:
            paymentLinkID:
              value: fe7834b4060c488a9b0f89811be5f5cf
        - in: query
          name: size
          description: >-
            Size for the image. This size should be between 600 and 4096. If the
            size parameter is not passed, the default value will be 1024.
          required: false
          schema:
            type: string
          examples:
            size:
              value: 768
      responses:
        '200':
          description: The QR Code image as base64 string
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  imageBase64:
                    type: string
                    description: Base64 encoded PNG image with data URL format
                    example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to generate QR code
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/image/qrcode/base64/fe7834b4060c488a9b0f89811be5f5cf?size=768")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/charge/{id}:
    delete:
      tags:
        - charge
      summary: Delete a charge
      x-required-scope: CHARGE_DELETE
      security:
        - AppID:
            - CHARGE_DELETE
      parameters:
        - name: id
          in: path
          description: >-
            charge ID or correlation ID. You will need URI encoding if your
            correlation ID has characters outside the ASCII set or reserved
            characters (%, \#, /).
          required: true
          schema:
            type: string
          examples:
            chargeId:
              value: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: The charge deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  id:
                    type: string
                    description: the id previously informed to be found and deleted
                example:
                  status: OK
                  id: fe7834b4060c488a9b0f89811be5f5cf
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA== \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("DELETE",
            "/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Delete.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    patch:
      tags:
        - charge
      summary: Edit expiration date of a charge
      x-required-scope: CHARGE_PATCH
      security:
        - AppID:
            - CHARGE_PATCH
      parameters:
        - name: id
          in: path
          description: >-
            correlation ID. You will need URI encoding if your correlation ID
            has characters outside the ASCII set or reserved characters (%, \#,
            /).
          required: true
          schema:
            type: string
          examples:
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      requestBody:
        description: Expires date to update charge
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/ChargePatchPayload'
            example:
              expiresDate: '2021-04-01T17:28:51.882Z'
      responses:
        '200':
          description: The charge was updated to new expiration date
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  id:
                    type: string
                    description: the id previously informed to be found and deleted
                  expiresDate:
                    type: string
                    description: new date to expire specfic charge
                example:
                  charge:
                    status: ACTIVE
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    expiresIn: 2592000
                    expiresDate: '2021-04-01T17:28:51.882Z'
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    additionalInfo:
                      - key: Product
                        value: Pencil
                      - key: Invoice
                        value: '18476'
                      - key: Order
                        value: '302'
                    paymentMethods:
                      pix:
                        method: PIX_COB
                        transactionID: 9134e286-6f71-427a-bf00-241681624586
                        identifier: 9134e286-6f71-427a-bf00-241681624586
                        additionalInfo: []
                        fee: 50
                        value: 200
                        status: ACTIVE
                        txId: 9134e286-6f71-427a-bf00-241681624586
                        brCode: >-
                          000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                          Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                        qrCodeImage: >-
                          https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'PATCH',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({expiresDate: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request PATCH \
              --url https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"expiresDate":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PATCH",
              CURLOPT_POSTFIELDS => json_encode([
                'expiresDate' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"expiresDate\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PATCH",
            "/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf\"\n\n\tpayload := strings.NewReader(\"{\\\"expiresDate\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"expiresDate\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf")
              .patch(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Patch.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"expiresDate\":\"string\"}"


            response = http.request(request)

            puts response.read_body
    get:
      tags:
        - charge
      summary: Get one charge
      x-required-scope: CHARGE_GET
      security:
        - AppID:
            - CHARGE_GET
      parameters:
        - name: id
          in: path
          description: >-
            charge ID or correlation ID. You will need URI encoding if your
            correlation ID has characters outside the ASCII set or reserved
            characters (%, \#, /).
          required: true
          schema:
            type: string
          example: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: The charge retrieve using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  charge:
                    type: object
                    $ref: '#/components/schemas/Charge'
                example:
                  charge:
                    status: ACTIVE
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    paymentLinkID: 7777-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    globalID: Q2hhcmdlOjcxOTFmMWIwMjA0NmJmNWY1M2RjZmEwYg==
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    additionalInfo:
                      - key: Product
                        value: Pencil
                      - key: Invoice
                        value: '18476'
                      - key: Order
                        value: '302'
                    expiresIn: 2592000
                    expiresDate: '2021-04-01T17:28:51.882Z'
                    dueDate: '2021-04-01T17:28:51.882Z'
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
                    paymentMethods:
                      pix:
                        method: PIX_COB
                        transactionID: 9134e286-6f71-427a-bf00-241681624586
                        identifier: 9134e286-6f71-427a-bf00-241681624586
                        additionalInfo: []
                        fee: 50
                        value: 200
                        status: ACTIVE
                        txId: 9134e286-6f71-427a-bf00-241681624586
                        brCode: >-
                          000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                          Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                        qrCodeImage: >-
                          https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf", headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge/fe7834b4060c488a9b0f89811be5f5cf")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/charge:
    get:
      tags:
        - charge
      summary: Get a list of charges
      x-required-scope: CHARGE_GET_LIST
      security:
        - AppID:
            - CHARGE_GET_LIST
      parameters:
        - in: query
          name: start
          schema:
            type: string
            format: date-time
            title: Start Date
            description: Start date used in the query. Complies with RFC 3339.
            example: '2020-01-01T00:00:00Z'
        - in: query
          name: end
          schema:
            type: string
            format: date-time
            title: End Date
            description: End date used in the query. Complies with RFC 3339.
            example: '2020-12-01T17:00:00Z'
        - name: status
          in: query
          schema:
            type: string
            enum:
              - ACTIVE
              - COMPLETED
              - EXPIRED
        - name: customer
          description: Customer Correlation ID
          in: query
          schema:
            type: string
        - name: subscription
          description: Subscription Correlation ID
          in: query
          schema:
            type: string
      responses:
        '200':
          description: A list of charges
          content:
            application/json:
              schema:
                type: object
                properties:
                  charges:
                    type: array
                    items:
                      $ref: '#/components/schemas/Charge'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
                  charges:
                    status: ACTIVE
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    additionalInfo:
                      - key: Product
                        value: Pencil
                      - key: Invoice
                        value: '18476'
                      - key: Order
                        value: '302'
                    expiresIn: 2592000
                    expiresDate: '2021-04-01T17:28:51.882Z'
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
                    paymentMethods:
                      pix:
                        method: PIX_COB
                        transactionID: 9134e286-6f71-427a-bf00-241681624586
                        identifier: 9134e286-6f71-427a-bf00-241681624586
                        additionalInfo: []
                        fee: 50
                        value: 200
                        status: ACTIVE
                        txId: 9134e286-6f71-427a-bf00-241681624586
                        brCode: >-
                          000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                          Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                        qrCodeImage: >-
                          https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&status=SOME_STRING_VALUE&customer=SOME_STRING_VALUE&subscription=SOME_STRING_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    post:
      tags:
        - charge
      summary: Create a new Charge
      x-required-scope: CHARGE_POST
      security:
        - AppID:
            - CHARGE_POST
      parameters:
        - in: query
          name: return_existing
          description: >-
            Make the endpoint idempotent, will return an existent charge if
            already has a one with the correlationID
          required: false
          schema:
            type: boolean
          examples:
            return_existing:
              value: true
      description: Endpoint to create a new Charge for a customer
      requestBody:
        description: Data to create a new charge
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/ChargePayload'
            examples:
              Charge:
                value:
                  correlationID: 9134e286-6f71-427a-bf00-241681624587
                  value: 100
                  comment: good
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                  additionalInfo:
                    - key: Product
                      value: Pencil
                    - key: Invoice
                      value: '18476'
                    - key: Order
                      value: '302'
              Charge with Interests and Fines:
                value:
                  type: OVERDUE
                  correlationID: 9134e286-6f71-427a-bf00-241681624587
                  value: 100
                  comment: good
                  daysForDueDate: 5
                  daysAfterDueDate: 5
                  interests:
                    value: 10
                    type: PERCENTAGE
                  fines:
                    value: 20
                    type: FIXED
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                    address:
                      zipcode: '30421322'
                      street: Street
                      number: '100'
                      neighborhood: Neighborhood
                      city: Belo Horizonte
                      state: MG
                      complement: APTO
                      country: BR
                  additionalInfo:
                    - key: Product
                      value: Pencil
                    - key: Invoice
                      value: '18476'
                    - key: Order
                      value: '302'
              Charge with Discount (fixed-date modality):
                value:
                  type: OVERDUE
                  correlationID: 9134e286-6f71-427a-bf00-241681624587
                  value: 1600
                  comment: good
                  daysForDueDate: 10
                  daysAfterDueDate: 5
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                  discountSettings:
                    modality: FIXED_VALUE_UNTIL_SPECIFIED_DATE
                    discountFixedDate:
                      - daysActive: 5
                        value: 100
                      - daysActive: 8
                        value: 50
              Charge with Discount (percentage fixed-date modality):
                value:
                  type: OVERDUE
                  correlationID: 9134e286-6f71-427a-bf00-241681624588
                  value: 10000
                  comment: 5% off if paid in 5 days, 2% off if paid in 10 days
                  daysForDueDate: 30
                  daysAfterDueDate: 15
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                  discountSettings:
                    modality: PERCENTAGE_UNTIL_SPECIFIED_DATE
                    discountFixedDate:
                      - daysActive: 5
                        value: 500
                      - daysActive: 10
                        value: 200
              Charge with Discount (advance-day modality):
                value:
                  type: OVERDUE
                  correlationID: 9134e286-6f71-427a-bf00-241681624589
                  value: 10000
                  comment: 0.10% off per running day until due
                  daysForDueDate: 10
                  daysAfterDueDate: 5
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                  discountSettings:
                    modality: PERCENTAGE_PER_RUNNING_DAY_ADVANCE
                    value: 10
                  interests:
                    value: 100
                  fines:
                    value: 200
                    type: PERCENTAGE
              Charge with Split Internal Transfer:
                value:
                  correlationID: 9134e286-6f71-427a-bf00-241681624587
                  value: 100
                  comment: good
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                    address:
                      zipcode: '30421322'
                      street: Street
                      number: '100'
                      neighborhood: Neighborhood
                      city: Belo Horizonte
                      state: MG
                      complement: APTO
                      country: BR
                  additionalInfo:
                    - key: Product
                      value: Pencil
                    - key: Invoice
                      value: '18476'
                    - key: Order
                      value: '302'
                  splits:
                    - value: 10
                      pixKey: 676bd1f8-93cb-4354-b094-5587179d56ad
              Charge with Split Subaccounts:
                value:
                  correlationID: 9134e286-6f71-427a-bf00-241681624587
                  value: 100
                  comment: good
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                    address:
                      zipcode: '30421322'
                      street: Street
                      number: '100'
                      neighborhood: Neighborhood
                      city: Belo Horizonte
                      state: MG
                      complement: APTO
                      country: BR
                  additionalInfo:
                    - key: Product
                      value: Pencil
                    - key: Invoice
                      value: '18476'
                    - key: Order
                      value: '302'
                  splits:
                    - value: 10
                      pixKey: 676bd1f8-93cb-4354-b094-5587179d56ad
                      splitType: SPLIT_SUB_ACCOUNT
      responses:
        '200':
          description: >-
            Charge ID and also the generated Dynamic BR Code to be rendered as a
            QRCode
          content:
            application/json:
              schema:
                type: object
                properties:
                  charge:
                    $ref: '#/components/schemas/Charge'
                  correlationID:
                    type: string
                  brCode:
                    type: string
                example:
                  charge:
                    status: ACTIVE
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    expiresIn: 2592000
                    expiresDate: '2021-09-01T17:28:51.882Z'
                    dueDate: '2021-04-01T17:28:51.882Z'
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    additionalInfo:
                      - key: Product
                        value: Pencil
                      - key: Invoice
                        value: '18476'
                      - key: Order
                        value: '302'
                    paymentMethods:
                      pix:
                        method: PIX_COB
                        transactionID: 9134e286-6f71-427a-bf00-241681624586
                        identifier: 9134e286-6f71-427a-bf00-241681624586
                        additionalInfo: []
                        fee: 50
                        value: 200
                        status: ACTIVE
                        txId: 9134e286-6f71-427a-bf00-241681624586
                        brCode: >-
                          000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                          Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                        qrCodeImage: >-
                          https://api.woovi.com/openpix/charge/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge?return_existing=true',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              correlationID: 'string',
              value: 0,
              type: 'DYNAMIC',
              comment: 'string',
              expiresIn: 0,
              expiresDate: 'string',
              dueDate: 'string',
              customer: {
                name: 'string',
                email: 'string',
                phone: 'string',
                taxID: 'string',
                correlationID: 'string',
                address: {
                  zipcode: 'string',
                  street: 'string',
                  number: 'string',
                  neighborhood: 'string',
                  city: 'string',
                  state: 'string',
                  complement: 'string',
                  country: 'string'
                }
              },
              ensureSameTaxID: true,
              fixedLocation: true,
              paymentLinkID: 'string',
              daysForDueDate: 0,
              daysAfterDueDate: 0,
              interests: {value: 0, type: 'FIXED'},
              fines: {value: 0, type: 'FIXED'},
              discountSettings: {
                modality: 'FIXED_VALUE_UNTIL_SPECIFIED_DATE',
                discountFixedDate: [{daysActive: 1, value: 0}],
                value: 1
              },
              additionalInfo: [{key: 'string', value: 'string'}],
              enableCashbackPercentage: true,
              enableCashbackExclusivePercentage: true,
              subaccount: 'string',
              splits: [{value: 0, pixKey: 'string', splitType: 'SPLIT_INTERNAL_TRANSFER'}]
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url 'https://api.openpix.com.br/api/v1/charge?return_existing=true' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationID":"string","value":0,"type":"DYNAMIC","comment":"string","expiresIn":0,"expiresDate":"string","dueDate":"string","customer":{"name":"string","email":"string","phone":"string","taxID":"string","correlationID":"string","address":{"zipcode":"string","street":"string","number":"string","neighborhood":"string","city":"string","state":"string","complement":"string","country":"string"}},"ensureSameTaxID":true,"fixedLocation":true,"paymentLinkID":"string","daysForDueDate":0,"daysAfterDueDate":0,"interests":{"value":0,"type":"FIXED"},"fines":{"value":0,"type":"FIXED"},"discountSettings":{"modality":"FIXED_VALUE_UNTIL_SPECIFIED_DATE","discountFixedDate":[{"daysActive":1,"value":0}],"value":1},"additionalInfo":[{"key":"string","value":"string"}],"enableCashbackPercentage":true,"enableCashbackExclusivePercentage":true,"subaccount":"string","splits":[{"value":0,"pixKey":"string","splitType":"SPLIT_INTERNAL_TRANSFER"}]}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge?return_existing=true",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'correlationID' => 'string',
                'value' => 0,
                'type' => 'DYNAMIC',
                'comment' => 'string',
                'expiresIn' => 0,
                'expiresDate' => 'string',
                'dueDate' => 'string',
                'customer' => [
                    'name' => 'string',
                    'email' => 'string',
                    'phone' => 'string',
                    'taxID' => 'string',
                    'correlationID' => 'string',
                    'address' => [
                            'zipcode' => 'string',
                            'street' => 'string',
                            'number' => 'string',
                            'neighborhood' => 'string',
                            'city' => 'string',
                            'state' => 'string',
                            'complement' => 'string',
                            'country' => 'string'
                    ]
                ],
                'ensureSameTaxID' => null,
                'fixedLocation' => null,
                'paymentLinkID' => 'string',
                'daysForDueDate' => 0,
                'daysAfterDueDate' => 0,
                'interests' => [
                    'value' => 0,
                    'type' => 'FIXED'
                ],
                'fines' => [
                    'value' => 0,
                    'type' => 'FIXED'
                ],
                'discountSettings' => [
                    'modality' => 'FIXED_VALUE_UNTIL_SPECIFIED_DATE',
                    'discountFixedDate' => [
                            [
                                            'daysActive' => 1,
                                            'value' => 0
                            ]
                    ],
                    'value' => 1
                ],
                'additionalInfo' => [
                    [
                            'key' => 'string',
                            'value' => 'string'
                    ]
                ],
                'enableCashbackPercentage' => null,
                'enableCashbackExclusivePercentage' => null,
                'subaccount' => 'string',
                'splits' => [
                    [
                            'value' => 0,
                            'pixKey' => 'string',
                            'splitType' => 'SPLIT_INTERNAL_TRANSFER'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"correlationID\":\"string\",\"value\":0,\"type\":\"DYNAMIC\",\"comment\":\"string\",\"expiresIn\":0,\"expiresDate\":\"string\",\"dueDate\":\"string\",\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"ensureSameTaxID\":true,\"fixedLocation\":true,\"paymentLinkID\":\"string\",\"daysForDueDate\":0,\"daysAfterDueDate\":0,\"interests\":{\"value\":0,\"type\":\"FIXED\"},\"fines\":{\"value\":0,\"type\":\"FIXED\"},\"discountSettings\":{\"modality\":\"FIXED_VALUE_UNTIL_SPECIFIED_DATE\",\"discountFixedDate\":[{\"daysActive\":1,\"value\":0}],\"value\":1},\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"enableCashbackPercentage\":true,\"enableCashbackExclusivePercentage\":true,\"subaccount\":\"string\",\"splits\":[{\"value\":0,\"pixKey\":\"string\",\"splitType\":\"SPLIT_INTERNAL_TRANSFER\"}]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/charge?return_existing=true", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge?return_existing=true\"\n\n\tpayload := strings.NewReader(\"{\\\"correlationID\\\":\\\"string\\\",\\\"value\\\":0,\\\"type\\\":\\\"DYNAMIC\\\",\\\"comment\\\":\\\"string\\\",\\\"expiresIn\\\":0,\\\"expiresDate\\\":\\\"string\\\",\\\"dueDate\\\":\\\"string\\\",\\\"customer\\\":{\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"taxID\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"address\\\":{\\\"zipcode\\\":\\\"string\\\",\\\"street\\\":\\\"string\\\",\\\"number\\\":\\\"string\\\",\\\"neighborhood\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"complement\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\"}},\\\"ensureSameTaxID\\\":true,\\\"fixedLocation\\\":true,\\\"paymentLinkID\\\":\\\"string\\\",\\\"daysForDueDate\\\":0,\\\"daysAfterDueDate\\\":0,\\\"interests\\\":{\\\"value\\\":0,\\\"type\\\":\\\"FIXED\\\"},\\\"fines\\\":{\\\"value\\\":0,\\\"type\\\":\\\"FIXED\\\"},\\\"discountSettings\\\":{\\\"modality\\\":\\\"FIXED_VALUE_UNTIL_SPECIFIED_DATE\\\",\\\"discountFixedDate\\\":[{\\\"daysActive\\\":1,\\\"value\\\":0}],\\\"value\\\":1},\\\"additionalInfo\\\":[{\\\"key\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"enableCashbackPercentage\\\":true,\\\"enableCashbackExclusivePercentage\\\":true,\\\"subaccount\\\":\\\"string\\\",\\\"splits\\\":[{\\\"value\\\":0,\\\"pixKey\\\":\\\"string\\\",\\\"splitType\\\":\\\"SPLIT_INTERNAL_TRANSFER\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"correlationID\":\"string\",\"value\":0,\"type\":\"DYNAMIC\",\"comment\":\"string\",\"expiresIn\":0,\"expiresDate\":\"string\",\"dueDate\":\"string\",\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"ensureSameTaxID\":true,\"fixedLocation\":true,\"paymentLinkID\":\"string\",\"daysForDueDate\":0,\"daysAfterDueDate\":0,\"interests\":{\"value\":0,\"type\":\"FIXED\"},\"fines\":{\"value\":0,\"type\":\"FIXED\"},\"discountSettings\":{\"modality\":\"FIXED_VALUE_UNTIL_SPECIFIED_DATE\",\"discountFixedDate\":[{\"daysActive\":1,\"value\":0}],\"value\":1},\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"enableCashbackPercentage\":true,\"enableCashbackExclusivePercentage\":true,\"subaccount\":\"string\",\"splits\":[{\"value\":0,\"pixKey\":\"string\",\"splitType\":\"SPLIT_INTERNAL_TRANSFER\"}]}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge?return_existing=true")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge?return_existing=true")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"correlationID\":\"string\",\"value\":0,\"type\":\"DYNAMIC\",\"comment\":\"string\",\"expiresIn\":0,\"expiresDate\":\"string\",\"dueDate\":\"string\",\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"ensureSameTaxID\":true,\"fixedLocation\":true,\"paymentLinkID\":\"string\",\"daysForDueDate\":0,\"daysAfterDueDate\":0,\"interests\":{\"value\":0,\"type\":\"FIXED\"},\"fines\":{\"value\":0,\"type\":\"FIXED\"},\"discountSettings\":{\"modality\":\"FIXED_VALUE_UNTIL_SPECIFIED_DATE\",\"discountFixedDate\":[{\"daysActive\":1,\"value\":0}],\"value\":1},\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"enableCashbackPercentage\":true,\"enableCashbackExclusivePercentage\":true,\"subaccount\":\"string\",\"splits\":[{\"value\":0,\"pixKey\":\"string\",\"splitType\":\"SPLIT_INTERNAL_TRANSFER\"}]}"


            response = http.request(request)

            puts response.read_body
  /api/v1/charge/{id}/refund:
    get:
      tags:
        - charge refund
      summary: Get all refunds of a charge
      description: Endpoint to get all refunds of a charge
      x-required-scope: CHARGE_REFUND_GET_LIST
      security:
        - AppID:
            - CHARGE_REFUND_GET_LIST
      parameters:
        - name: id
          in: path
          description: >-
            The correlation ID of the charge. You will need URI encoding if your
            correlation ID has characters outside the ASCII set or reserved
            characters (%, \#, /).
          required: true
          schema:
            type: string
          examples:
            uuid:
              value: cf4012c9-b2ac-484d-8121-deedd1c6d8af
            random-string:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: A list of refunds
          content:
            application/json:
              schema:
                type: object
                properties:
                  refunds:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChargeRefund'
                example:
                  refunds:
                    - status: IN_PROCESSING
                      value: 10
                      correlationID: 9134e286-6f71-427a-bf00-241681624586
                      endToEndId: E23114447202304181826HJNwY577YDX
                      time: '2021-03-02T17:28:51.882Z'
                    - status: CONFIRMED
                      value: 40
                      correlationID: 589a378e-ab45-4f30-bd4d-4496c60f88cf
                      endToEndId: E23114447202304181057pOhPMsp2pJZ
                      time: '2021-03-05T14:49:02.922Z'
                      comment: Comentário do reembolso
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    post:
      tags:
        - charge refund
      summary: Create a new refund for a charge
      description: Endpoint to create a new refund for a charge
      x-required-scope: CHARGE_REFUND_POST
      security:
        - AppID:
            - CHARGE_REFUND_POST
      parameters:
        - name: id
          in: path
          description: >-
            The correlation ID of the charge. You will need URI encoding if your
            correlation ID has characters outside the ASCII set or reserved
            characters (%, \#, /).
          required: true
          schema:
            type: string
          examples:
            uuid:
              value: cf4012c9-b2ac-484d-8121-deedd1c6d8af
            random-string:
              value: fe7834b4060c488a9b0f89811be5f5cf
      requestBody:
        description: Data to create a new refund for a charge
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/ChargeRefundPayload'
            example:
              correlationID: a273e72c-9547-4c75-a213-3b0a2735b8d5
              value: 100
              comment: Comentário do reembolso
      responses:
        '200':
          description: The created Refund
          content:
            application/json:
              schema:
                type: object
                properties:
                  refund:
                    $ref: '#/components/schemas/ChargeRefund'
                example:
                  refund:
                    status: IN_PROCESSING
                    value: 100
                    correlationID: a273e72c-9547-4c75-a213-3b0a2735b8d5
                    endToEndId: E23114447202304181826HJNwY577YDX
                    time: '2023-03-02T17:28:51.882Z'
                    comment: Comentário do reembolso
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: >-
            const http = require('https');


            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({correlationID: 'string', value: 0,
            comment: 'string'}));

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationID":"string","value":0,"comment":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'correlationID' => 'string',
                'value' => 0,
                'comment' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund\"\n\n\tpayload := strings.NewReader(\"{\\\"correlationID\\\":\\\"string\\\",\\\"value\\\":0,\\\"comment\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/charge/cf4012c9-b2ac-484d-8121-deedd1c6d8af/refund")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/company:
    get:
      tags:
        - company
      summary: Get a Company
      x-required-scope: COMPANY_GET
      security:
        - AppID:
            - COMPANY_GET
      responses:
        '200':
          description: The Company retrieved from the application ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      officialName:
                        type: string
                      tradeName:
                        type: string
                      taxID:
                        type: string
                      correlationID:
                        type: string
              example:
                company:
                  officialName: Company Official Name
                  tradeName: Company Trade Name
                  taxID: '12345678901234'
                  correlationID: corr-123456
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/company',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/company \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/company",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/company", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/company\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/company")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/company")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /api/v1/customer/{id}:
    get:
      tags:
        - customer
      summary: Get one customer
      x-required-scope: CUSTOMER_GET
      security:
        - AppID:
            - CUSTOMER_GET
      parameters:
        - name: id
          in: path
          description: Correlation ID or Tax ID
          required: true
          schema:
            type: string
          examples:
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
            taxID:
              value: 123456789
      responses:
        '200':
          description: The customer retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    $ref: '#/components/schemas/Customer'
                example:
                  customer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    correlationID: fe7834b4060c488a9b0f89811be5f5cf
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/customer:
    get:
      tags:
        - customer
      summary: Get a list of customers
      x-required-scope: CUSTOMER_GET_LIST
      security:
        - AppID:
            - CUSTOMER_GET_LIST
      responses:
        '200':
          description: A list of customers
          content:
            application/json:
              schema:
                type: object
                properties:
                  customers:
                    type: array
                    items:
                      $ref: '#/components/schemas/Customer'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
                  customers:
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/customer',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/customer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/customer",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/customer", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/customer\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/customer")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/customer")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - customer
      summary: Create a new Customer
      description: Endpoint to create a new Customer
      x-required-scope: CUSTOMER_POST
      security:
        - AppID:
            - CUSTOMER_POST
      requestBody:
        description: Data to create a new customer
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/CustomerPayload'
            example:
              name: Dan
              taxID: '31324227036'
              email: email0@example.com
              phone: '5511999999999'
              correlationID: 9134e286-6f71-427a-bf00-241681624586
              address:
                zipcode: '30421322'
                street: Street
                number: '100'
                neighborhood: Neighborhood
                city: Belo Horizonte
                state: MG
                complement: APTO
                country: BR
      responses:
        '200':
          description: Customer ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    $ref: '#/components/schemas/Customer'
                example:
                  customer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    address:
                      zipcode: '30421322'
                      street: Street
                      number: '100'
                      neighborhood: Neighborhood
                      city: Belo Horizonte
                      state: MG
                      complement: APTO
                      country: BR
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/customer',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              email: 'string',
              phone: 'string',
              taxID: 'string',
              correlationID: 'string',
              address: {
                zipcode: 'string',
                street: 'string',
                number: 'string',
                neighborhood: 'string',
                city: 'string',
                state: 'string',
                complement: 'string',
                country: 'string'
              }
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/customer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","email":"string","phone":"string","taxID":"string","correlationID":"string","address":{"zipcode":"string","street":"string","number":"string","neighborhood":"string","city":"string","state":"string","complement":"string","country":"string"}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/customer",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'name' => 'string',
                'email' => 'string',
                'phone' => 'string',
                'taxID' => 'string',
                'correlationID' => 'string',
                'address' => [
                    'zipcode' => 'string',
                    'street' => 'string',
                    'number' => 'string',
                    'neighborhood' => 'string',
                    'city' => 'string',
                    'state' => 'string',
                    'complement' => 'string',
                    'country' => 'string'
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/customer", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/customer\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"taxID\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"address\\\":{\\\"zipcode\\\":\\\"string\\\",\\\"street\\\":\\\"string\\\",\\\"number\\\":\\\"string\\\",\\\"neighborhood\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"complement\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\"}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/customer")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/customer")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"correlationID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/customer/{correlationID}:
    patch:
      tags:
        - customer
      summary: Update a Customer
      x-required-scope: CUSTOMER_PATCH
      security:
        - AppID:
            - CUSTOMER_PATCH
      parameters:
        - name: correlationID
          in: path
          description: correlation ID
          required: true
          schema:
            type: string
          examples:
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      description: Endpoint to update a Customer
      requestBody:
        description: Data to update a existent customer
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/CustomerPatchPayload'
            example:
              name: Dan
              email: email0@example.com
              phone: '5511999999999'
              address:
                zipcode: '30421322'
                street: Street
                number: '100'
                neighborhood: Neighborhood
                city: Belo Horizonte
                state: MG
                complement: APTO
                country: BR
      responses:
        '200':
          description: Customer ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    $ref: '#/components/schemas/Customer'
                example:
                  customer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    address:
                      zipcode: '30421322'
                      street: Street
                      number: '100'
                      neighborhood: Neighborhood
                      city: Belo Horizonte
                      state: MG
                      complement: APTO
                      country: BR
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'PATCH',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              email: 'string',
              phone: 'string',
              taxID: 'string',
              address: {
                zipcode: 'string',
                street: 'string',
                number: 'string',
                neighborhood: 'string',
                city: 'string',
                state: 'string',
                complement: 'string',
                country: 'string'
              }
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request PATCH \
              --url https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","email":"string","phone":"string","taxID":"string","address":{"zipcode":"string","street":"string","number":"string","neighborhood":"string","city":"string","state":"string","complement":"string","country":"string"}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PATCH",
              CURLOPT_POSTFIELDS => json_encode([
                'name' => 'string',
                'email' => 'string',
                'phone' => 'string',
                'taxID' => 'string',
                'address' => [
                    'zipcode' => 'string',
                    'street' => 'string',
                    'number' => 'string',
                    'neighborhood' => 'string',
                    'city' => 'string',
                    'state' => 'string',
                    'complement' => 'string',
                    'country' => 'string'
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PATCH",
            "/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"taxID\\\":\\\"string\\\",\\\"address\\\":{\\\"zipcode\\\":\\\"string\\\",\\\"street\\\":\\\"string\\\",\\\"number\\\":\\\"string\\\",\\\"neighborhood\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"complement\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\"}}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf")
              .patch(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/customer/fe7834b4060c488a9b0f89811be5f5cf")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Patch.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/decode/emv:
    post:
      tags:
        - decode
      summary: Parse EMV (PIX) QR code and optionally resolve COB/REC locations
      x-required-scope: DECODE_EMV_POST
      security:
        - AppID:
            - DECODE_EMV_POST
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - emv
              properties:
                emv:
                  type: string
                  description: Raw EMV / PIX QR payload (text)
                  example: >-
                    00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486
      responses:
        '200':
          description: >-
            Parsed EMV payload with resolved COB and/or REC location (when
            available)
          content:
            application/json:
              schema:
                type: object
                properties:
                  emv:
                    type: object
                    properties:
                      payloadFormatIndicator:
                        type: string
                      pointOfInitiationMethod:
                        type: string
                        description: Present when EMV indicates a dynamic QR (e.g. "12")
                      merchantAccountInformationPix:
                        type: object
                        description: Parsed "26"/"00"... Pix merchant account info
                        properties:
                          gui:
                            type: string
                          pixKey:
                            type: string
                            description: UUID or key when Pix key present
                          url:
                            type: string
                            description: URL when location points to a COB/REC resource
                          additionalInformation:
                            type: string
                      merchantCategoryCode:
                        type: string
                      transactionCurrency:
                        type: string
                      transactionAmount:
                        type: string
                      countryCode:
                        type: string
                      merchantName:
                        type: string
                      merchantCity:
                        type: string
                      additionalDataFieldTemplate:
                        type: object
                        properties:
                          referenceLabel:
                            type: string
                      unreservedTemplates:
                        type: object
                        properties:
                          gui:
                            type: string
                          url:
                            type: string
                      crc:
                        type: string
                  cobLocation:
                    nullable: true
                    type: object
                    description: >-
                      Resolved COB (charge) location details when the EMV points
                      to a COB endpoint
                    properties:
                      isValid:
                        type: boolean
                      locationErrors:
                        type: array
                        items:
                          type: string
                      payload:
                        type: object
                        properties:
                          calendar:
                            type: object
                            properties:
                              presentation:
                                type: string
                                format: date-time
                              expiration:
                                type: integer
                              creation:
                                type: string
                                format: date-time
                          key:
                            type: string
                          debtor:
                            type: object
                            properties:
                              cpf:
                                type: string
                              name:
                                type: string
                          additionalInfo:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                value:
                                  type: string
                          revision:
                            type: integer
                          status:
                            type: string
                          txid:
                            type: string
                          value:
                            type: object
                            properties:
                              original:
                                type: string
                      url:
                        type: string
                  recLocation:
                    nullable: true
                    type: object
                    description: >-
                      Resolved REC (request for payment) location details when
                      EMV points to a REC endpoint
                    properties:
                      isValid:
                        type: boolean
                      locationErrors:
                        type: array
                        items:
                          type: string
                      payload:
                        type: object
                        properties:
                          updates:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  format: date-time
                                status:
                                  type: string
                          calendar:
                            type: object
                            properties:
                              startDate:
                                type: string
                                format: date
                              periodicity:
                                type: string
                          idRec:
                            type: string
                          retryPolicy:
                            type: string
                          receiver:
                            type: object
                            properties:
                              cnpj:
                                type: string
                              participantIspb:
                                type: string
                              name:
                                type: string
                          value:
                            type: object
                            properties:
                              valueRec:
                                type: string
                          link:
                            type: object
                            properties:
                              contract:
                                type: string
                              debtor:
                                type: object
                                properties:
                                  cpf:
                                    type: string
                                  name:
                                    type: string
                      url:
                        type: string
              examples:
                parsedWithRecLocation:
                  summary: EMV parsed and REC location resolved
                  value:
                    emv:
                      payloadFormatIndicator: '01'
                      merchantAccountInformationPix:
                        gui: br.gov.bcb.pix
                        pixKey: f4c6089a-bfde-4c00-a2d9-9eaa584b0219
                        additionalInformation: CobrancaEstatica
                      merchantCategoryCode: '0000'
                      transactionCurrency: '986'
                      transactionAmount: '546.28'
                      countryCode: BR
                      merchantName: Pix
                      merchantCity: BRASILIA
                      additionalDataFieldTemplate:
                        referenceLabel: 84767c56c2ab4e65b6670de2a
                      unreservedTemplates:
                        gui: br.gov.bcb.pix
                        url: >-
                          qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf0788691
                      crc: '4486'
                    cobLocation: null
                    recLocation:
                      isValid: true
                      locationErrors: []
                      payload:
                        updates:
                          - date: '2025-10-24T18:42:58Z'
                            status: CRIADA
                        calendar:
                          startDate: '2025-10-24'
                          periodicity: SEMANAL
                        idRec: RN5481141720251024BnwNHejs9h9
                        retryPolicy: NAO_PERMITE
                        receiver:
                          cnpj: '44720743000101'
                          participantIspb: '54811417'
                          name: Woovi Demo
                        value:
                          valueRec: '0.01'
                        link:
                          contract: Woovi Demo - Pix Automático
                          debtor:
                            cpf: '15775023706'
                            name: Pedro Cliente
                      url: >-
                        qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf0788691
                parsedWithCobLocation:
                  summary: EMV parsed and COB location resolved
                  value:
                    emv:
                      payloadFormatIndicator: '01'
                      pointOfInitiationMethod: '12'
                      merchantAccountInformationPix:
                        gui: br.gov.bcb.pix
                        url: >-
                          qr-h.woovi.digital/qr/v2/cob/fb274322-221c-43d4-b58b-fab36d87c75c
                      merchantCategoryCode: '0000'
                      transactionCurrency: '986'
                      transactionAmount: '10.00'
                      countryCode: BR
                      merchantName: sibeliusip
                      merchantCity: Sao_Paulo
                      additionalDataFieldTemplate:
                        referenceLabel: fb274322-221c-43d4-b58b-f
                      crc: 0C98
                    cobLocation:
                      isValid: true
                      locationErrors: []
                      payload:
                        calendar:
                          presentation: '2025-02-25T13:27:54.168Z'
                          expiration: 86400
                          creation: '2025-02-12T16:59:22.939Z'
                        key: 4004901d-bd85-4769-8e52-cb4c42c506dc
                        debtor:
                          cpf: '62550186362'
                          name: Fulano de Tal
                        additionalInfo:
                          - name: Entrega
                            value: Residencial
                        revision: 0
                        status: ATIVA
                        txid: d71a2ffd7a7b468eba993cef83428583
                        value:
                          original: '120.58'
                      url: >-
                        qr-h.woovi.digital/qr/v2/cob/fb274322-221c-43d4-b58b-fab36d87c75c
                    recLocation: null
        '400':
          description: Bad request — invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Invalid EMV payload
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error occurred
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/decode/emv',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              emv: '00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486'
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/decode/emv \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"emv":"00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/decode/emv",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'emv' => '00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"emv\":\"00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/decode/emv", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/decode/emv\"\n\n\tpayload := strings.NewReader(\"{\\\"emv\\\":\\\"00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"emv\":\"00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/decode/emv")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/decode/emv")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"emv\":\"00020126780014br.gov.bcb.pix0136f4c6089a-bfde-4c00-a2d9-9eaa584b02190216CobrancaEstatica5204000053039865406546.285802BR5903Pix6008BRASILIA6229052584767c56c2ab4e65b6670de2a80950014br.gov.bcb.pix2573qr-h.sandbox.pix.bcb.gov.br/rest/api/rec/4b62d4a088fe4f51bcb4c64cf078869163044486\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/dispute/:id/evidence:
    post:
      tags:
        - dispute
      summary: Upload new evidence
      description: >-
        Upload evidence files for dispute/med. \nOBS para obter esse o id da
        disputa, veja esse artigo
        https://developers.woovi.com/docs/disputa/how-add-new-evidence-in-dispute#1-obter-o-id-da-disputa
      x-required-scope: DISPUTE_POST
      security:
        - AppID:
            - DISPUTE_POST
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                documents:
                  type: array
                  description: documents for upload
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: Document url
                        minLength: 1
                      correlationID:
                        type: string
                        description: Id used by the client
                      description:
                        type: string
      responses:
        '200':
          description: The created Account information
          content:
            application/json:
              schema:
                type: object
                properties:
                  documents:
                    type: array
                    description: documents for upload
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          example: http://www.url.com
                          description: Document url
                          minLength: 1
                        correlationID:
                          type: string
                          example: id123456789
                          description: Id used by the client
                        description:
                          type: string
                          example: description for my document
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: You cannot send a evidence for a accepted dispute
      x-codeSamples:
        - lang: Node + Native
          source: >-
            const http = require('https');


            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/dispute/:id/evidence',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({documents: [{url: 'string', correlationID:
            'string', description: 'string'}]}));

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/dispute/:id/evidence \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"documents":[{"url":"string","correlationID":"string","description":"string"}]}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/dispute/:id/evidence",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'documents' => [
                    [
                            'url' => 'string',
                            'correlationID' => 'string',
                            'description' => 'string'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"documents\":[{\"url\":\"string\",\"correlationID\":\"string\",\"description\":\"string\"}]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/dispute/:id/evidence", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/dispute/:id/evidence\"\n\n\tpayload := strings.NewReader(\"{\\\"documents\\\":[{\\\"url\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"documents\":[{\"url\":\"string\",\"correlationID\":\"string\",\"description\":\"string\"}]}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/dispute/:id/evidence")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/dispute/:id/evidence")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"documents\":[{\"url\":\"string\",\"correlationID\":\"string\",\"description\":\"string\"}]}"


            response = http.request(request)

            puts response.read_body
  /api/v1/dispute/{id}:
    get:
      tags:
        - dispute
      summary: Get one dispute
      x-required-scope: DISPUTE_GET
      security:
        - AppID:
            - DISPUTE_GET
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: >-
            The id must be the endToEndId of the transaction that originated the
            Dispute
          example: Ea9c291526ae54b4cb41d9909bdf6d792
      responses:
        '200':
          description: The dispute retrieve using endToEndId
          content:
            application/json:
              schema:
                type: object
                properties:
                  dispute:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - CREATED
                          - ACCEPTED
                          - REJECTED
                          - CANCELED
                      name:
                        type: string
                        description: The name of the payer who created this dispute.
                      email:
                        type: string
                        description: The Email of the payer who created this dispute.
                      phoneNumber:
                        type: string
                        description: >-
                          The phone number of the payer who created this
                          dispute.
                      value:
                        type: string
                        description: The value of the dispute.
                      disputeReason:
                        type: string
                        description: Reason provided to justify the dispute.
                      endToEndId:
                        description: >-
                          The endToEndId of the dispute (Is the same of the
                          endToEndId transaction related).
                        type: string
                      type:
                        type: string
                        enum:
                          - MED
                          - DISPUTE
                          - CHARGEBACK
                        description: The type of the dispute
              example:
                dispute:
                  status: ACCEPTED
                  name: John Doe
                  email: john.doe@example.com
                  phoneNumber: '+5511999999999'
                  value: 10000
                  disputeReason: Product not received
                  endToEndId: Ea9c291526ae54b4cb41d9909bdf6d792
                  type: MED
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Dispute not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error occurred
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/dispute/Ea9c291526ae54b4cb41d9909bdf6d792")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/dispute:
    get:
      tags:
        - dispute
      summary: Get a list of disputes
      x-required-scope: DISPUTE_GET_LIST
      security:
        - AppID:
            - DISPUTE_GET_LIST
      parameters:
        - in: query
          name: start
          schema:
            type: string
            format: date-time
            title: Start Date
            description: Start date used in the query. Complies with RFC 3339.
            example: '2020-01-01T00:00:00Z'
        - in: query
          name: end
          schema:
            type: string
            format: date-time
            title: End Date
            description: End date used in the query. Complies with RFC 3339.
            example: '2020-12-01T17:00:00Z'
      responses:
        '200':
          description: A list of disputes
          content:
            application/json:
              schema:
                type: object
                properties:
                  disputes:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/Dispute'
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - MED
                                - CHARGEBACK
                              description: The type of the dispute
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
                  disputes:
                    - disputeReason: Dispute reason test
                      email: jorge@test.com
                      name: Seu Jorge
                      phoneNumber: '+551199999999'
                      status: IN_REVIEW
                      value: 100
                      createdAt: '2021-03-02T17:28:51.882Z'
                      updatedAt: '2021-03-02T17:28:51.882Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/dispute?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/installments/{id}/cobr:
    post:
      tags:
        - CobR
      summary: Create a new Cobr Manually
      description: Create a new Cobr Manually.
      parameters:
        - name: id
          in: path
          description: The globalID of the installment.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      requestBody:
        description: Data to create a new Cobr
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: number
                  description: Valor da cobrança (Opcional)
      responses:
        '200':
          description: The subscription created
          content:
            application/json:
              schema:
                type: object
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\"value\":0}");
            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0}"


            response = http.request(request)

            puts response.read_body
  /api/v1/installments/{id}/cobr/retry:
    post:
      tags:
        - CobR
      summary: Create a new Retry Manually
      description: Create a new Retry Manually.
      parameters:
        - name: id
          in: path
          description: The globalID of the installment.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      requestBody:
        description: Data to create a new Cobr
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: number
                  description: Valor da cobrança (Opcional)
      responses:
        '200':
          description: The subscription created
          content:
            application/json:
              schema:
                type: object
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\"value\":0}");
            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cobr/retry")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0}"


            response = http.request(request)

            puts response.read_body
  /api/v1/installments/{id}:
    get:
      tags:
        - subscription
      summary: Get one installment
      parameters:
        - name: id
          in: path
          description: The globalID of the installment or the endToEndId from transaction.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      responses:
        '200':
          description: The installment retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  installment:
                    $ref: '#/components/schemas/Installment'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM= \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/installments/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subscriptions/{id}/installments:
    get:
      tags:
        - subscription
      summary: Get a list of installments by subscription
      parameters:
        - name: id
          in: path
          description: The globalID of the subscription.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      responses:
        '200':
          description: A list of installments
          content:
            application/json:
              schema:
                type: object
                properties:
                  installments:
                    type: array
                    items:
                      $ref: '#/components/schemas/Installment'
                  pageInfo:
                    type: object
                    $ref: '#/components/schemas/Pagination'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/installments")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/invoice/{correlationID}/cancel:
    post:
      tags:
        - invoice
      summary: Cancel an invoice
      parameters:
        - in: path
          name: correlationID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invoice canceled successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                ok:
                  value:
                    success: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                notConfirmed:
                  value:
                    error: Cannot cancel a not confirmed invoice
                cancelError:
                  value:
                    error: Unable to cancel invoice
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Forbidden - Missing required feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingFeature:
                  value:
                    error: You need feature Invoice to access this endpoint
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                invoiceNotFound:
                  value:
                    error: Invoice not found
                integrationNotFound:
                  value:
                    error: Integration not found
      x-codeSamples: []
  /api/v1/invoice:
    get:
      tags:
        - invoice
      summary: Get invoices
      parameters:
        - in: query
          name: start
          schema:
            type: string
          example: '2021-01-01'
        - in: query
          name: end
          schema:
            type: string
          example: '2021-01-01'
        - in: query
          name: skip
          schema:
            type: number
          example: 0
        - in: query
          name: limit
          schema:
            type: number
          example: 100
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              examples:
                ok:
                  value:
                    invoices:
                      - id: 67001bbf0b0621890af7dc28
                        value: 500
                        date: '2024-10-04T16:45:51.058Z'
                        billingDate: '2024-10-04T16:45:51.058Z'
                        status: CONFIRMED
                        statusRaw: null
                        correlationID: INV-123
                        customer:
                          correlationID: 6f46c15a-f471-4d54-bb28-207fe2568f69
                          name: Gabriel
                        charge:
                          correlationID: 0c2df47d-4a90-4ef2-b04a-1f8673f1dbdd
                          value: 500
                          status: COMPLETED
                          paidAt: '2024-10-04T16:44:18.000Z'
                          date: '2024-10-04T16:43:20.931Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingIntegration:
                  value:
                    error: You need to configure the invoice integration
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Your Authorization APP_ID must be configured to be MASTER or API
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingIntegration:
                  value:
                    error: You need to configure the invoice integration
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/invoice?start=2021-01-01&end=2021-01-01&skip=0&limit=100")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    post:
      tags:
        - invoice
      summary: Create a new invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                billingDate:
                  type: string
                  format: date-time
                correlationID:
                  type: string
                charge:
                  type: string
                value:
                  type: number
                customerId:
                  type: string
                customer:
                  type: object
                  properties:
                    taxID:
                      type: string
                    name:
                      type: string
                    email:
                      type: string
                      format: email
                    phone:
                      type: string
                    address:
                      type: object
                      properties:
                        country:
                          type: string
                        zipcode:
                          type: string
                        street:
                          type: string
                        number:
                          type: string
                        state:
                          type: string
                      required:
                        - country
                        - zipcode
                        - street
                        - number
                        - state
                  required:
                    - taxID
                    - name
                    - email
                    - phone
                    - address
              oneOf:
                - required:
                    - billingDate
                    - value
                    - correlationID
                - required:
                    - billingDate
                    - charge
                    - correlationID
      responses:
        '201':
          description: Invoice created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice:
                    type: object
                    properties:
                      id:
                        type: string
                      value:
                        type: number
                      date:
                        type: string
                        format: date-time
                      billingDate:
                        type: string
                        format: date-time
                      status:
                        type: string
                      statusRaw:
                        type: string
                        nullable: true
                      customer:
                        type: object
                        properties:
                          correlationID:
                            type: string
                          name:
                            type: string
                      charge:
                        type: object
                        properties:
                          correlationID:
                            type: string
                          value:
                            type: number
                          status:
                            type: string
                          paidAt:
                            type: string
                            format: date-time
                          date:
                            type: string
                            format: date-time
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                missingIntegration:
                  value:
                    error: You need to configure the invoice integration
                invalidCustomer:
                  value:
                    error: Customer not found
                customerNotCreated:
                  value:
                    error: Customer not created
                invalidAddress:
                  value:
                    error: Customer address is invalid
                chargeNotFound:
                  value:
                    error: Charge not found
                validationError:
                  value:
                    error: Validation error
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Forbidden - Missing required feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingIntegration:
                  value:
                    error: You need to configure the invoice integration
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/invoice',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              description: 'string',
              billingDate: '2019-08-24T14:15:22Z',
              correlationID: 'string',
              charge: 'string',
              value: 0,
              customerId: 'string',
              customer: {
                taxID: 'string',
                name: 'string',
                email: 'user@example.com',
                phone: 'string',
                address: {
                  country: 'string',
                  zipcode: 'string',
                  street: 'string',
                  number: 'string',
                  state: 'string'
                }
              }
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/invoice \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"description":"string","billingDate":"2019-08-24T14:15:22Z","correlationID":"string","charge":"string","value":0,"customerId":"string","customer":{"taxID":"string","name":"string","email":"user@example.com","phone":"string","address":{"country":"string","zipcode":"string","street":"string","number":"string","state":"string"}}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/invoice",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'description' => 'string',
                'billingDate' => '2019-08-24T14:15:22Z',
                'correlationID' => 'string',
                'charge' => 'string',
                'value' => 0,
                'customerId' => 'string',
                'customer' => [
                    'taxID' => 'string',
                    'name' => 'string',
                    'email' => 'user@example.com',
                    'phone' => 'string',
                    'address' => [
                            'country' => 'string',
                            'zipcode' => 'string',
                            'street' => 'string',
                            'number' => 'string',
                            'state' => 'string'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"description\":\"string\",\"billingDate\":\"2019-08-24T14:15:22Z\",\"correlationID\":\"string\",\"charge\":\"string\",\"value\":0,\"customerId\":\"string\",\"customer\":{\"taxID\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"address\":{\"country\":\"string\",\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"state\":\"string\"}}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/invoice", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/invoice\"\n\n\tpayload := strings.NewReader(\"{\\\"description\\\":\\\"string\\\",\\\"billingDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"correlationID\\\":\\\"string\\\",\\\"charge\\\":\\\"string\\\",\\\"value\\\":0,\\\"customerId\\\":\\\"string\\\",\\\"customer\\\":{\\\"taxID\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"phone\\\":\\\"string\\\",\\\"address\\\":{\\\"country\\\":\\\"string\\\",\\\"zipcode\\\":\\\"string\\\",\\\"street\\\":\\\"string\\\",\\\"number\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\"}}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"description\":\"string\",\"billingDate\":\"2019-08-24T14:15:22Z\",\"correlationID\":\"string\",\"charge\":\"string\",\"value\":0,\"customerId\":\"string\",\"customer\":{\"taxID\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"address\":{\"country\":\"string\",\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"state\":\"string\"}}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/invoice")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/invoice")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"description\":\"string\",\"billingDate\":\"2019-08-24T14:15:22Z\",\"correlationID\":\"string\",\"charge\":\"string\",\"value\":0,\"customerId\":\"string\",\"customer\":{\"taxID\":\"string\",\"name\":\"string\",\"email\":\"user@example.com\",\"phone\":\"string\",\"address\":{\"country\":\"string\",\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"state\":\"string\"}}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/invoice/{correlationID}/pdf:
    get:
      tags:
        - invoice
      summary: Get invoice PDF document
      parameters:
        - in: path
          name: correlationID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: PDF file
          headers:
            Content-Disposition:
              schema:
                type: string
              example: inline; filename="invoice.pdf"
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Forbidden - Missing required feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingFeature:
                  value:
                    error: You need feature Invoice to access this endpoint
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                notFound:
                  value:
                    error: Invoice not found
        '500':
          description: Internal error while generating documents
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                documentError:
                  value:
                    error: Error while getting invoice documents
      x-codeSamples: []
  /api/v1/invoice/{correlationID}/xml:
    get:
      tags:
        - invoice
      summary: Get invoice XML document
      parameters:
        - in: path
          name: correlationID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: XML file
          headers:
            Content-Disposition:
              schema:
                type: string
              example: inline; filename="invoice.xml"
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Forbidden - Missing required feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingFeature:
                  value:
                    error: You need feature Invoice to access this endpoint
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                notFound:
                  value:
                    error: Invoice not found
        '500':
          description: Internal error while generating documents
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                documentError:
                  value:
                    error: Error while getting invoice documents
      x-codeSamples: []
  /api/v1/kyc/onboarding:
    post:
      tags:
        - kyc
      summary: Create a KYC onboarding
      description: >
        Creates a new KYC onboarding for a merchant. Returns a link that should
        be sent

        to the merchant so they can fill in their registration data.


        The API is idempotent by `correlationID`. If the same `correlationID` is
        sent again

        for the same company, the API returns the existing onboarding link (200
        OK) instead

        of creating a new one.


        The fields `officialName`, `tradeName` and `representatives[].name` are
        automatically

        populated via data enrichment when available. You do not need to send
        them in the request.


        If `redirectUrl` is provided, the merchant is automatically redirected
        to that URL

        5 seconds after completing the onboarding flow (terminal states:
        submitted, approved,

        or rejected). The `redirectUrl` is bound to the onboarding link at
        creation time and

        cannot be changed later — subsequent idempotent calls will return the
        original value.
      security:
        - AppID: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KycOnboardingRequest'
            examples:
              MinimalRequest:
                summary: Minimal request with only taxID
                value:
                  taxID: XX.XXX.XXX/0001-XX
              WithCorrelationID:
                summary: Request with correlationID for idempotency
                value:
                  taxID: XX.XXX.XXX/0001-XX
                  correlationID: my-unique-id
              WithRedirectUrl:
                summary: Request with redirectUrl for post-onboarding redirect
                value:
                  taxID: XX.XXX.XXX/0001-XX
                  correlationID: my-unique-id
                  redirectUrl: https://partner.example.com/kyc-done
              WithRepresentatives:
                summary: Full request with representatives
                value:
                  taxID: XX.XXX.XXX/0001-XX
                  correlationID: my-unique-id
                  representatives:
                    - taxID: XXX.XXX.XXX-XX
                    - taxID: XXX.XXX.XXX-XX
      responses:
        '200':
          description: Onboarding already exists for this correlationID (idempotent)
          content:
            application/json:
              schema:
                type: object
                properties:
                  linkOnboarding:
                    type: string
                    example: >-
                      https://kyc.woovi.com/onboarding/QWNjb3VudFJlZ2lzdGVyOjY5...
                  redirectUrl:
                    type: string
                    nullable: true
                    description: >-
                      URL para redirecionamento pos-onboarding (echo do valor
                      enviado na criacao do link).
                    example: https://partner.example.com/kyc-done
                  accountRegister:
                    $ref: '#/components/schemas/KycOnboardingAccountRegister'
        '201':
          description: Onboarding created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  linkOnboarding:
                    type: string
                    example: >-
                      https://kyc.woovi.com/onboarding/QWNjb3VudFJlZ2lzdGVyOjY5...
                  redirectUrl:
                    type: string
                    nullable: true
                    description: >-
                      URL para redirecionamento pos-onboarding (echo do valor
                      enviado).
                    example: https://partner.example.com/kyc-done
                  accountRegister:
                    $ref: '#/components/schemas/KycOnboardingAccountRegister'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingTaxID:
                  value:
                    error: 'Invalid input: taxID: Required'
                InvalidCNPJ:
                  value:
                    error: Invalid CNPJ
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Invalid Authorization header
        '403':
          description: >-
            Company does not have required features enabled (BAAS and
            KYC_ONBOARDING_LINK)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingBaaS:
                  value:
                    error: Company does not have BaaS feature enabled
                MissingKycOnboardingLink:
                  value:
                    error: Company does not have KYC Onboarding Link feature enabled
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/kyc/onboarding',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              taxID: 'string',
              correlationID: 'string',
              redirectUrl: 'https://partner.example.com/kyc-done',
              representatives: [{taxID: 'string', name: 'string'}]
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/kyc/onboarding \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"taxID":"string","correlationID":"string","redirectUrl":"https://partner.example.com/kyc-done","representatives":[{"taxID":"string","name":"string"}]}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/kyc/onboarding",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'taxID' => 'string',
                'correlationID' => 'string',
                'redirectUrl' => 'https://partner.example.com/kyc-done',
                'representatives' => [
                    [
                            'taxID' => 'string',
                            'name' => 'string'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"taxID\":\"string\",\"correlationID\":\"string\",\"redirectUrl\":\"https://partner.example.com/kyc-done\",\"representatives\":[{\"taxID\":\"string\",\"name\":\"string\"}]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/kyc/onboarding", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/kyc/onboarding\"\n\n\tpayload := strings.NewReader(\"{\\\"taxID\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"redirectUrl\\\":\\\"https://partner.example.com/kyc-done\\\",\\\"representatives\\\":[{\\\"taxID\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"taxID\":\"string\",\"correlationID\":\"string\",\"redirectUrl\":\"https://partner.example.com/kyc-done\",\"representatives\":[{\"taxID\":\"string\",\"name\":\"string\"}]}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/kyc/onboarding")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/kyc/onboarding")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"taxID\":\"string\",\"correlationID\":\"string\",\"redirectUrl\":\"https://partner.example.com/kyc-done\",\"representatives\":[{\"taxID\":\"string\",\"name\":\"string\"}]}"


            response = http.request(request)

            puts response.read_body
  /api/v1/limits/{accountId}:
    get:
      tags:
        - account limits
      summary: Get account limits
      description: >
        Retrieves the most recent account limits configured for a given bank
        account.

        Only the public-safe fields are returned; internal-only fields are
        stripped from the response.
      x-required-scope: ACCOUNT_LIMITS_GET
      security:
        - AppID:
            - ACCOUNT_LIMITS_GET
      parameters:
        - name: accountId
          in: path
          description: >-
            Bank account identifier (ObjectId) for which limits should be
            returned
          required: true
          schema:
            type: string
          examples:
            accountId:
              value: 65f1c2e9a1b2c3d4e5f60718
      responses:
        '200':
          description: Account limits returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  limits:
                    $ref: '#/components/schemas/AccountLimit'
                example:
                  limits:
                    pixDayLimit: 4000000
                    pixNightLimit: 100000
                    pixOutSameHolderDayLimit: 4000000
                    pixOutDifferentHolderDayLimit: 4000000
                    pixOutSameHolderNightLimit: 100000
                    pixOutDifferentHolderNightLimit: 100000
                    pixInSameHolderDayLimit: 100000000
                    pixInDifferentHolderDayLimit: 100000000
                    pixInSameHolderNightLimit: 100000000
                    pixInDifferentHolderNightLimit: 100000000
                    dayStartAt: '06:00'
                    nightStartAt: '20:00'
                    boletoEmissionLimit: 200
                    boletoMaximumValueLimit: 1000000
        '400':
          description: Invalid account identifier
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Account ID is invalid
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    nullable: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
              example:
                data: null
                errors:
                  - message: Invalid appID
        '403':
          description: >-
            Application is missing the required scope or the company does not
            have the public limits API enabled
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingScope:
                  value:
                    error: >-
                      Application does not have required scope:
                      ACCOUNT_LIMITS_GET
                FeatureDisabled:
                  value:
                    error: API not allowed
        '404':
          description: >-
            Account does not belong to the requesting company or has no limit
            configured
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                AccountNotFound:
                  value:
                    error: Account not found
                NoLimits:
                  value:
                    error: No limits configured for this account
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/limits/65f1c2e9a1b2c3d4e5f60718',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/limits/65f1c2e9a1b2c3d4e5f60718 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/limits/65f1c2e9a1b2c3d4e5f60718",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET", "/api/v1/limits/65f1c2e9a1b2c3d4e5f60718",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/limits/65f1c2e9a1b2c3d4e5f60718\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/limits/65f1c2e9a1b2c3d4e5f60718")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/limits/65f1c2e9a1b2c3d4e5f60718")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/partner/application:
    post:
      tags:
        - partner (request access)
      summary: Create a new application to some of your preregistration's company.
      description: >
        As a partner company, you can create a new application to some of your
        companies.

        The application should give access to our API to this companies, so they
        can use

        it too.
      x-required-scope: PARTNER_APPLICATION_POST
      security:
        - AppID:
            - PARTNER_APPLICATION_POST
      requestBody:
        description: The request body to create a pre registration.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                application:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The name you want to give your application
                    type:
                      $ref: '#/components/schemas/ApplicationEnumTypePayload'
                    scopes:
                      type: array
                      items:
                        type: string
                      description: >-
                        List of scopes to assign to the application. When
                        provided, checkScopes will be enabled automatically.
                  required:
                    - name
                    - type
                taxID:
                  $ref: '#/components/schemas/TaxIDObjectPayload'
                  required:
                    - taxID
                    - type
            examples:
              ApplicationWithScopes:
                summary: Application with scopes (recommended)
                value:
                  application:
                    name: MyAPIAccessWithScopes
                    type: API
                    scopes:
                      - CHARGE_POST
                      - CHARGE_GET
                  taxID:
                    taxID: '65914571000187'
                    type: BR:CNPJ
              ApplicationWithoutScopes:
                summary: Application without scopes (legacy)
                value:
                  application:
                    name: MyAPIAccess
                    type: API
                  taxID:
                    taxID: '65914571000187'
                    type: BR:CNPJ
      responses:
        '200':
          description: >
            Our "idempotence output", if you get this HTTP code, it's an
            application

            that already has been registered.

            The response includes the scopes field when scopes are assigned to
            the application.
          content:
            application/json:
              schema:
                type: object
                properties:
                  application:
                    $ref: '#/components/schemas/PartnerApplicationPayload'
              examples:
                ApplicationWithScopes:
                  summary: Application with scopes (recommended)
                  value:
                    application:
                      name: MyAPIAccessWithScopes
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
                      scopes:
                        - CHARGE_POST
                        - CHARGE_GET
                ApplicationWithoutScopes:
                  summary: Application without scopes (legacy)
                  value:
                    application:
                      name: MyAPIAccess
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
        '201':
          description: >
            A new application has been registered. It'll be identified by the
            name that you give to it

            and by the company that has been referenced.

            The response includes the scopes field when scopes are assigned to
            the application.
          content:
            application/json:
              schema:
                type: object
                properties:
                  application:
                    $ref: '#/components/schemas/PartnerApplicationPayload'
              examples:
                ApplicationWithScopes:
                  summary: Application with scopes (recommended)
                  value:
                    application:
                      name: MyAPIAccessWithScopes
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
                      scopes:
                        - CHARGE_POST
                        - CHARGE_GET
                ApplicationWithoutScopes:
                  summary: Application without scopes (legacy)
                  value:
                    application:
                      name: MyAPIAccess
                      isActive: true
                      type: API
                      clientId: client_123abc
                      clientSecret: secret_456def
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '403':
          description: You are unauthorized to use this endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/partner/application',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              application: {name: 'string', type: 'API', scopes: ['string']},
              taxID: {taxID: 'string', type: 'BR:CNPJ'}
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/partner/application \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"application":{"name":"string","type":"API","scopes":["string"]},"taxID":{"taxID":"string","type":"BR:CNPJ"}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/partner/application",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'application' => [
                    'name' => 'string',
                    'type' => 'API',
                    'scopes' => [
                            'string'
                    ]
                ],
                'taxID' => [
                    'taxID' => 'string',
                    'type' => 'BR:CNPJ'
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]},\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/partner/application", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/partner/application\"\n\n\tpayload := strings.NewReader(\"{\\\"application\\\":{\\\"name\\\":\\\"string\\\",\\\"type\\\":\\\"API\\\",\\\"scopes\\\":[\\\"string\\\"]},\\\"taxID\\\":{\\\"taxID\\\":\\\"string\\\",\\\"type\\\":\\\"BR:CNPJ\\\"}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]},\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/partner/application")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/partner/application")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"application\":{\"name\":\"string\",\"type\":\"API\",\"scopes\":[\"string\"]},\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/partner/company/{taxID}:
    get:
      tags:
        - partner (request access)
      summary: Get an specific preregistration via taxID param.
      x-required-scope: PARTNER_COMPANY_GET
      security:
        - AppID:
            - PARTNER_COMPANY_GET
      parameters:
        - name: taxID
          in: path
          description: The raw tax ID from the preregistration that you want to get.
          required: true
          schema:
            type: string
          examples:
            taxID:
              value: '60151449000182'
      responses:
        '200':
          description: The preregistration retrieved by the tax ID.
          content:
            application/json:
              schema:
                type: object
                properties:
                  preRegistration:
                    type: object
                    properties:
                      preRegistration:
                        $ref: '#/components/schemas/PreRegistrationObjectPayload'
                      user:
                        $ref: '#/components/schemas/PreRegistrationUserObject'
                      company:
                        $ref: '#/components/schemas/CompanyObjectPayload'
                      account:
                        $ref: '#/components/schemas/AccountObjectPayload'
                    required:
                      - preRegistration
                      - user
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/partner/company/60151449000182',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/partner/company/60151449000182 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/partner/company/60151449000182",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET", "/api/v1/partner/company/60151449000182",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/partner/company/60151449000182\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/partner/company/60151449000182")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/partner/company/60151449000182")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/partner/company:
    get:
      tags:
        - partner (request access)
      summary: Get every preregistration that is managed by you.
      x-required-scope: PARTNER_COMPANY_GET_LIST
      security:
        - AppID:
            - PARTNER_COMPANY_GET_LIST
      responses:
        '200':
          description: A list with preregistrations.
          content:
            application/json:
              schema:
                type: object
                properties:
                  preRegistrations:
                    type: array
                    items:
                      type: object
                      properties:
                        preRegistration:
                          $ref: '#/components/schemas/PreRegistrationObjectPayload'
                        user:
                          $ref: '#/components/schemas/PreRegistrationUserObject'
                        company:
                          $ref: '#/components/schemas/CompanyObjectPayload'
                        account:
                          $ref: '#/components/schemas/AccountObjectPayload'
                      required:
                        - preRegistration
                        - user
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/partner/company',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/partner/company \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/partner/company",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/partner/company", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/partner/company\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/partner/company")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/partner/company")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - partner (request access)
      summary: Create a pre registration with a partner reference (your company)
      description: >
        As a partner company, you can create a new pre registration referencing
        your

        company as a partner.
      x-required-scope: PARTNER_COMPANY_POST
      security:
        - AppID:
            - PARTNER_COMPANY_POST
      requestBody:
        description: The request body to create a pre registration.
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/PreRegistrationPayloadObject'
            example:
              preRegistration:
                name: Example LLC
                taxID:
                  taxID: '11111111111111'
                  type: BR:CNPJ
                website: examplellc.com
              user:
                firstName: John
                lastName: Doe
                email: johndoe@examplellc.com
                phone: '+5511912345678'
                taxID:
                  taxID: '1111111111'
                  type: BR:CPF
      responses:
        '200':
          description: >
            Payload with a pre registration data.

            Being the taxID our idempotence key, if you do the request with the
            same taxID multiple times,

            every time you'll receive the same data from our endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRegistrationPayloadObject'
        '201':
          description: A new preregistration that is related to you has been created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRegistrationPayloadObject'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '403':
          description: You are unauthorized to use this endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/partner/company',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              preRegistration: {name: 'string', website: 'string', taxID: {taxID: 'string', type: 'BR:CNPJ'}},
              user: {
                firstName: 'string',
                lastName: 'string',
                email: 'string',
                phone: 'string',
                taxID: {taxID: 'string', type: 'BR:CNPJ'}
              }
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/partner/company \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"preRegistration":{"name":"string","website":"string","taxID":{"taxID":"string","type":"BR:CNPJ"}},"user":{"firstName":"string","lastName":"string","email":"string","phone":"string","taxID":{"taxID":"string","type":"BR:CNPJ"}}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/partner/company",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'preRegistration' => [
                    'name' => 'string',
                    'website' => 'string',
                    'taxID' => [
                            'taxID' => 'string',
                            'type' => 'BR:CNPJ'
                    ]
                ],
                'user' => [
                    'firstName' => 'string',
                    'lastName' => 'string',
                    'email' => 'string',
                    'phone' => 'string',
                    'taxID' => [
                            'taxID' => 'string',
                            'type' => 'BR:CNPJ'
                    ]
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"preRegistration\":{\"name\":\"string\",\"website\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}},\"user\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/partner/company", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/partner/company\"\n\n\tpayload := strings.NewReader(\"{\\\"preRegistration\\\":{\\\"name\\\":\\\"string\\\",\\\"website\\\":\\\"string\\\",\\\"taxID\\\":{\\\"taxID\\\":\\\"string\\\",\\\"type\\\":\\\"BR:CNPJ\\\"}},\\\"user\\\":{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"taxID\\\":{\\\"taxID\\\":\\\"string\\\",\\\"type\\\":\\\"BR:CNPJ\\\"}}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"preRegistration\":{\"name\":\"string\",\"website\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}},\"user\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/partner/company")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/partner/company")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"preRegistration\":{\"name\":\"string\",\"website\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}},\"user\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":{\"taxID\":\"string\",\"type\":\"BR:CNPJ\"}}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/payment/approve:
    post:
      tags:
        - payment (request access)
      summary: Approve a Payment Request
      x-required-scope: PAYMENT_APPROVE_POST
      security:
        - AppID:
            - PAYMENT_APPROVE_POST
      description: Endpoint to approve a payment
      requestBody:
        description: Data to approve a payment request
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/PaymentApprovePayload'
            example:
              correlationID: payment1
      responses:
        '200':
          description: The approved payment
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment:
                    type: object
                    $ref: '#/components/schemas/Payment'
                  transaction:
                    type: object
                    $ref: '#/components/schemas/PaymentTransaction'
                  destination:
                    type: object
                    $ref: '#/components/schemas/PaymentDestination'
                example:
                  payment:
                    value: 100
                    status: APPROVED
                    destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                    comment: payment comment
                    correlationID: payment1
                  transaction:
                    value: 100
                    endToEndId: transaction-end-to-end-id
                    time: '2023-03-20T13:14:17.000Z'
                  destination:
                    name: Dan
                    taxID: '31324227036'
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                    bank: A Bank
                    branch: '1'
                    account: '123456'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/payment/approve',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({correlationID: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/payment/approve \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"correlationID":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/payment/approve",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'correlationID' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            payload = "{\"correlationID\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }

            conn.request("POST", "/api/v1/payment/approve", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/payment/approve\"\n\n\tpayload := strings.NewReader(\"{\\\"correlationID\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"correlationID\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/payment/approve")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/payment/approve")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
            request["content-type"] = 'application/json'
            request.body = "{\"correlationID\":\"string\"}"

            response = http.request(request)
            puts response.read_body
  /api/v1/payment/{id}:
    get:
      tags:
        - payment (request access)
      summary: Get one Payment
      x-required-scope: PAYMENT_GET
      security:
        - AppID:
            - PAYMENT_GET
      parameters:
        - name: id
          in: path
          description: payment ID or correlation ID
          required: true
          schema:
            type: string
          examples:
            paymentID:
              value: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: The payment retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment:
                    type: object
                    $ref: '#/components/schemas/Payment'
                  transaction:
                    type: object
                    $ref: '#/components/schemas/PaymentTransaction'
                  destination:
                    type: object
                    $ref: '#/components/schemas/PaymentDestination'
                example:
                  payment:
                    value: 100
                    status: CONFIRMED
                    destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                    comment: payment comment
                    correlationID: payment1
                    sourceAccountId: my-source-account-id
                  transaction:
                    value: 100
                    endToEndId: transaction-end-to-end-id
                    debitParty:
                      account:
                        branch: '0001'
                        account: '00000000000000023280'
                        accountType: TRAN
                      psp:
                        id: '123456'
                        name: COMPANY DEBIT LTDA
                        code: '123456789'
                      holder:
                        name: name holder
                        nameFriendly: name friendly holder
                      taxID:
                        taxID: '1212345600198'
                        type: BR:CNPJ
                    creditParty:
                      pixKey:
                        pixKey: email@email.com.br
                        type: EMAIL
                      account:
                        branch: '0001'
                        account: '00000000000000012345'
                        accountType: TRAN
                      psp:
                        id: '123456'
                        name: COMPANY CREDIT LTDA
                      holder:
                        name: name holder
                        nameFriendly: name friendly
                        taxID:
                          taxID: '00123456000199'
                          type: BR:CNPJ
                    time: '2023-03-20T13:14:17.000Z'
                  destination:
                    name: Dan
                    taxID: '31324227036'
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                    bank: A Bank
                    branch: '1'
                    account: '123456'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA== \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/payment/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/payment:
    get:
      tags:
        - payment (request access)
      summary: Get a list of payments
      x-required-scope: PAYMENT_GET_LIST
      security:
        - AppID:
            - PAYMENT_GET_LIST
      responses:
        '200':
          description: A list of payments
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        payment:
                          type: object
                          $ref: '#/components/schemas/Payment'
                        transaction:
                          type: object
                          $ref: '#/components/schemas/PaymentTransaction'
                        destination:
                          type: object
                          $ref: '#/components/schemas/PaymentDestination'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
              example:
                pageInfo:
                  skip: 0
                  limit: 10
                  hasPreviousPage: false
                  hasNextPage: true
                payments:
                  payment:
                    value: 100
                    status: CONFIRMED
                    destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                    comment: payment comment
                    correlationID: payment1
                    sourceAccountId: my-source-account-id
                  transaction:
                    value: 100
                    endToEndId: transaction-end-to-end-id
                    time: '2023-03-20T13:14:17.000Z'
                    debitParty:
                      account:
                        branch: '0001'
                        account: '00000000000000023280'
                        accountType: TRAN
                      psp:
                        id: '123456'
                        name: COMPANY DEBIT LTDA
                        code: '123456789'
                      holder:
                        name: name holder
                        nameFriendly: name friendly holder
                      taxID:
                        taxID: '1212345600198'
                        type: BR:CNPJ
                    creditParty:
                      pixKey:
                        pixKey: email@email.com.br
                        type: EMAIL
                      account:
                        branch: '0001'
                        account: '00000000000000012345'
                        accountType: TRAN
                      psp:
                        id: '123456'
                        name: COMPANY CREDIT LTDA
                      holder:
                        name: name holder
                        nameFriendly: name friendly
                        taxID:
                          taxID: '00123456000199'
                          type: BR:CNPJ
                  destination:
                    name: Dan
                    taxID: '31324227036'
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                    bank: A Bank
                    branch: '1'
                    account: '123456'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/payment',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/payment \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/payment",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/payment", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/payment\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/payment")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/payment")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - payment (request access)
      summary: Create a Payment Request
      x-required-scope: PAYMENT_POST
      security:
        - AppID:
            - PAYMENT_POST
      description: >
        Endpoint to request a payment. Supports three payment types: Pix Key
        (`PIX_KEY`), QR Code (`QR_CODE`), and Manual (`MANUAL`).


        For QR Code payments, the system decodes the BR Code string and extracts
        the destination and value automatically.


        Set `autoApprove: true` to create and immediately approve the payment in
        a single call, returning the enriched response with transaction and
        destination data. Without this flag, the payment is created in `CREATED`
        status and can be approved later via `POST /api/v1/payment/approve`.
      requestBody:
        description: Data to create a payment request
        required: true
        content:
          application/json:
            schema:
              type: object
              allOf:
                - $ref: '#/components/schemas/PaymentCreatePayload'
                - type: object
                  properties:
                    autoApprove:
                      type: boolean
                      description: >-
                        When true, creates and approves the payment in a single
                        call returning the enriched response. Defaults to false.
            examples:
              pixKey:
                summary: Pay via Pix Key
                value:
                  type: PIX_KEY
                  value: 100
                  destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                  destinationAliasType: RANDOM
                  comment: payment comment
                  correlationID: payment1
                  pixKeyEndToEndId: E1234567890
                  metadata:
                    orderId: order-123
                    userId: user-456
                    source: mobile-app
              pixKeyAutoApprove:
                summary: Pay via Pix Key with auto-approval
                value:
                  value: 100
                  destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                  destinationAliasType: RANDOM
                  comment: payment comment
                  correlationID: payment-auto-approve
                  autoApprove: true
              qrCode:
                summary: Pay a QR Code (BR Code)
                value:
                  type: QR_CODE
                  correlationID: payment-qrcode-1
                  qrCode: >-
                    00020101021226850014BR.GOV.BCB.PIX2563qrcode.example.com/pix/v2/abc12345-defg-6789-hijk-lmnopqrstuvw52040000530398654041.005802BR5925LOJA
                    EXEMPLO LTDA6009SAO
                    PAULO6229052512345678901234567890163049A2F
                  comment: payment comment
                  metadata:
                    qrCodeSource: store-terminal
                    storeId: store-789
              qrCodeWithValue:
                summary: >-
                  Pay a QR Code with custom value (for QR Codes without fixed
                  value)
                value:
                  type: QR_CODE
                  correlationID: payment-qrcode-2
                  qrCode: >-
                    00020101021226850014BR.GOV.BCB.PIX2563qrcode.example.com/pix/v2/abc12345-defg-6789-hijk-lmnopqrstuvw52040000530398654041.005802BR5925LOJA
                    EXEMPLO LTDA6009SAO
                    PAULO6229052512345678901234567890163049A2F
                  value: 3000
                  comment: payment with custom value
              manual:
                summary: Pay via manual bank details
                value:
                  type: MANUAL
                  value: 100
                  pixKeyEndToEndId: E1234567890
                  correlationID: manual-payment-26
                  holder:
                    name: Hodlis 3
                    taxID:
                      type: BR:CNPJ
                      taxID: '20244827000158'
                  account:
                    account: '00000000000000000981'
                    branch: '0001'
                    accountType: TRAN
                  psp:
                    id: '54811417'
                    name: WOOVI INSTITUICAO DE PAGAMENTO
                  metadata:
                    businessUnit: finance
                    approver: manager-001
                    priority: high
      responses:
        '200':
          description: >-
            Payment created. When autoApprove is true, the payment is
            immediately approved and the response includes transaction and
            destination data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment:
                    $ref: '#/components/schemas/Payment'
                  transaction:
                    type: object
                    $ref: '#/components/schemas/PaymentTransaction'
                  destination:
                    type: object
                    $ref: '#/components/schemas/PaymentDestination'
              examples:
                pixKey:
                  summary: Pix Key response
                  value:
                    payment:
                      type: PIX_KEY
                      value: 100
                      status: CREATED
                      destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                      destinationAliasType: RANDOM
                      comment: payment comment
                      correlationID: payment1
                qrCode:
                  summary: QR Code response
                  value:
                    payment:
                      type: QR_CODE
                      value: 3000
                      status: CREATED
                      qrCode: >-
                        00020101021226850014BR.GOV.BCB.PIX2563qrcode.example.com/pix/v2/abc12345-defg-6789-hijk-lmnopqrstuvw52040000530398654041.005802BR5925LOJA
                        EXEMPLO LTDA6009SAO
                        PAULO6229052512345678901234567890163049A2F
                      comment: payment comment
                      correlationID: payment-qrcode-1
                    destination:
                      name: LOJA EXEMPLO LTDA
                      taxID: '11222333000181'
                      bank: Banco Exemplo S.A.
                manual:
                  summary: Manual Payment response
                  value:
                    payment:
                      type: MANUAL
                      value: 100
                      status: CREATED
                      correlationID: manual-payment-1
                      holder:
                        name: Hodlis 3
                        taxID:
                          type: BR:CNPJ
                          taxID: '20244827000158'
                      account:
                        account: '00000000000000000981'
                        branch: '0001'
                        accountType: TRAN
                      psp:
                        id: '54811417'
                        name: WOOVI INSTITUICAO DE PAGAMENTO
                autoApproved:
                  summary: Auto-approved payment response (autoApprove true)
                  value:
                    payment:
                      value: 100
                      status: APPROVED
                      destinationAlias: c4249323-b4ca-43f2-8139-8232aab09b93
                      destinationAliasType: RANDOM
                      comment: payment comment
                      correlationID: payment1
                    transaction:
                      value: 100
                      endToEndId: transaction-end-to-end-id
                      time: '2023-03-20T13:14:17.000Z'
                    destination:
                      name: Dan
                      taxID: '31324227036'
                      pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                      bank: A Bank
                      branch: '1'
                      account: '123456'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/payment',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'PIX_KEY',
              value: 0,
              destinationAlias: 'string',
              destinationAliasType: 'CPF',
              correlationID: 'string',
              pixKeyEndToEndId: 'string',
              comment: 'string',
              metadata: {},
              autoApprove: true
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/payment \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"PIX_KEY","value":0,"destinationAlias":"string","destinationAliasType":"CPF","correlationID":"string","pixKeyEndToEndId":"string","comment":"string","metadata":{},"autoApprove":true}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/payment",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'type' => 'PIX_KEY',
                'value' => 0,
                'destinationAlias' => 'string',
                'destinationAliasType' => 'CPF',
                'correlationID' => 'string',
                'pixKeyEndToEndId' => 'string',
                'comment' => 'string',
                'metadata' => [
                    
                ],
                'autoApprove' => null
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"type\":\"PIX_KEY\",\"value\":0,\"destinationAlias\":\"string\",\"destinationAliasType\":\"CPF\",\"correlationID\":\"string\",\"pixKeyEndToEndId\":\"string\",\"comment\":\"string\",\"metadata\":{},\"autoApprove\":true}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/payment", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/payment\"\n\n\tpayload := strings.NewReader(\"{\\\"type\\\":\\\"PIX_KEY\\\",\\\"value\\\":0,\\\"destinationAlias\\\":\\\"string\\\",\\\"destinationAliasType\\\":\\\"CPF\\\",\\\"correlationID\\\":\\\"string\\\",\\\"pixKeyEndToEndId\\\":\\\"string\\\",\\\"comment\\\":\\\"string\\\",\\\"metadata\\\":{},\\\"autoApprove\\\":true}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"type\":\"PIX_KEY\",\"value\":0,\"destinationAlias\":\"string\",\"destinationAliasType\":\"CPF\",\"correlationID\":\"string\",\"pixKeyEndToEndId\":\"string\",\"comment\":\"string\",\"metadata\":{},\"autoApprove\":true}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/payment")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/payment")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"type\":\"PIX_KEY\",\"value\":0,\"destinationAlias\":\"string\",\"destinationAliasType\":\"CPF\",\"correlationID\":\"string\",\"pixKeyEndToEndId\":\"string\",\"comment\":\"string\",\"metadata\":{},\"autoApprove\":true}"


            response = http.request(request)

            puts response.read_body
  /api/v1/pix-keys/{pixKey}/check:
    get:
      tags:
        - pixKey
      summary: Check data from a Pix key
      description: Get data from a Pix key if it exists
      parameters:
        - name: pixKey
          in: path
          required: true
          schema:
            type: string
          description: The Pix key to check
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixKeyCheck'
        '400':
          description: You need to link a Bank Account to this API
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errorCode:
                    type: string
        '401':
          description: Your IP is not in the allowed list
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errorCode:
                    type: string
        '403':
          description: Your account does not have the permission to use this endpoint
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errorCode:
                    type: string
        '404':
          description: Pix key does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errorCode:
                    type: string
        '429':
          description: Too many requests, you had too many 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errorCode:
                    type: string
      x-codeSamples: []
  /api/v1/pix-keys/check:
    post:
      tags:
        - pixKey
      summary: Check data from a Pix key
      description: Get data from a Pix key if it exists
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - pixKey
              properties:
                pixKey:
                  type: string
                  description: The Pix key to check
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixKeyCheck'
        '400':
          description: You need to link a Bank Account to this API
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Your IP is not in the allowed list
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '403':
          description: Your account does not have the permission to use this endpoint
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Pix key does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '429':
          description: Too many requests, you had too many 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/pix-keys/check',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({pixKey: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/pix-keys/check \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"pixKey":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/pix-keys/check",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'pixKey' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            payload = "{\"pixKey\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }

            conn.request("POST", "/api/v1/pix-keys/check", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/pix-keys/check\"\n\n\tpayload := strings.NewReader(\"{\\\"pixKey\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"pixKey\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/pix-keys/check")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/pix-keys/check")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
            request["content-type"] = 'application/json'
            request.body = "{\"pixKey\":\"string\"}"

            response = http.request(request)
            puts response.read_body
  /api/v1/pix-keys/{pixKey}/default:
    put:
      tags:
        - pixKey
      summary: Set a pix key as default
      description: Set a pix key as default
      parameters:
        - name: pixKey
          in: path
          required: true
          schema:
            type: string
          description: The pix key to set as default
      responses:
        '200':
          description: Pix key set as default successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixKey'
      x-codeSamples: []
  /api/v1/pix-keys/{pixKey}:
    delete:
      tags:
        - pixKey
      summary: Delete a Pix key
      description: Deletes a specific Pix key, you cannot delete the default pix key
      parameters:
        - name: pixKey
          in: path
          required: true
          schema:
            type: string
          description: The Pix key to delete
      responses:
        '204':
          description: Pix key deleted successfully
        '400':
          description: You need to link a Bank Account to this API
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Your Authorization APP_ID must be configured to be MASTER or API
        '404':
          description: Pix key not found
      x-codeSamples: []
  /api/v1/pix-keys:
    get:
      tags:
        - pixKey
      summary: Get all Pix keys
      description: Retrieves a list of all Pix keys
      parameters:
        - in: query
          name: skip
          schema:
            type: number
        - in: query
          name: limit
          schema:
            type: number
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixKeys:
                    type: array
                    items:
                      $ref: '#/components/schemas/PixKey'
                  account:
                    type: object
                    $ref: '#/components/schemas/CompanyBankAccount'
        '400':
          description: You need to link a Bank Account to this API
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Your Authorization APP_ID must be configured to be MASTER or API
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/pix-keys?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    post:
      tags:
        - pixKey
      summary: Create a new Pix key
      description: Creates a new Pix key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PixKeyCreate'
      responses:
        '201':
          description: Pix key created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixKey'
        '400':
          description: You need to link a Bank Account to this API
        '401':
          description: Your IP is not in the allowed list
        '403':
          description: Your Authorization APP_ID must be configured to be MASTER or API
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/pix-keys',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({key: 'string', type: 'CNPJ'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/pix-keys \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"key":"string","type":"CNPJ"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/pix-keys",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'key' => 'string',
                'type' => 'CNPJ'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            payload = "{\"key\":\"string\",\"type\":\"CNPJ\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }

            conn.request("POST", "/api/v1/pix-keys", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/pix-keys\"\n\n\tpayload := strings.NewReader(\"{\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"CNPJ\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"key\":\"string\",\"type\":\"CNPJ\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/pix-keys")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/pix-keys")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
            request["content-type"] = 'application/json'
            request.body = "{\"key\":\"string\",\"type\":\"CNPJ\"}"

            response = http.request(request)
            puts response.read_body
  /api/v1/pix-keys/tokens:
    get:
      tags:
        - pixKey
      summary: Get tokens data
      description: Get tokens data
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixKeyTokens'
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/pix-keys/tokens',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/pix-keys/tokens \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/pix-keys/tokens",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/pix-keys/tokens", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/pix-keys/tokens\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/pix-keys/tokens")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/pix-keys/tokens")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /api/v1/pix-keys/tokens/logs:
    get:
      tags:
        - pixKey
      summary: Get token bucket logs
      description: Get a list of token bucket operation logs
      parameters:
        - in: query
          name: skip
          schema:
            type: number
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: companyBankAccount
          description: Filter logs by company bank account ID
          schema:
            type: string
      responses:
        '200':
          description: A list of token bucket logs
          content:
            application/json:
              schema:
                type: object
                properties:
                  logs:
                    type: array
                    items:
                      $ref: '#/components/schemas/TokenBucketLog'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
              example:
                pageInfo:
                  skip: 0
                  limit: 100
                  hasPreviousPage: false
                  hasNextPage: false
                logs:
                  - operation: REMOVE
                    reason: pixKeyCheck
                    tokens: 1
                    tokensBefore: 100
                    tokensAfter: 99
                    endToEndId: E18236120202012032010s0133872GZA
                    pixKey: '31324227036'
                    createdAt: '2024-01-15T10:30:00.000Z'
                    updatedAt: '2024-01-15T10:30:00.000Z'
                  - operation: ADD
                    reason: refill
                    tokens: 10
                    tokensBefore: 90
                    tokensAfter: 100
                    createdAt: '2024-01-15T11:00:00.000Z'
                    updatedAt: '2024-01-15T11:00:00.000Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Unauthorized
        '403':
          description: Your account does not have the permission to use this endpoint
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/pix-keys/tokens/logs?skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&companyBankAccount=SOME_STRING_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/qrcode-static/{id}:
    delete:
      tags:
        - pixQrCode
      summary: Delete a Pix QrCode Static
      description: Endpoint to delete a Pix QrCode Static
      parameters:
        - name: id
          in: path
          description: QrCode ID, correlationID or identifier
          required: true
          schema:
            type: string
          examples:
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: QrCode deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  id:
                    type: string
                example:
                  status: OK
                  id: fe7834b4060c488a9b0f89811be5f5cf
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  status:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("DELETE",
            "/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/qrcode-static/fe7834b4060c488a9b0f89811be5f5cf")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Delete.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    get:
      tags:
        - pixQrCode
      summary: Get one Pix QrCode
      parameters:
        - name: id
          in: path
          description: pixQrCode ID, correlation ID or emv identifier
          required: true
          schema:
            type: string
          examples:
            pixQrCodeId:
              value: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
            identifier:
              value: zr7833b4060c488a9b0f89811
      responses:
        '200':
          description: The pixQrCode retrieve using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixQrCode:
                    type: object
                    $ref: '#/components/schemas/PixQrCode'
                example:
                  pixQrCode:
                    name: pix qrcode static
                    value: 100
                    comment: pix qrcode static
                    correlationID: fe7834b4060c488a9b0f89811be5f5cf
                    identifier: zr7833b4060c488a9b0f89811
                    paymentLinkID: 7777-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/fe7834b4060c488a9b0f89811be5f5cf
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/charge/brcode/image/fe7834b4060c488a9b0f89811be5f5cf.png
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA== \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/qrcode-static/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/qrcode-static:
    get:
      tags:
        - pixQrCode
      summary: Get a list of Pix QrCodes
      responses:
        '200':
          description: A list of pixQrCodes
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixQrCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/PixQrCode'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
                  pixQrCodes:
                    name: pix qrcode
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    identifier: zr7833b4060c488a9b0f89811
                    paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/pixQrCode/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/qrcode-static',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/qrcode-static \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/qrcode-static",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/qrcode-static", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/qrcode-static\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/qrcode-static")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/qrcode-static")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - pixQrCode
      summary: Create a new Pix QrCode Static
      description: Endpoint to create a new Pix QrCode Static
      requestBody:
        description: Data to create a new Pix QrCode Static
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/PixQrCodePayload'
            example:
              name: my-qr-code
              correlationID: 9134e286-6f71-427a-bf00-241681624586
              value: 100
              comment: good
      responses:
        '200':
          description: >-
            PixQrCode ID and also the generated Dynamic BR Code to be rendered
            as a QRCode
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixQrCode:
                    $ref: '#/components/schemas/PixQrCode'
                  correlationID:
                    type: string
                  brCode:
                    type: string
                example:
                  pixQrCode:
                    value: 100
                    comment: good
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    identifier: zr7833b4060c488a9b0f89811
                    paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                    paymentLinkUrl: https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                    qrCodeImage: >-
                      https://api.woovi.com/openpix/pixQrCode/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                    createdAt: '2021-03-02T17:28:51.882Z'
                    updatedAt: '2021-03-02T17:28:51.882Z'
                    brCode: >-
                      000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                      Paulo62360532867ba5173c734202ac659721306b38c963044BCA
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/qrcode-static',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              correlationID: 'string',
              value: 0,
              comment: 'string',
              pixKey: 'string'
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/qrcode-static \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","correlationID":"string","value":0,"comment":"string","pixKey":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/qrcode-static",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'name' => 'string',
                'correlationID' => 'string',
                'value' => 0,
                'comment' => 'string',
                'pixKey' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"name\":\"string\",\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\",\"pixKey\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/qrcode-static", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/qrcode-static\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"value\\\":0,\\\"comment\\\":\\\"string\\\",\\\"pixKey\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"name\":\"string\",\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\",\"pixKey\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/qrcode-static")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/qrcode-static")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"name\":\"string\",\"correlationID\":\"string\",\"value\":0,\"comment\":\"string\",\"pixKey\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/transaction/{id}:
    get:
      tags:
        - transactions
      summary: Get a Transaction
      x-required-scope: TRANSACTION_GET
      security:
        - AppID:
            - TRANSACTION_GET
      parameters:
        - name: id
          in: path
          description: >-
            you can use the transaction id from openpix or the endToEndId of
            transaction from bank
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The transaction retrieve using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    type: object
                    $ref: '#/components/schemas/Transaction'
              example:
                transaction:
                  customer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                  payer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                  charge:
                    status: ACTIVE
                    customer: 603f81fcc6bccc24326ffb43
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    createdAt: '2021-03-03T12:33:00.546Z'
                    updatedAt: '2021-03-03T12:33:00.546Z'
                  withdraw:
                    value: 100
                    time: '2021-03-03T12:33:00.536Z'
                    infoPagador: payer info 1
                    endToEndId: E18236120202012032010s01345689XBY
                    createdAt: '2021-03-03T12:33:00.546Z'
                  infoPagador: payer info 0
                  value: 100
                  time: '2021-03-03T12:33:00.536Z'
                  transactionID: transactionID
                  type: PAYMENT
                  endToEndId: E18236120202012032010s0133872GZA
                  globalID: UGl4VHJhbnNhY3Rpb246NzE5MWYxYjAyMDQ2YmY1ZjUzZGNmYTBi
                  creditParty:
                    account:
                      account: '00000000000005469660'
                      accountType: CACC
                      branch: '8615'
                    holder:
                      name: CREDIT PARTY NAME
                      nameFriendly: CREDIT PARTY NAME FRIENDLY
                      taxID:
                        taxID: '28613271892'
                        type: BR:CPF
                    psp:
                      id: '00000001'
                      name: BCO DO BRASIL S.A.
                  debitParty:
                    account:
                      account: '1235678'
                      accountType: TRAN
                      branch: '1'
                    holder:
                      name: Awesome Company 1
                      nameFriendly: Call me Awesome
                    psp:
                      code: '54811417'
                      id: FROZEN-ID
                      name: WOOVI IP LTDA
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples: []
  /api/v1/transaction:
    parameters:
      - in: query
        name: start
        schema:
          type: string
          format: date-time
          title: Start Date
          description: Start date used in the query. Complies with RFC 3339.
          example: '2020-01-01T00:00:00Z'
      - in: query
        name: end
        schema:
          type: string
          format: date-time
          title: End Date
          description: End date used in the query. Complies with RFC 3339.
          example: '2020-12-01T17:00:00Z'
      - in: query
        name: charge
        description: >-
          You can use the charge ID or correlation ID or transaction ID of
          charge to get a list of transactions related of this transaction
        schema:
          type: string
        example: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA
      - in: query
        name: pixQrCode
        description: >-
          You can use the QrCode static ID or correlation ID or identifier field
          of QrCode static to get a list of QrCode related of this transaction
        schema:
          type: string
        example: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA
      - in: query
        name: withdrawal
        description: >-
          You can use the ID or EndToEndId of a withdrawal transaction to get
          all transactions related to the withdrawal
        schema:
          type: string
        example: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA
      - in: query
        name: hasWebhook
        description: >-
          Filter transactions by webhook delivery status. Use true to get only
          transactions that had a successful webhook delivery (HTTP 200), or
          false to get transactions without successful webhook delivery.
        schema:
          type: boolean
        example: true
      - in: query
        name: type
        description: Filter transactions by type
        schema:
          type: string
          enum:
            - PAYMENT
            - WITHDRAW
            - REFUND
            - FEE
            - INTERNAL_TRANSFER
            - BALANCE_BLOCK
            - BALANCE_UNBLOCK
            - REVERSAL
        example: REFUND
    get:
      tags:
        - transactions
      summary: Get a list of transactions
      x-required-scope: TRANSACTION_GET_LIST
      security:
        - AppID:
            - TRANSACTION_GET_LIST
      responses:
        '200':
          description: A list of transactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  transactions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Transaction'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
              example:
                pageInfo:
                  skip: 0
                  limit: 10
                  hasPreviousPage: false
                  hasNextPage: true
                transactions:
                  customer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                  payer:
                    name: Dan
                    email: email0@example.com
                    phone: '5511999999999'
                    taxID:
                      taxID: '31324227036'
                      type: BR:CPF
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                  charge:
                    status: ACTIVE
                    customer: 603f81fcc6bccc24326ffb43
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    createdAt: '2021-03-03T12:33:00.546Z'
                    updatedAt: '2021-03-03T12:33:00.546Z'
                  withdraw:
                    value: 100
                    time: '2021-03-03T12:33:00.536Z'
                    infoPagador: payer info 1
                    endToEndId: E18236120202012032010s01345689XBY
                  type: PAYMENT
                  infoPagador: payer info 0
                  value: 100
                  time: '2021-03-03T12:33:00.536Z'
                  transactionID: transactionID
                  endToEndId: E18236120202012032010s0133872GZA
                  webhookSent:
                    - OPENPIX:TRANSACTION_RECEIVED:
                        status: 200
                        time: '2021-03-03T12:33:00.546Z'
                      isRetry: false
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/transaction?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&charge=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&pixQrCode=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&withdrawal=Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA&hasWebhook=true&type=REFUND")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/refund/{id}:
    get:
      tags:
        - refund
      summary: Get one refund
      x-required-scope: REFUND_GET
      security:
        - AppID:
            - REFUND_GET
      parameters:
        - name: id
          in: path
          description: refund ID or correlation ID
          required: true
          schema:
            type: string
          examples:
            id:
              value: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==
            correlationID:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: The refund retrieve using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixTransactionRefund:
                    type: object
                    $ref: '#/components/schemas/Refund'
                example:
                  pixTransactionRefund:
                    value: 100
                    correlationID: 7777-6f71-427a-bf00-241681624586
                    refundId: 11bf5b37e0b842e08dcfdc8c4aefc000
                    returnIdentification: D09089356202108032000a543e325902
                    comment: Comentário do reembolso
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA== \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/refund/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/refund:
    get:
      tags:
        - refund
      summary: Get a list of refunds
      x-required-scope: REFUND_GET_LIST
      security:
        - AppID:
            - REFUND_GET_LIST
      responses:
        '200':
          description: A list of refunds
          content:
            application/json:
              schema:
                type: object
                properties:
                  refunds:
                    type: array
                    items:
                      $ref: '#/components/schemas/Refund'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
                  refunds:
                    - status: IN_PROCESSING
                      value: 100
                      correlationID: 9134e286-6f71-427a-bf00-241681624586
                      refundId: 9134e2866f71427abf00241681624586
                      time: '2021-03-02T17:28:51.882Z'
                      comment: Comentário do reembolso
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/refund',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/refund \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/refund",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/refund", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/refund\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/refund")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/refund")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - refund
      summary: Create a new refund
      x-required-scope: REFUND_POST
      security:
        - AppID:
            - REFUND_POST
      description: Endpoint to create a new refund for a customer
      requestBody:
        description: Data to create a new refund
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/RefundPayload'
            example:
              transactionEndToEndId: 9134e286-6f71-427a-bf00-241681624586
              correlationID: 9134e286-6f71-427a-bf00-241681624586
              value: 100
              comment: Comentário do reembolso
      responses:
        '200':
          description: The created Refund
          content:
            application/json:
              schema:
                type: object
                properties:
                  refund:
                    $ref: '#/components/schemas/Refund'
                example:
                  refund:
                    status: IN_PROCESSING
                    value: 100
                    correlationID: 9134e286-6f71-427a-bf00-241681624586
                    refundId: 9134e2866f71427abf00241681624586
                    time: '2021-03-02T17:28:51.882Z'
                    comment: Comentário do reembolso
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/refund',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              value: 0,
              transactionEndToEndId: 'string',
              correlationID: 'string',
              comment: 'string'
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/refund \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0,"transactionEndToEndId":"string","correlationID":"string","comment":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/refund",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0,
                'transactionEndToEndId' => 'string',
                'correlationID' => 'string',
                'comment' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"value\":0,\"transactionEndToEndId\":\"string\",\"correlationID\":\"string\",\"comment\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/refund", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/refund\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0,\\\"transactionEndToEndId\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\",\\\"comment\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"value\":0,\"transactionEndToEndId\":\"string\",\"correlationID\":\"string\",\"comment\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/refund")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/refund")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"value\":0,\"transactionEndToEndId\":\"string\",\"correlationID\":\"string\",\"comment\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/psp:
    get:
      tags:
        - psp
      summary: Get a list of PSPs (Payment Service Providers)
      x-required-scope: PSP_GET_LIST
      security:
        - AppID:
            - PSP_GET_LIST
      parameters:
        - in: query
          name: ispb
          description: Filter PSPs by ISPB code
          required: false
          schema:
            type: string
          example: '3030310'
        - in: query
          name: name
          description: Filter PSPs by name
          required: false
          schema:
            type: string
          example: brasil
        - in: query
          name: compe
          description: Filter PSPs by COMPE code
          required: false
          schema:
            type: string
          example: '001'
      responses:
        '200':
          description: A list of PSPs
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  psps:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The name of the PSP
                          example: BCO DO BRASIL S.A.
                        ispb:
                          type: string
                          description: The ISPB code of the PSP
                          example: '00000000'
                        code:
                          type: string
                          description: The code of the PSP
                          example: '00000000'
                        compe:
                          type: string
                          nullable: true
                          description: The COMPE code of the PSP
                          example: '001'
              example:
                success: true
                psps:
                  - name: BCO DO BRASIL S.A.
                    ispb: '00000000'
                    code: '00000000'
                    compe: '001'
                  - name: CAIXA ECONOMICA FEDERAL
                    ispb: '00360305'
                    code: '00360305'
                    compe: '104'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Invalid query parameters
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/psp?ispb=3030310&name=brasil&compe=001',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/psp?ispb=3030310&name=brasil&compe=001' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/psp?ispb=3030310&name=brasil&compe=001",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/psp?ispb=3030310&name=brasil&compe=001", headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/psp?ispb=3030310&name=brasil&compe=001\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/psp?ispb=3030310&name=brasil&compe=001")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/psp?ispb=3030310&name=brasil&compe=001")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/receipt/{ReceiptType}/{EndToEndId}:
    get:
      tags:
        - receipt
      summary: >-
        Get a PDF document related to a payment transaction formatted as a
        receipt by type (pix-in, pix-out or pix-refund).
      parameters:
        - name: ReceiptType
          in: path
          description: The ReceiptType from the payment transaction to export.
          required: true
          schema:
            type: string
            enum:
              - pix-in
              - pix-out
              - pix-refund
          examples:
            pix-in:
              value: pix-in
            pix-out:
              value: pix-out
            pix-refund:
              value: pix-refund
        - name: EndToEndId
          in: path
          description: The EndToEndId from the payment transaction to export.
          required: true
          schema:
            type: string
          examples:
            endToEndId:
              value: E12345678202406201221abcdef12345
      responses:
        '200':
          description: Exported transaction as a receipt in PDF format.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: An error occurred due to a bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The specified EndToEndId was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/receipt/pix-in/E12345678202406201221abcdef12345',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/receipt/pix-in/E12345678202406201221abcdef12345 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/receipt/pix-in/E12345678202406201221abcdef12345",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/receipt/pix-in/E12345678202406201221abcdef12345",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/receipt/pix-in/E12345678202406201221abcdef12345\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/receipt/pix-in/E12345678202406201221abcdef12345")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/receipt/pix-in/E12345678202406201221abcdef12345")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/statement:
    get:
      tags:
        - statement
      summary: Get statement by company
      x-required-scope: STATEMENT_GET
      security:
        - AppID:
            - STATEMENT_GET
      description: Retrieves the statement/ledger entries for a company's bank account
      parameters:
        - in: query
          name: start
          schema:
            type: string
            format: date-time
            title: Start Date
            description: Start date used in the query. Complies with RFC 3339.
            example: '2020-01-01T00:00:00Z'
        - in: query
          name: end
          schema:
            type: string
            format: date-time
            title: End Date
            description: End date used in the query. Complies with RFC 3339.
            example: '2020-12-01T17:00:00Z'
        - in: query
          name: skip
          schema:
            type: number
        - in: query
          name: limit
          schema:
            type: number
      responses:
        '200':
          description: Statement retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Unique identifier for the ledger entry
                      example: 507f1f77bcf86cd799439011
                    time:
                      type: string
                      format: date-time
                      description: Date and time of the transaction
                      example: '2023-12-01T10:30:00.000Z'
                    description:
                      type: string
                      description: Description of the transaction
                      example: Payment received from customer
                    balance:
                      type: number
                      description: Account balance after this transaction
                      example: 1500.5
                    value:
                      type: number
                      description: Transaction amount
                      example: 100
                    type:
                      type: string
                      description: Type of transaction
                      example: CREDIT
                    transactionId:
                      type: string
                      description: Transaction tracking ID
                      example: txn_123456789
        '400':
          description: Bad request - validation error or missing authorization
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                CompanyBankAccountNotFound:
                  value:
                    error: Company bank account not found
                NotWooviAccount:
                  value:
                    error: Company bank account not woovi account
        '401':
          description: Unauthorized - invalid or missing authorization token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Internal server error
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/statement?start=2020-01-01T00%3A00%3A00Z&end=2020-12-01T17%3A00%3A00Z&skip=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount/{id}/withdraw:
    post:
      tags:
        - subaccount
      summary: Withdraw from a Sub Account
      x-required-scope: SUBACCOUNT_WITHDRAW_POST
      security:
        - AppID:
            - SUBACCOUNT_WITHDRAW_POST
      description: >-
        Withdraw from a Sub Account and return the withdrawal transaction
        information
      parameters:
        - name: id
          in: path
          description: pix key registered to the subaccount
          required: true
          schema:
            type: string
          example: destination@test.com
      requestBody:
        description: Data to make a withdraw partial
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/SubAccountWithdrawPayload'
            examples:
              SubAccount:
                value:
                  value: 1000
      responses:
        '200':
          description: Withdrawal Transaction information
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdraw:
                    type: object
                    properties:
                      account:
                        type: object
                        $ref: '#/components/schemas/transaction'
              example:
                transaction:
                  status: CREATED
                  value: 100
                  endToEndId: ENDTOENDID_1234567890
                  correlationID: TESTING1323
                  destinationAlias: pixKeyTest@test.com
                  comment: testing-transaction
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/destination@test.com/withdraw',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subaccount/destination@test.com/withdraw \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/destination@test.com/withdraw",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/subaccount/destination@test.com/withdraw", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/destination@test.com/withdraw\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\"value\":0}");
            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/destination@test.com/withdraw")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/destination@test.com/withdraw")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0}"


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount/{id}:
    delete:
      tags:
        - subaccount
      summary: Delete a Sub Account
      x-required-scope: SUBACCOUNT_DELETE
      security:
        - AppID:
            - SUBACCOUNT_DELETE
      description: Deletes a Sub Account if it has no remaining balance
      parameters:
        - name: id
          in: path
          description: Pix key registered to the subaccount
          required: true
          schema:
            type: string
          example: destination@test.com
      responses:
        '200':
          description: Sub Account successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: OK
                  pixKey:
                    type: string
                    example: destination@test.com
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                SubAccountNotFound:
                  value:
                    error: 'Subaccount not found: destination@test.com'
                NonZeroBalance:
                  value:
                    error: Only subaccount without balance can be removed
        '403':
          description: Forbidden action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: This feature is not enabled for your company
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/destination@test.com',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/subaccount/destination@test.com \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/destination@test.com",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("DELETE", "/api/v1/subaccount/destination@test.com",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/destination@test.com\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/destination@test.com")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/destination@test.com")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Delete.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    get:
      tags:
        - subaccount
      summary: Get subaccount details
      x-required-scope: SUBACCOUNT_GET
      security:
        - AppID:
            - SUBACCOUNT_GET
      parameters:
        - name: id
          in: path
          description: pix key registered to the subaccount
          required: true
          schema:
            type: string
          examples:
            id:
              value: c4249323-b4ca-43f2-8139-8232aab09b93
      responses:
        '200':
          description: The Subccount retrieve using the given pix key
          content:
            application/json:
              schema:
                type: object
                properties:
                  SubAccount:
                    type: object
                    $ref: '#/components/schemas/SubAccount'
                example:
                  SubAccount:
                    name: test-sub-account
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                    balance: 100
                    withdrawBlocked: false
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/c4249323-b4ca-43f2-8139-8232aab09b93")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount:
    get:
      tags:
        - subaccount
      summary: Get a list of subaccounts
      x-required-scope: SUBACCOUNT_GET_LIST
      responses:
        '200':
          description: A list of subaccounts
          content:
            application/json:
              schema:
                type: object
                properties:
                  subaccounts:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        pixKey:
                          type: string
                        balance:
                          type: number
                        withdrawBlocked:
                          type: boolean
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                      skip:
                        type: number
                      limit:
                        type: number
                      hasPreviousPage:
                        type: boolean
                      hasNextPage:
                        type: boolean
              example:
                subAccounts:
                  - name: test-sub-account
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
                    balance: 100
                    withdrawBlocked: false
                pageInfo:
                  skip: 0
                  limit: 10
                  hasPreviousPage: false
                  hasNextPage: true
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/subaccount \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/subaccount", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/subaccount")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - subaccount
      summary: Create a subaccount
      x-required-scope: SUBACCOUNT_POST
      requestBody:
        description: Data to create a new subAccount or retrieve existing one
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/SubAccountPayload'
            examples:
              SubAccount:
                value:
                  pixKey: 9134e286-6f71-427a-bf00-241681624587
                  name: Test Account
      responses:
        '200':
          description: The Subccount created or retrieved if exists using the given pix key
          content:
            application/json:
              schema:
                type: object
                properties:
                  SubAccount:
                    type: object
                    $ref: '#/components/schemas/SubAccount'
                example:
                  SubAccount:
                    name: test-sub-account
                    pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({pixKey: 'string', name: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subaccount \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"pixKey":"string","name":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'pixKey' => 'string',
                'name' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            payload = "{\"pixKey\":\"string\",\"name\":\"string\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }

            conn.request("POST", "/api/v1/subaccount", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount\"\n\n\tpayload := strings.NewReader(\"{\\\"pixKey\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"pixKey\":\"string\",\"name\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/subaccount")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
            request["content-type"] = 'application/json'
            request.body = "{\"pixKey\":\"string\",\"name\":\"string\"}"

            response = http.request(request)
            puts response.read_body
  /api/v1/subaccount/{id}/credit:
    post:
      tags:
        - subaccount
      summary: Credit subaccount
      x-required-scope: SUBACCOUNT_CREDIT_POST
      security:
        - AppID:
            - SUBACCOUNT_CREDIT_POST
      description: Transfers the amount from the main account to the subaccount.
      parameters:
        - name: id
          in: path
          description: Pix key registered to the subaccount
          required: true
          schema:
            type: string
          example: subaccount@test.com
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: number
                  description: Amount to credit to the account
                description:
                  type: string
                  description: Optional description for the credit operation
              required:
                - value
            examples:
              ValidCredit:
                value:
                  value: 100
                  description: Monthly deposit
      responses:
        '200':
          description: Sub Account successfully credited
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixKey:
                    type: string
                    example: subaccount@test.com
                  value:
                    type: number
                    example: 100
                  description:
                    type: string
                    example: Monthly deposit
                  success:
                    type: string
                    example: Sub-account withdrawal has been successfully credited, 100
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                SubAccountNotFound:
                  value:
                    error: 'Subaccount not found: subaccount@test.com'
        '403':
          description: Forbidden action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: This feature is not enabled for your company
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/subaccount@test.com/credit',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0, description: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/credit \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0,"description":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/credit",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0,
                'description' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0,\"description\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/v1/subaccount/subaccount@test.com/credit", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/credit\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0,\\\"description\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"value\":0,\"description\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/credit")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/credit")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0,\"description\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount/{id}/debit:
    post:
      tags:
        - subaccount
      summary: Debit subaccount
      x-required-scope: SUBACCOUNT_DEBIT_POST
      security:
        - AppID:
            - SUBACCOUNT_DEBIT_POST
      description: Transfers the amount from the subaccount to the main account.
      parameters:
        - name: id
          in: path
          description: Pix key registered to the subaccount
          required: true
          schema:
            type: string
          example: subaccount@test.com
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: number
                  description: Amount to debit from the account
                description:
                  type: string
                  description: Optional description for the debit operation
              required:
                - value
            examples:
              ValidDebit:
                value:
                  value: 50
                  description: Monthly payment
      responses:
        '200':
          description: Sub Account successfully debited
          content:
            application/json:
              schema:
                type: object
                properties:
                  pixKey:
                    type: string
                    example: subaccount@test.com
                  value:
                    type: number
                    example: 50
                  description:
                    type: string
                    example: Monthly payment
                  success:
                    type: string
                    example: Sub-account withdrawal has been successfully debited, 50
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                SubAccountNotFound:
                  value:
                    error: 'Subaccount not found: subaccount@test.com'
                ZeroBalance:
                  value:
                    error: Transfer just work with subaccount with balance
                NegativeValue:
                  value:
                    error: Value must be positive
                InsufficientBalance:
                  value:
                    error: >-
                      Account does not have enough balance to complete the
                      operation
        '403':
          description: Forbidden action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: This feature is not enabled for your company
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/subaccount@test.com/debit',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({value: 0, description: 'string'}));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/debit \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0,"description":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/debit",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0,
                'description' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload = "{\"value\":0,\"description\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/subaccount/subaccount@test.com/debit",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/debit\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0,\\\"description\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"value\":0,\"description\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/debit")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/debit")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"value\":0,\"description\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount/transfer:
    post:
      tags:
        - subaccount
      summary: Transfer between subaccounts
      x-required-scope: SUBACCOUNT_TRANSFER_POST
      security:
        - AppID:
            - SUBACCOUNT_TRANSFER_POST
      description: Transfer between subaccounts
      requestBody:
        description: Data to make a new transfer between subaccounts
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/SubAccountTransferPayload'
            examples:
              SubAccount:
                value:
                  value: 65
                  fromPixKey: c4249323-b4ca-43f2-8139-874baab09b93
                  fromPixKeyType: RANDOM
                  toPixKey: 3143da48-2bc7-49a4-89bd-4e22f73bfb0c
                  toPixKeyType: RANDOM
      responses:
        '200':
          description: Transfer response success
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/SubAccountTransferResponsePayload'
              example:
                value: 65
                destinationSubaccount:
                  name: test-sub-account-1
                  pixKey: c4249323-b4ca-43f2-8139-874baab09b93
                  balance: 100
                originSubaccount:
                  name: test-sub-account-2
                  pixKey: 3143da48-2bc7-49a4-89bd-4e22f73bfb0c
                  balance: 100
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/transfer',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              value: 0,
              fromPixKey: 'string',
              fromPixKeyType: 'CPF',
              toPixKey: 'string',
              toPixKeyType: 'CPF',
              correlationID: 'string'
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subaccount/transfer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0,"fromPixKey":"string","fromPixKeyType":"CPF","toPixKey":"string","toPixKeyType":"CPF","correlationID":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/transfer",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0,
                'fromPixKey' => 'string',
                'fromPixKeyType' => 'CPF',
                'toPixKey' => 'string',
                'toPixKeyType' => 'CPF',
                'correlationID' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"value\":0,\"fromPixKey\":\"string\",\"fromPixKeyType\":\"CPF\",\"toPixKey\":\"string\",\"toPixKeyType\":\"CPF\",\"correlationID\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/subaccount/transfer", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/transfer\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0,\\\"fromPixKey\\\":\\\"string\\\",\\\"fromPixKeyType\\\":\\\"CPF\\\",\\\"toPixKey\\\":\\\"string\\\",\\\"toPixKeyType\\\":\\\"CPF\\\",\\\"correlationID\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"value\":0,\"fromPixKey\":\"string\",\"fromPixKeyType\":\"CPF\",\"toPixKey\":\"string\",\"toPixKeyType\":\"CPF\",\"correlationID\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/transfer")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/subaccount/transfer")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"value\":0,\"fromPixKey\":\"string\",\"fromPixKeyType\":\"CPF\",\"toPixKey\":\"string\",\"toPixKeyType\":\"CPF\",\"correlationID\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/subaccount/{id}/statement:
    get:
      tags:
        - subaccount
      summary: Get Sub Account statement
      x-required-scope: SUBACCOUNT_STATEMENT_GET
      description: Returns the ledger entries (statement) for a specific subaccount.
      parameters:
        - name: id
          in: path
          description: Pix key registered to the subaccount
          required: true
          schema:
            type: string
          example: subaccount@test.com
        - name: skip
          in: query
          description: Number of entries to skip for pagination
          required: false
          schema:
            type: integer
            minimum: 0
          example: 0
        - name: limit
          in: query
          description: Maximum number of entries to return
          required: false
          schema:
            type: integer
            minimum: 1
          example: 20
        - name: start
          in: query
          description: Start date for filtering entries (ISO 8601 format)
          required: false
          schema:
            type: string
            format: date-time
          example: '2023-01-01T00:00:00.000Z'
        - name: end
          in: query
          description: End date for filtering entries (ISO 8601 format)
          required: false
          schema:
            type: string
            format: date-time
          example: '2023-12-31T23:59:59.999Z'
      responses:
        '200':
          description: Sub Account statement retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: 507f1f77bcf86cd799439011
                    time:
                      type: string
                      format: date-time
                      example: '2023-12-01T10:30:00.000Z'
                    description:
                      type: string
                      example: Payment received from customer
                    balance:
                      type: number
                      example: 1500
                    value:
                      type: number
                      example: 100
                    type:
                      type: string
                      enum:
                        - CREDIT
                        - DEBIT
                      example: CREDIT
                    operationType:
                      type: string
                      nullable: true
                      enum:
                        - CREDIT
                        - DEBIT
                        - TRANSFER_CREDIT
                        - TRANSFER_DEBIT
                        - WITHDRAWAL
                        - WITHDRAWAL_REVERSAL
                        - WITHDRAWAL_FEE
                        - WITHDRAWAL_FEE_REVERSAL
                      description: >
                        | operationType           |
                        Descrição                                         |

                        |-------------------------|---------------------------------------------------|

                        | CREDIT                  | Valor
                        recebido                                    |

                        | DEBIT                   | Valor
                        enviado                                     |

                        | TRANSFER_CREDIT         | Crédito de transferência
                        interna entre subcontas  |

                        | TRANSFER_DEBIT          | Débito de transferência
                        interna entre subcontas   |

                        | WITHDRAWAL              | Saque iniciado a partir da
                        subconta               |

                        | WITHDRAWAL_REVERSAL     | Estorno de um saque
                        processado anteriormente      |

                        | WITHDRAWAL_FEE          | Taxa cobrada por uma
                        operação de saque            |

                        | WITHDRAWAL_FEE_REVERSAL | Estorno da taxa de
                        saque                          |
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                MissingAuthorization:
                  value:
                    error: Invalid Authorization header
                CompanyNotFound:
                  value:
                    error: Company not found
                SubAccountNotFound:
                  value:
                    error: 'Subaccount not found: subaccount@test.com'
                LedgerAccountNotFound:
                  value:
                    error: Subaccount ledger account not found
                ErrorGettingStatement:
                  value:
                    error: Error getting subaccount statement
        '403':
          description: Forbidden action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: This feature is not enabled for your company
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subaccount/subaccount@test.com/statement?skip=0&limit=20&start=2023-01-01T00%3A00%3A00.000Z&end=2023-12-31T23%3A59%3A59.999Z")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subscriptions/{id}/cancel:
    put:
      tags:
        - subscription
      summary: Cancel an Subscription
      x-required-scope: SUBSCRIPTION_CANCEL_PUT
      security:
        - AppID:
            - SUBSCRIPTION_CANCEL_PUT
      parameters:
        - name: id
          in: path
          description: The globalID or correlationID of the subscription.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      responses:
        '200':
          description: The subscription retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'PUT',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request PUT \
              --url https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PUT",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("PUT",
            "/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel")
              .put(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/cancel")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Put.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subscriptions/{id}:
    get:
      tags:
        - subscription
      summary: Get one subscription
      x-required-scope: SUBSCRIPTION_GET
      security:
        - AppID:
            - SUBSCRIPTION_GET
      parameters:
        - name: id
          in: path
          description: The globalID or correlationID of the subscription.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      responses:
        '200':
          description: The subscription retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    type: object
                    $ref: '#/components/schemas/Subscription'
                example:
                  subscription:
                    globalID: >-
                      UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '5511999999999'
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                    value: 100
                    dayGenerateCharge: 5
                    correlationID: subscription#1
                    status: ACTIVE
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM= \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/subscriptions:
    get:
      tags:
        - subscription
      summary: Get a list of subscriptions
      x-required-scope: SUBSCRIPTION_GET_LIST
      security:
        - AppID:
            - SUBSCRIPTION_GET_LIST
      responses:
        '200':
          description: A list of subscriptions
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
                  pageInfo:
                    type: object
                    $ref: '#/components/schemas/Pagination'
                example:
                  pageInfo:
                    skip: 0
                    limit: 10
                    hasPreviousPage: false
                    hasNextPage: true
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/subscriptions \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/subscriptions", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/subscriptions")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
    post:
      tags:
        - subscription
      summary: Create a new Subscription
      x-required-scope: SUBSCRIPTION_POST
      security:
        - AppID:
            - SUBSCRIPTION_POST
      description: Endpoint to create a new Subcription
      requestBody:
        description: Data to create a new Subscription
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/SubscriptionPayload'
            examples:
              Subscription:
                value:
                  name: Pix Automático
                  value: 100
                  customer:
                    name: Dan
                    taxID: '31324227036'
                    email: email0@example.com
                    phone: '5511999999999'
                    address:
                      zipcode: '04556300'
                      street: rua de são paulo
                      number: '3432'
                      neighborhood: BROOKLIN PAULISTA
                      city: SAO PAULO
                      state: SP
                      complement: CONJ 26
                  correlationID: My-UniqueID
                  comment: Comentários
                  frequency: WEEKLY
                  type: PIX_RECURRING
                  pixRecurringOptions:
                    journey: ONLY_RECURRENCY
                    retryPolicy: NON_PERMITED
                  dayGenerateCharge: 25
                  dayDue: 3
      responses:
        '200':
          description: The subscription created
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    $ref: '#/components/schemas/Subscription'
                example:
                  subscription:
                    customer:
                      name: Dan
                      email: email0@example.com
                      phone: '+5511999999999'
                      address:
                        zipcode: '04556300'
                        street: rua de são paulo
                        number: '3432'
                        neighborhood: BROOKLIN PAULISTA
                        city: SAO PAULO
                        state: SP
                        complement: CONJ 26
                        country: BR
                        location:
                          coordinates: []
                        _id: 68acbcd4a95653ef243b66eb
                      taxID:
                        taxID: '31324227036'
                        type: BR:CPF
                      correlationID: 6f4131ea-b816-4b08-8ba6-11cf6b622a6e
                    dayGenerateCharge: 25
                    value: 100
                    status: ACTIVE
                    correlationID: My-UniqueID
                    pixRecurring:
                      recurrencyId: RN5481141720250825yPWxVcFfpA1
                      emv: >-
                        00020101021226870014br.gov.bcb.pix2565qr-h.woovi.digital/qr/v2/cob/faabf55e-8000-40e2-80d8-9651749a6abb5204000053039865802BR5911Pedro
                        Woovi6007VITORIA62070503***80870014br.gov.bcb.pix2565qr-h.woovi.digital/qr/v2/rec/fb59c6eb-fb99-4ff6-8f4c-17e2cd042c346304FE57
                      journey: ONLY_RECURRENCY
                      status: CREATED
                    globalID: >-
                      UGF5bWVudFN1YnNjcmlwdGlvbjo2OGFjYmNkNGE5NTY1M2VmMjQzYjY2Zjc=
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              customer: {
                name: 'string',
                email: 'string',
                phone: 'string',
                taxID: 'string',
                address: {
                  zipcode: 'string',
                  street: 'string',
                  number: 'string',
                  neighborhood: 'string',
                  city: 'string',
                  state: 'string',
                  complement: 'string',
                  country: 'string'
                }
              },
              value: 0,
              name: 'string',
              comment: 'string',
              dayGenerateCharge: 5,
              frequency: 'WEEKLY',
              type: 'PIX_RECURRING',
              dayDue: 7,
              installmentCount: 0,
              correlationID: 'string',
              additionalInfo: [{key: 'string', value: 'string'}],
              pixRecurringOptions: {retryPolicy: 'NON_PERMITED', journey: 'PAYMENT_ON_APPROVAL', minimumValue: 0}
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/subscriptions \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"customer":{"name":"string","email":"string","phone":"string","taxID":"string","address":{"zipcode":"string","street":"string","number":"string","neighborhood":"string","city":"string","state":"string","complement":"string","country":"string"}},"value":0,"name":"string","comment":"string","dayGenerateCharge":5,"frequency":"WEEKLY","type":"PIX_RECURRING","dayDue":7,"installmentCount":0,"correlationID":"string","additionalInfo":[{"key":"string","value":"string"}],"pixRecurringOptions":{"retryPolicy":"NON_PERMITED","journey":"PAYMENT_ON_APPROVAL","minimumValue":0}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'customer' => [
                    'name' => 'string',
                    'email' => 'string',
                    'phone' => 'string',
                    'taxID' => 'string',
                    'address' => [
                            'zipcode' => 'string',
                            'street' => 'string',
                            'number' => 'string',
                            'neighborhood' => 'string',
                            'city' => 'string',
                            'state' => 'string',
                            'complement' => 'string',
                            'country' => 'string'
                    ]
                ],
                'value' => 0,
                'name' => 'string',
                'comment' => 'string',
                'dayGenerateCharge' => 5,
                'frequency' => 'WEEKLY',
                'type' => 'PIX_RECURRING',
                'dayDue' => 7,
                'installmentCount' => 0,
                'correlationID' => 'string',
                'additionalInfo' => [
                    [
                            'key' => 'string',
                            'value' => 'string'
                    ]
                ],
                'pixRecurringOptions' => [
                    'retryPolicy' => 'NON_PERMITED',
                    'journey' => 'PAYMENT_ON_APPROVAL',
                    'minimumValue' => 0
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"value\":0,\"name\":\"string\",\"comment\":\"string\",\"dayGenerateCharge\":5,\"frequency\":\"WEEKLY\",\"type\":\"PIX_RECURRING\",\"dayDue\":7,\"installmentCount\":0,\"correlationID\":\"string\",\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"pixRecurringOptions\":{\"retryPolicy\":\"NON_PERMITED\",\"journey\":\"PAYMENT_ON_APPROVAL\",\"minimumValue\":0}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/subscriptions", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions\"\n\n\tpayload := strings.NewReader(\"{\\\"customer\\\":{\\\"name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"taxID\\\":\\\"string\\\",\\\"address\\\":{\\\"zipcode\\\":\\\"string\\\",\\\"street\\\":\\\"string\\\",\\\"number\\\":\\\"string\\\",\\\"neighborhood\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"complement\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\"}},\\\"value\\\":0,\\\"name\\\":\\\"string\\\",\\\"comment\\\":\\\"string\\\",\\\"dayGenerateCharge\\\":5,\\\"frequency\\\":\\\"WEEKLY\\\",\\\"type\\\":\\\"PIX_RECURRING\\\",\\\"dayDue\\\":7,\\\"installmentCount\\\":0,\\\"correlationID\\\":\\\"string\\\",\\\"additionalInfo\\\":[{\\\"key\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"pixRecurringOptions\\\":{\\\"retryPolicy\\\":\\\"NON_PERMITED\\\",\\\"journey\\\":\\\"PAYMENT_ON_APPROVAL\\\",\\\"minimumValue\\\":0}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"value\":0,\"name\":\"string\",\"comment\":\"string\",\"dayGenerateCharge\":5,\"frequency\":\"WEEKLY\",\"type\":\"PIX_RECURRING\",\"dayDue\":7,\"installmentCount\":0,\"correlationID\":\"string\",\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"pixRecurringOptions\":{\"retryPolicy\":\"NON_PERMITED\",\"journey\":\"PAYMENT_ON_APPROVAL\",\"minimumValue\":0}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/subscriptions")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"customer\":{\"name\":\"string\",\"email\":\"string\",\"phone\":\"string\",\"taxID\":\"string\",\"address\":{\"zipcode\":\"string\",\"street\":\"string\",\"number\":\"string\",\"neighborhood\":\"string\",\"city\":\"string\",\"state\":\"string\",\"complement\":\"string\",\"country\":\"string\"}},\"value\":0,\"name\":\"string\",\"comment\":\"string\",\"dayGenerateCharge\":5,\"frequency\":\"WEEKLY\",\"type\":\"PIX_RECURRING\",\"dayDue\":7,\"installmentCount\":0,\"correlationID\":\"string\",\"additionalInfo\":[{\"key\":\"string\",\"value\":\"string\"}],\"pixRecurringOptions\":{\"retryPolicy\":\"NON_PERMITED\",\"journey\":\"PAYMENT_ON_APPROVAL\",\"minimumValue\":0}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/subscriptions/{id}/value:
    put:
      tags:
        - subscription
      summary: >-
        Update the value of the next installments of the subscription. It is
        only possible if pix automatic accepts dynamic value.
      x-required-scope: SUBSCRIPTION_VALUE_PUT
      security:
        - AppID:
            - SUBSCRIPTION_VALUE_PUT
      parameters:
        - name: id
          in: path
          description: The globalID or correlationID of the subscription.
          required: true
          schema:
            type: string
          example: UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=
      responses:
        '200':
          description: The subscription retrieved using the given ID
          content:
            application/json:
              schema:
                type: object
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'PUT',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request PUT \
              --url https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PUT",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("PUT",
            "/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value")
              .put(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/subscriptions/UGF5bWVudFN1YnNjcmlwdGlvbjo2M2UzYjJiNzczZDNkOTNiY2RkMzI5OTM=/value")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Put.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/transfer:
    post:
      tags:
        - transfer (request access)
      summary: Create a Transfer
      description: Endpoint to to transfer values between accounts
      requestBody:
        description: Data to create a transfer
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/TransferCreatePayload'
            example:
              value: 100
              fromPixKey: from@openpix.com.br
              toPixKey: to@openpix.com.br
              correlationID: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Transfer transaction information
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    $ref: '#/components/schemas/TransferTransaction'
                example:
                  transaction:
                    value: 100
                    time: 2023-06-22T15:33:27.165Z,
                    correlationID: c782e0ac-833d-4a89-9e73-9b60b2b41d3a
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: >-
            const http = require('https');


            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/transfer',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({value: 0, fromPixKey: 'string', toPixKey:
            'string', correlationID: 'string'}));

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/transfer \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"value":0,"fromPixKey":"string","toPixKey":"string","correlationID":"string"}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/transfer",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'value' => 0,
                'fromPixKey' => 'string',
                'toPixKey' => 'string',
                'correlationID' => 'string'
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"value\":0,\"fromPixKey\":\"string\",\"toPixKey\":\"string\",\"correlationID\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/transfer", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/transfer\"\n\n\tpayload := strings.NewReader(\"{\\\"value\\\":0,\\\"fromPixKey\\\":\\\"string\\\",\\\"toPixKey\\\":\\\"string\\\",\\\"correlationID\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"value\":0,\"fromPixKey\":\"string\",\"toPixKey\":\"string\",\"correlationID\":\"string\"}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/transfer")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/transfer")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"value\":0,\"fromPixKey\":\"string\",\"toPixKey\":\"string\",\"correlationID\":\"string\"}"


            response = http.request(request)

            puts response.read_body
  /api/v1/webhook/{id}:
    delete:
      tags:
        - webhook
      summary: Delete a Webhook
      x-required-scope: WEBHOOK_DELETE
      security:
        - AppID:
            - WEBHOOK_DELETE
      description: Endpoint to delete a Webhook
      parameters:
        - name: id
          in: path
          description: webhook ID
          required: true
          schema:
            type: string
          examples:
            webhookID:
              value: Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==
            id:
              value: fe7834b4060c488a9b0f89811be5f5cf
      responses:
        '200':
          description: Webhook ID and also the status code
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  status:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'DELETE',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request DELETE \
              --url https://api.openpix.com.br/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA== \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "DELETE",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("DELETE",
            "/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")
              .delete(null)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/webhook/Q2hhcmdlOjYwM2U3NDlhNDI1NjAyYmJiZjRlN2JlZA==")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Delete.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
  /api/v1/webhook:
    get:
      parameters:
        - in: query
          name: url
          description: You can use the url to filter all webhooks
          schema:
            type: string
          example: https://mycompany.com.br/webhook
      tags:
        - webhook
      summary: Get a list of webhooks
      x-required-scope: WEBHOOK_GET_LIST
      security:
        - AppID:
            - WEBHOOK_GET_LIST
      responses:
        '200':
          description: A list of webhooks
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
                  pageInfo:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                            data:
                              type: object
                              properties:
                                skip:
                                  type: number
                                limit:
                                  type: number
                example:
                  pageInfo:
                    skip: 0
                    limit: 100
                    hasPreviousPage: false
                    hasNextPage: true
                  webhooks:
                    - id: V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmMTg=
                      name: webhookName
                      url: https://mycompany.com.br/webhook
                      authorization: openpix
                      event: OPENPIX:TRANSACTION_RECEIVED
                      isActive: true
                      createdAt: '2021-03-02T22:29:10.720Z'
                      updatedAt: '2021-03-02T22:29:10.720Z'
                    - id: V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmOTk=
                      name: webhookName
                      url: https://mycompany.com.br/webhook
                      authorization: openpix
                      event: OPENPIX:CHARGE_CREATED
                      isActive: true
                      createdAt: '2021-03-02T22:29:10.720Z'
                      updatedAt: '2021-03-02T22:29:10.720Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://api.openpix.com.br/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI("https://api.openpix.com.br/api/v1/webhook?url=https%3A%2F%2Fmycompany.com.br%2Fwebhook")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
    post:
      tags:
        - webhook
      summary: Create a new Webhook
      x-required-scope: WEBHOOK_POST
      security:
        - AppID:
            - WEBHOOK_POST
      description: Endpoint to create a new Webhook
      requestBody:
        description: Data to create a new webhook
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook:
                  type: object
                  $ref: '#/components/schemas/WebhookPayload'
              example:
                webhook:
                  name: webhookName
                  event: OPENPIX:CHARGE_CREATED
                  url: https://mycompany.com.br/webhook
                  authorization: openpix
                  isActive: true
      responses:
        '200':
          description: Webhook created specific event when receives a new pix transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    type: object
                    $ref: '#/components/schemas/Webhook'
                example:
                  webhook:
                    id: V2ViaG9vazo2MDNlYmUxZWRlYjkzNWU4NmQyMmNmMTg=
                    name: webhookName
                    url: https://mycompany.com.br/webhook
                    authorization: openpix
                    isActive: true
                    event: OPENPIX:TRANSACTION_RECEIVED
                    createdAt: '2021-03-02T22:29:10.720Z'
                    updatedAt: '2021-03-02T22:29:10.720Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      callbacks:
        receivedPix:
          '{$request.body#/webhook.url}':
            post:
              description: >
                Pix - O callback vai ser acionado sempre que um Pix for recebido
                enviando uma charge e um pix
              requestBody:
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        charge:
                          type: object
                          $ref: '#/components/schemas/Charge'
                        pix:
                          type: object
                          properties:
                            pixQrCode:
                              type: object
                              $ref: '#/components/schemas/PixQrCode'
                            charge:
                              type: object
                              $ref: '#/components/schemas/Charge'
                            customer:
                              type: object
                              $ref: '#/components/schemas/Customer'
                            payer:
                              type: object
                              $ref: '#/components/schemas/Customer'
                            time:
                              type: string
                            value:
                              type: string
                            transactionID:
                              type: string
                            infoPagador:
                              type: string
                            raw:
                              type: object
                              properties:
                                endToEndId:
                                  type: string
                                txid:
                                  type: string
                                valor:
                                  type: string
                                horario:
                                  type: string
                                infoPagador:
                                  type: string
                        pixQrCode:
                          type: object
                      example:
                        charge:
                          status: COMPLETED
                          customer:
                            name: Julio
                            email: email0@example.com
                            phone: '5511999999999'
                            taxID:
                              taxID: '31928282008'
                              type: BR:CPF
                            correlationID: 9134e286-6f71-427a-bf00-241681624586
                          correlationID: 9134e286-6f71-427a-bf00-241681624586
                          transactionID: 9134e2866f71427abf00241681624586
                          brCode: >-
                            000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                            Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                          createdAt: '2021-03-03T20:49:23.605Z'
                          updatedAt: '2021-03-03T20:49:23.668Z'
                        pix:
                          pixQrCode: null
                          charge:
                            status: COMPLETED
                            customer: 604002035cce3b60132343cb
                            correlationID: 9134e286-6f71-427a-bf00-241681624586
                            brCode: >-
                              000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                              Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                            createdAt: '2021-03-03T21:39:15.831Z'
                            updatedAt: '2021-03-03T21:39:15.896Z'
                          customer:
                            name: Julio
                            email: email0@example.com
                            phone: '5511999999999'
                            taxID:
                              taxID: '31928282008'
                              type: BR:CPF
                            correlationID: 9134e286-6f71-427a-bf00-241681624586
                          payer:
                            name: Julio
                            email: email0@example.com
                            phone: '5511999999999'
                            taxID:
                              taxID: '31928282008'
                              type: BR:CPF
                            correlationID: 9134e286-6f71-427a-bf00-241681624586
                          time: '2020-09-09T20:15:00.358Z'
                          value: 9999
                          transactionID: 9134e2866f71427abf00241681624586
                          infoPagador: conta
                          raw:
                            endToEndId: 9134e2866f71427abf00241681624586
                            txid: 9134e2866f71427abf00241681624586
                            valor: '99.99'
                            horario: '2020-09-09T20:15:00.358Z'
                            infoPagador: conta
                        pixQrCode: null
              responses:
                '200':
                  description: Notificação recebida com sucesso
        receivedPixDetached:
          '{$request.body#/webhook.url}':
            post:
              description: >
                Pix Avulso - O callback vai ser acionado sempre que um Pix for
                recebido devolvendo um pix avulso
              requestBody:
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        charge:
                          type: object
                        pix:
                          type: object
                          properties:
                            pixQrCode:
                              type: object
                              $ref: '#/components/schemas/PixQrCode'
                            charge:
                              type: object
                              $ref: '#/components/schemas/Charge'
                            customer:
                              type: object
                              $ref: '#/components/schemas/Customer'
                            payer:
                              type: object
                              $ref: '#/components/schemas/Customer'
                            time:
                              type: string
                            value:
                              type: string
                            transactionID:
                              type: string
                            infoPagador:
                              type: string
                            raw:
                              type: object
                              properties:
                                endToEndId:
                                  type: string
                                txid:
                                  type: string
                                valor:
                                  type: string
                                horario:
                                  type: string
                                infoPagador:
                                  type: string
                        pixQrCode:
                          type: object
                      example:
                        charge: null
                        pix:
                          pixQrCode: null
                          charge: null
                          customer: null
                          time: '2020-09-09T20:15:00.358Z'
                          value: 9999
                          transactionID: 9134e2866f71427abf00241681624586
                          infoPagador: conta
                          raw:
                            endToEndId: 9134e2866f71427abf00241681624586
                            txid: 9134e2866f71427abf00241681624586
                            valor: '99.99'
                            horario: '2020-09-09T20:15:00.358Z'
                            infoPagador: conta
              responses:
                '200':
                  description: Notificação recebida com sucesso
        receivedPixQrCode:
          '{$request.body#/webhook.url}':
            post:
              description: >
                Pix QrCode - O callback vai ser acionado sempre que um Pix
                QrCOde for recebido devolvendo um pix e um pixQrCode
              requestBody:
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        charge:
                          type: object
                        pix:
                          type: object
                          properties:
                            pixQrCode:
                              type: object
                              $ref: '#/components/schemas/PixQrCode'
                            charge:
                              type: object
                              $ref: '#/components/schemas/Charge'
                            payer:
                              type: object
                              $ref: '#/components/schemas/Customer'
                            time:
                              type: string
                            value:
                              type: string
                            transactionID:
                              type: string
                            infoPagador:
                              type: string
                            raw:
                              type: object
                              properties:
                                endToEndId:
                                  type: string
                                txid:
                                  type: string
                                valor:
                                  type: string
                                horario:
                                  type: string
                                infoPagador:
                                  type: string
                        pixQrCode:
                          type: object
                          $ref: '#/components/schemas/PixQrCode'
                      example:
                        charge: null
                        pix:
                          pixQrCode:
                            value: 100
                            comment: good
                            correlationID: 9134e286-6f71-427a-bf00-241681624586
                            identifier: 9134e2866f71427abf00241681624586
                            paymentLinkID: 7777a23s-6f71-427a-bf00-241681624586
                            paymentLinkUrl: >-
                              https://woovi.com/pay/9134e286-6f71-427a-bf00-241681624586
                            qrCodeImage: >-
                              https://api.woovi.com/openpix/pixQrCode/brcode/image/9134e286-6f71-427a-bf00-241681624586.png
                            createdAt: '2021-03-02T17:28:51.882Z'
                            updatedAt: '2021-03-02T17:28:51.882Z'
                            brCode: >-
                              000201010212261060014br.gov.bcb.pix2584https://api.woovi.com/openpix/testing?transactionID=867ba5173c734202ac659721306b38c952040000530398654040.015802BR5909LOCALHOST6009Sao
                              Paulo62360532867ba5173c734202ac659721306b38c963044BCA
                          customer: null
                          time: '2020-09-09T20:15:00.358Z'
                          value: 9999
                          transactionID: 9134e2866f71427abf00241681624586
                          infoPagador: conta
                          raw:
                            endToEndId: 9134e2866f71427abf00241681624586
                            txid: 9134e2866f71427abf00241681624586
                            valor: '99.99'
                            horario: '2020-09-09T20:15:00.358Z'
                            infoPagador: conta
              responses:
                '200':
                  description: Notificação recebida com sucesso
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/webhook',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              webhook: {
                name: 'webhookName',
                event: 'OPENPIX:CHARGE_CREATED',
                url: 'https://mycompany.com.br/webhook',
                authorization: 'openpix',
                isActive: true
              }
            }));
            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request POST \
              --url https://api.openpix.com.br/api/v1/webhook \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"webhook":{"name":"webhookName","event":"OPENPIX:CHARGE_CREATED","url":"https://mycompany.com.br/webhook","authorization":"openpix","isActive":true}}'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/webhook",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'webhook' => [
                    'name' => 'webhookName',
                    'event' => 'OPENPIX:CHARGE_CREATED',
                    'url' => 'https://mycompany.com.br/webhook',
                    'authorization' => 'openpix',
                    'isActive' => null
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("api.openpix.com.br")


            payload =
            "{\"webhook\":{\"name\":\"webhookName\",\"event\":\"OPENPIX:CHARGE_CREATED\",\"url\":\"https://mycompany.com.br/webhook\",\"authorization\":\"openpix\",\"isActive\":true}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/v1/webhook", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/webhook\"\n\n\tpayload := strings.NewReader(\"{\\\"webhook\\\":{\\\"name\\\":\\\"webhookName\\\",\\\"event\\\":\\\"OPENPIX:CHARGE_CREATED\\\",\\\"url\\\":\\\"https://mycompany.com.br/webhook\\\",\\\"authorization\\\":\\\"openpix\\\",\\\"isActive\\\":true}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"webhook\":{\"name\":\"webhookName\",\"event\":\"OPENPIX:CHARGE_CREATED\",\"url\":\"https://mycompany.com.br/webhook\",\"authorization\":\"openpix\",\"isActive\":true}}");

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/webhook")
              .post(body)
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .addHeader("content-type", "application/json")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: >-
            require 'uri'

            require 'net/http'


            url = URI("https://api.openpix.com.br/api/v1/webhook")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"webhook\":{\"name\":\"webhookName\",\"event\":\"OPENPIX:CHARGE_CREATED\",\"url\":\"https://mycompany.com.br/webhook\",\"authorization\":\"openpix\",\"isActive\":true}}"


            response = http.request(request)

            puts response.read_body
  /api/v1/webhook/events:
    get:
      tags:
        - webhook
      summary: Get a list of webhook events
      x-required-scope: WEBHOOK_EVENTS_GET_LIST
      security:
        - AppID:
            - WEBHOOK_EVENTS_GET_LIST
      responses:
        '200':
          description: A list of webhook events
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          $ref: '#/components/schemas/WebhookEventEnum'
                example:
                  events:
                    - name: OPENPIX:CHARGE_CREATED
                    - name: OPENPIX:TRANSACTION_RECEIVED
        '400':
          description: An error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/webhook/events',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/webhook/events \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/webhook/events",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/webhook/events", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/webhook/events\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/webhook/events")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/webhook/events")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
  /api/v1/webhook/ips:
    get:
      tags:
        - webhook
      summary: Get a list of webhook IPs
      x-required-scope: WEBHOOK_IPS_GET
      security:
        - AppID:
            - WEBHOOK_IPS_GET
      responses:
        '200':
          description: A list of webhook IPs
          content:
            application/json:
              schema:
                type: object
                properties:
                  ips:
                    type: array
                    items:
                      type: string
                example:
                  ips:
                    - 189.51.60.9
                    - 138.97.124.129
                    - 177.71.136.66
      x-codeSamples:
        - lang: Node + Native
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'api.openpix.com.br',
              port: null,
              path: '/api/v1/webhook/ips',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://api.openpix.com.br/api/v1/webhook/ips \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Php + Curl
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.openpix.com.br/api/v1/webhook/ips",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: Python + Python3
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.openpix.com.br")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/api/v1/webhook/ips", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Go + Native
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.openpix.com.br/api/v1/webhook/ips\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://api.openpix.com.br/api/v1/webhook/ips")
              .get()
              .addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Ruby + Native
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://api.openpix.com.br/api/v1/webhook/ips")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
components:
  schemas:
    PayloadAccount:
      type: object
      properties:
        accountId:
          type: string
          description: ID of the Account
        isDefault:
          type: boolean
    CompanyBankAccount:
      type: object
      properties:
        accountId:
          type: string
          description: ID of the Account
        isDefault:
          type: boolean
        balance:
          type: object
          properties:
            total:
              type: number
              description: Total amount in cents
            blocked:
              type: number
              description: Total blocked amount in cents (security + withdraw safety)
            available:
              type: number
              description: Available amount in cents
            blockedBySecurity:
              type: number
              description: >-
                Amount blocked due to security restrictions (e.g., PIX_OUT
                blocking)
            blockedByWithdrawSafety:
              type: number
              description: >-
                Amount blocked as minimum balance reserve (withdraw safety
                value)
        taxId:
          type: string
          description: Tax ID associated with the account
        officialName:
          type: string
          description: Official name of the account holder
        tradeName:
          type: string
          description: Trade name of the account holder
        branch:
          type: string
          description: Bank branch number
        account:
          type: string
          description: Bank account number
        accountName:
          type: string
          description: Name of the account
    WithdrawTransaction:
      type: object
      properties:
        endToEndId:
          type: string
          description: ID of the Withdraw Transaction
        value:
          type: string
    AccountRegister:
      type: object
      properties:
        officialName:
          type: string
          description: Official name of the company
        tradeName:
          type: string
          description: Trade name of the company
        taxID:
          type: object
          properties:
            taxID:
              type: string
              description: The tax ID value
            type:
              type: string
              description: The type of tax ID
        status:
          type: string
          description: Status of the account registration
        annualRevenue:
          type: number
          description: Annual revenue of the company
    AccountRegisterPayload:
      type: object
      required:
        - officialName
        - tradeName
        - taxID
        - annualRevenue
      properties:
        officialName:
          type: string
          description: Official name of the company
        tradeName:
          type: string
          description: Trade name of the company
        taxID:
          type: string
          description: Tax ID of the company
        annualRevenue:
          type: number
          description: Annual revenue of the company
    AccountRegisterResponse:
      type: object
      properties:
        officialName:
          type: string
          description: Official name of the company
        tradeName:
          type: string
          description: Trade name of the company
        taxID:
          type: object
          properties:
            taxID:
              type: string
              description: The tax ID value
            type:
              type: string
              description: The type of tax ID
        status:
          type: string
          description: Status of the account registration
    ErrorResponse:
      type: object
      properties:
        error:
          oneOf:
            - type: string
              description: Error message
            - type: array
              description: Validation errors
              items:
                type: object
          type: string
          description: Error message
        success:
          type: boolean
          example: false
    Application:
      type: object
      properties:
        name:
          type: string
          description: Name of the application
        isActive:
          type: boolean
          description: Whether the application is active
        type:
          type: string
          description: Type of the application (API, POS, PLUGIN, CHECKOUT)
          enum:
            - API
            - POS
            - PLUGIN
            - CHECKOUT
            - MASTER
        clientId:
          type: string
          description: Client ID for authentication
        clientSecret:
          type: string
          description: Client secret for authentication
        appID:
          type: string
          description: Unique application identifier
        companyBankAccount:
          type: string
          description: ID of the linked company bank account
        scopes:
          type: array
          items:
            type: string
          description: List of scopes assigned to the application for access control
    ApplicationPayload:
      type: object
      properties:
        accountId:
          type: string
          description: The ID of the company bank account
        application:
          type: object
          properties:
            name:
              type: string
              description: Name of the application
            type:
              type: string
              description: Type of the application (API)
              enum:
                - API
            scopes:
              type: array
              items:
                type: string
              description: >-
                List of scopes to assign to the application. When provided,
                checkScopes will be enabled automatically.
    ApplicationDeletePayload:
      type: object
      properties:
        clientId:
          type: string
          description: The client ID of the application to delete
    Charge:
      type: object
      properties:
        value:
          type: number
        customer:
          type: object
          $ref: '#/components/schemas/Customer'
        type:
          type: string
          enum:
            - DYNAMIC
            - OVERDUE
            - BOLETO
          description: >-
            Charge type is used to determine whether a charge will have a
            deadline, fines and interests
        comment:
          type: string
        brCode:
          type: string
          description: EMV BRCode to be rendered as a QRCode
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
            - EXPIRED
        correlationID:
          type: string
          description: Your correlation ID to keep track of this charge
        paymentLinkID:
          type: string
          description: Payment Link ID, used on payment link and to retrieve qrcode image
        paymentLinkUrl:
          description: Payment Link URL to be shared with customers
        globalID:
          description: External ID of this charge
        transactionID:
          description: >-
            unique uuid used as the txid from Pix into the provider from your
            openpix account. This field link the charge with the transaction
            when paid.
        identifier:
          type: string
          description: Custom identifier for EMV
        qrCodeImage:
          description: QRCode image link URL
        additionalInfo:
          description: Additional info of the charge
          type: array
          items:
            type: object
            properties:
              key:
                description: key of object
                type: string
              value:
                description: value of object
                type: string
        pixKey:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        expiresIn:
          type: string
        expiresDate:
          type: string
          description: Expiration date of the charge in ISO 8601 format.
        dueDate:
          type: string
          description: >-
            Due date for OVERDUE, BOLETO, or subscription charges in ISO 8601
            format.
        subscription:
          type: object
          $ref: '#/components/schemas/Subscription'
        paymentMethods:
          type: object
          properties:
            pix:
              type: object
              nullable: true
              properties:
                method:
                  type: string
                transactionID:
                  type: string
                identifier:
                  type: string
                additionalInfo:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                fee:
                  type: number
                value:
                  type: number
                status:
                  type: string
                txId:
                  type: string
                brCode:
                  type: string
                qrCodeImage:
                  type: string
    ChargePayload:
      type: object
      properties:
        correlationID:
          type: string
          description: Your correlation ID to keep track of this charge
        value:
          type: number
          description: Value in cents of this charge
        type:
          type: string
          enum:
            - DYNAMIC
            - OVERDUE
            - BOLETO
          description: >-
            Charge type is used to determine whether a charge will have a
            deadline, fines and interests
        comment:
          type: string
          description: Comment to be added in infoPagador
        expiresIn:
          type: number
          description: Expires the charge in seconds (minimum is 5 minutes)
        expiresDate:
          type: string
          description: Expiration date of the charge. Only in ISO 8601 format.
        dueDate:
          type: string
          description: >-
            Due date for OVERDUE, BOLETO, or subscription charges in ISO 8601
            format.
        customer:
          type: object
          $ref: '#/components/schemas/CustomerPayload'
        ensureSameTaxID:
          type: boolean
          description: >-
            true to ensure that the payer taxID must be the same as the customer
            taxID.
        fixedLocation:
          type: boolean
          description: >-
            true to fix the qrcode of the charge, same qrcode to all future
            charges.
        paymentLinkID:
          type: string
          description: Payment Link ID, used to link charges to the same qrCode.
        daysForDueDate:
          type: number
          description: >-
            Time in days until the charge hits the deadline so fines and
            interests start applying. This property is only considered for
            charges of type OVERDUE
        daysAfterDueDate:
          type: number
          description: >-
            Time in days that a charge is still payable after the deadline. This
            property is only considered for charges of type OVERDUE
        interests:
          description: >-
            Interests configuration. This property is only considered for
            charges of type OVERDUE
          type: object
          properties:
            value:
              type: number
              description: >-
                Value in basis points of interests to be applied daily after the
                charge hits the deadline
            type:
              type: string
              enum:
                - FIXED
                - PERCENTAGE
              description: Type of interest calculation to be applied
        fines:
          description: >-
            Fines configuration. This property is only considered for charges of
            type OVERDUE
          type: object
          properties:
            value:
              type: number
              description: >-
                Value in basis points of fines to be applied when the charge
                hits the deadline
            type:
              type: string
              enum:
                - FIXED
                - PERCENTAGE
              description: Type of fine calculation to be applied
        discountSettings:
          description: >
            Discount settings for the charge. This property is only considered
            for charges of type OVERDUE.


            **How it interacts with `fines` and `interests`.** Discount only
            applies to payments **before** the due date (controlled by
            `daysForDueDate`). On or after the due date the discount is gone,
            and `fines` (applied once) and `interests` (accruing per day) start
            adding **on top of** `value`. Use the [day-by-day
            simulator](https://github.com/entria/woovi/blob/main/packages/openpix/scripts/api/charge/simulateChargeDiscount.ts)
            to preview the totals a payer sees on each day of the charge
            lifecycle.


            **Modality enum** follows the BACEN COBV (Cobrança com Vencimento)
            spec — see
            [bacen.github.io/pix-api](https://bacen.github.io/pix-api/) for the
            upstream reference.


            **Shape of the object depends on `modality`:**
              - For `FIXED_VALUE_UNTIL_SPECIFIED_DATE` and `PERCENTAGE_UNTIL_SPECIFIED_DATE`, provide `discountFixedDate` (array of items with `daysActive` and `value`). When multiple entries match the current day (i.e. their `daysActive` window has not yet expired), the entry with the **largest** discount wins.
              - For the four advance-day modalities (`VALUE_PER_RUNNING_DAY_ADVANCE`, `VALUE_PER_BUSINESS_DAY_ADVANCE`, `PERCENTAGE_PER_RUNNING_DAY_ADVANCE`, `PERCENTAGE_PER_BUSINESS_DAY_ADVANCE`), provide a single `value`.

            **Rounding.** Computed discount and interest amounts are rounded to
            the nearest cent.
          type: object
          properties:
            modality:
              type: string
              enum:
                - FIXED_VALUE_UNTIL_SPECIFIED_DATE
                - PERCENTAGE_UNTIL_SPECIFIED_DATE
                - VALUE_PER_RUNNING_DAY_ADVANCE
                - VALUE_PER_BUSINESS_DAY_ADVANCE
                - PERCENTAGE_PER_RUNNING_DAY_ADVANCE
                - PERCENTAGE_PER_BUSINESS_DAY_ADVANCE
              description: Modality of discount to be applied
            discountFixedDate:
              description: >-
                Absolute discounts applied to charge. Required when `modality`
                is `FIXED_VALUE_UNTIL_SPECIFIED_DATE` or
                `PERCENTAGE_UNTIL_SPECIFIED_DATE`. Must contain at least one
                entry.
              type: array
              minItems: 1
              items:
                type: object
                properties:
                  daysActive:
                    type: integer
                    minimum: 1
                    description: >
                      Offset in days from charge creation. The discount is valid
                      for payments up to and including this many days after the
                      charge was created. On persistence, the server normalizes
                      this offset into an absolute calendar date (`data`, format
                      `YYYY-MM-DD`) — that is the field returned by the GET
                      endpoint.
                  value:
                    type: number
                    description: |
                      Discount value. Units depend on modality:
                        - `FIXED_VALUE_UNTIL_SPECIFIED_DATE`: cents.
                        - `PERCENTAGE_UNTIL_SPECIFIED_DATE`: basis points (e.g. 100 = 1.00%).
                  data:
                    type: string
                    format: date
                    readOnly: true
                    description: >
                      Server-computed absolute date (`YYYY-MM-DD`) corresponding
                      to `daysActive` at charge-creation time. Read-only —
                      populated automatically and returned on GET; do not send
                      on POST.
            value:
              type: number
              minimum: 1
              description: >
                Discount value. Required when `modality` is one of the
                advance-day modalities. Must be `>= 1`.

                Units depend on modality:
                  - `VALUE_PER_RUNNING_DAY_ADVANCE`: cents per running day.
                  - `VALUE_PER_BUSINESS_DAY_ADVANCE`: cents per business day.
                  - `PERCENTAGE_PER_RUNNING_DAY_ADVANCE`, `PERCENTAGE_PER_BUSINESS_DAY_ADVANCE`: basis points (e.g. 100 = 1.00%).
        additionalInfo:
          type: array
          description: Additional info of the charge
          items:
            type: object
            properties:
              key:
                type: string
                description: key of object
              value:
                type: string
                description: value of object
        enableCashbackPercentage:
          type: boolean
          description: true to enable cashback and false to disable.
        enableCashbackExclusivePercentage:
          type: boolean
          description: true to enable fidelity cashback and false to disable.
        subaccount:
          type: string
          description: Pix key of the subaccount to receive the charge
        splits:
          type: array
          description: >-
            This is the array that will configure how will be splitted the value
            of the charge
          items:
            type: object
            properties:
              value:
                type: number
                description: how much value of that charge will be splitted
              pixKey:
                type: string
                description: >-
                  the pixKey of the company bank account that will receive this
                  split
              splitType:
                type: string
                description: >-
                  The type of the split. Each of these ones will be processed in
                  specific way. [See
                  here](https://developers.openpix.com.br/docs/splits/split-introduction)
                  how each one will be processed.
                enum:
                  - SPLIT_INTERNAL_TRANSFER
                  - SPLIT_SUB_ACCOUNT
                  - SPLIT_PARTNER
            required:
              - value
              - pixKey
      required:
        - correlationID
        - value
    ChargePatchPayload:
      type: object
      properties:
        expiresDate:
          type: string
          description: Expiration date of the charge. Only in ISO 8601 format.
    ChargeRefund:
      type: object
      properties:
        value:
          type: number
          description: Value in cents of this refund
        status:
          type: string
          enum:
            - IN_PROCESSING
            - CONFIRMED
            - REJECTED
        correlationID:
          type: string
          description: Your correlation ID to keep track of this refund
        endToEndId:
          type: string
          description: The endToEndId of this refund
        time:
          type: string
          description: Time of this refund
        comment:
          type: string
          description: Comment of this refund
    ChargeRefundPayload:
      type: object
      properties:
        correlationID:
          type: string
          description: Your correlation ID to keep track for this refund
        value:
          type: number
          description: Value in cents for this refund
        comment:
          type: string
          description: Comment for this refund. Maximum length of 140 characters.
          maximum: 140
      required:
        - correlationID
    Company:
      type: object
      properties:
        officialName:
          type: string
          description: Official name of the company
        tradeName:
          type: string
          description: Trade name of the company
        taxID:
          type: string
          description: Tax ID of the company
        correlationID:
          type: string
          description: Correlation ID of the company
    CompanyResponse:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/Company'
    Customer:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        taxID:
          type: object
          properties:
            taxID:
              type: string
            type:
              type: string
        correlationID:
          type: string
        address:
          type: object
          properties:
            zipcode:
              type: string
            street:
              type: string
            number:
              type: string
            neighborhood:
              type: string
            city:
              type: string
            state:
              type: string
            complement:
              type: string
            country:
              type: string
    CustomerPayload:
      description: >-
        Customer field is not required. However, if you decide to send it, you
        must send at least one of the following combinations, name + taxID or
        name + email or name + phone.
      oneOf:
        - type: object
          properties:
            name:
              type: string
            email:
              type: string
            phone:
              type: string
            taxID:
              type: string
            correlationID:
              type: string
            address:
              type: object
              properties:
                zipcode:
                  type: string
                street:
                  type: string
                number:
                  type: string
                neighborhood:
                  type: string
                city:
                  type: string
                state:
                  type: string
                complement:
                  type: string
                country:
                  type: string
          required:
            - name
            - taxID
        - type: object
          properties:
            name:
              type: string
            email:
              type: string
            phone:
              type: string
            taxID:
              type: string
            correlationID:
              type: string
            address:
              type: object
              properties:
                zipcode:
                  type: string
                street:
                  type: string
                number:
                  type: string
                neighborhood:
                  type: string
                city:
                  type: string
                state:
                  type: string
                complement:
                  type: string
                country:
                  type: string
          required:
            - name
            - email
        - type: object
          properties:
            name:
              type: string
            email:
              type: string
            phone:
              type: string
            taxID:
              type: string
            correlationID:
              type: string
            address:
              type: object
              properties:
                zipcode:
                  type: string
                street:
                  type: string
                number:
                  type: string
                neighborhood:
                  type: string
                city:
                  type: string
                state:
                  type: string
                complement:
                  type: string
                country:
                  type: string
          required:
            - name
            - phone
    CustomerPatchPayload:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        taxID:
          type: string
        address:
          type: object
          properties:
            zipcode:
              type: string
            street:
              type: string
            number:
              type: string
            neighborhood:
              type: string
            city:
              type: string
            state:
              type: string
            complement:
              type: string
            country:
              type: string
    Dispute:
      type: object
      properties:
        status:
          type: string
          enum:
            - IN_REVIEW
            - ACCEPTED
            - REJECTED
            - CANCELED
        name:
          type: string
          description: The name of the payer who created this dispute.
        email:
          type: string
          description: The Email of the payer who created this dispute.
        phoneNumber:
          type: string
          description: The phone number of the payer who created this dispute.
        value:
          type: number
          description: The value of the dispute.
        disputeReason:
          type: string
          description: Reason provided to justify the dispute.
        endToEndId:
          type: string
          description: >-
            The endToEndId of the dispute (Is the same of the endToEndId
            transaction related).
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DisputePayload:
      type: object
      properties:
        status:
          type: string
          enum:
            - CREATED
            - ACCEPTED
            - REJECTED
            - CANCELED
            - IN_REVIEW
        name:
          type: string
          description: The name of the payer who created this dispute.
        email:
          type: string
          description: The Email of the payer who created this dispute.
        phoneNumber:
          type: string
          description: The phone number of the payer who created this dispute.
        value:
          type: number
          description: The value of the dispute.
        disputeReason:
          type: string
          description: Reason provided to justify the dispute.
        endToEndId:
          type: string
          description: >-
            The endToEndId of the dispute (Is the same of the endToEndId
            transaction related).
      required:
        - name
        - email
        - phoneNumber
        - value
        - disputeReason
        - endToEndId
    End:
      type: string
      format: date-time
      title: End Date
      description: End date used in the query. Complies with RFC 3339.
      example: '2020-12-01T17:00:00Z'
    KycOnboardingRepresentative:
      type: object
      properties:
        taxID:
          type: string
          description: CPF do representante (com ou sem mascara)
        name:
          type: string
          description: Nome do representante
      required:
        - taxID
    KycOnboardingRequest:
      type: object
      properties:
        taxID:
          type: string
          description: CNPJ da empresa do merchant (com ou sem mascara)
        correlationID:
          type: string
          description: >-
            Identificador unico para idempotencia. Se nao informado, o CNPJ sera
            usado.
        redirectUrl:
          type: string
          format: uri
          description: >
            URL para onde o merchant sera redirecionado apos concluir o
            onboarding.

            Quando informado, a pagina final do fluxo KYC redireciona
            automaticamente apos 5 segundos.
          example: https://partner.example.com/kyc-done
        representatives:
          type: array
          description: Socios/representantes da empresa
          items:
            $ref: '#/components/schemas/KycOnboardingRepresentative'
      required:
        - taxID
    KycOnboardingAccountRegister:
      type: object
      properties:
        status:
          type: string
          example: PENDING
        officialName:
          type: string
          example: RAZAO_SOCIAL_DA_EMPRESA
        tradeName:
          type: string
          example: NOME_FANTASIA_DA_EMPRESA
        taxID:
          type: object
          properties:
            taxID:
              type: string
              example: XXXXXXXXXXXXXX
            type:
              type: string
              example: BR:CNPJ
        correlationID:
          type: string
          example: my-unique-id
        representatives:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: NOME_DO_SOCIO
              taxID:
                type: object
                properties:
                  taxID:
                    type: string
                    example: XXXXXXXXXXX
                  type:
                    type: string
                    example: BR:CPF
    AccountLimit:
      type: object
      properties:
        pixDayLimit:
          type: number
          description: Pix day total limit in cents
        pixNightLimit:
          type: number
          description: Pix night total limit in cents
        pixOutSameHolderDayLimit:
          type: number
          description: >-
            Pix outbound day limit for transfers between same-holder accounts
            (cents)
        pixOutDifferentHolderDayLimit:
          type: number
          description: >-
            Pix outbound day limit for transfers between different-holder
            accounts (cents)
        pixOutSameHolderNightLimit:
          type: number
          description: >-
            Pix outbound night limit for transfers between same-holder accounts
            (cents)
        pixOutDifferentHolderNightLimit:
          type: number
          description: >-
            Pix outbound night limit for transfers between different-holder
            accounts (cents)
        pixInSameHolderDayLimit:
          type: number
          description: >-
            Pix inbound day limit for transfers between same-holder accounts
            (cents)
        pixInDifferentHolderDayLimit:
          type: number
          description: >-
            Pix inbound day limit for transfers between different-holder
            accounts (cents)
        pixInSameHolderNightLimit:
          type: number
          description: >-
            Pix inbound night limit for transfers between same-holder accounts
            (cents)
        pixInDifferentHolderNightLimit:
          type: number
          description: >-
            Pix inbound night limit for transfers between different-holder
            accounts (cents)
        dayStartAt:
          type: string
          description: Start time of the day window (HH:mm)
          example: '06:00'
        nightStartAt:
          type: string
          description: Start time of the night window (HH:mm)
          example: '20:00'
        boletoEmissionLimit:
          type: number
          description: Maximum number of boletos that can be emitted per day
        boletoMaximumValueLimit:
          type: number
          description: Maximum value (in cents) allowed per boleto emission
    ApplicationEnumTypePayload:
      type: string
      description: >-
        Type of the application that you want to register. Each of this has some
        kind of permissions.
      enum:
        - API
        - PLUGIN
        - ORACLE
    TaxIDObjectPayload:
      type: object
      properties:
        taxID:
          type: string
          description: >-
            The tax identifier of your account holder. This should be a raw
            string with only digits.
        type:
          type: string
          enum:
            - BR:CNPJ
            - BR:CPF
    PreRegistrationUserObject:
      type: object
      properties:
        firstName:
          type: string
          description: >
            The user's first name.

            If the pre registration has been approved, this will be turn the
            company's first user first name.
        lastName:
          type: string
          description: >
            The user's last name.

            If the pre registration has been approved, this will be turn the
            company's first user last name.
        email:
          type: string
          description: >
            The user's email.

            It'll be the email that will entered in contact to validate that
            it's a real person (it's a step to approve the preregistration).

            After approving the preregistration, it'll be the company's user
            email.
        phone:
          type: string
          description: >
            The user's phone number, need to be a validated phone number because
            it'll receive a SMS confirming that is a real person.

            We're accept only values that matches the E.164 standard, that
            follows this pattern: [+][country code][local phone number].
        taxID:
          $ref: '#/components/schemas/TaxIDObjectPayload'
      required:
        - firstName
        - lastName
        - email
        - phone
        - taxID
    PreRegistrationObject:
      type: object
      properties:
        name:
          type: string
          description: >-
            The name of this preregistration. It'll be related as your company
            name too.
        website:
          type: string
          description: A website that is related to this preregistration.
        taxID:
          $ref: '#/components/schemas/TaxIDObjectPayload'
      required:
        - name
        - taxID
    PreRegistrationPayloadObject:
      type: object
      properties:
        preRegistration:
          $ref: '#/components/schemas/PreRegistrationObject'
        user:
          $ref: '#/components/schemas/PreRegistrationUserObject'
    AccountObjectPayload:
      type: object
      properties:
        clientId:
          type: string
          description: >-
            The client ID from the company bank account that is related to this
            preregistration/company.
    CompanyObjectPayload:
      type: object
      properties:
        id:
          type: string
          description: The ID of the company that is related to this preregistration.
        name:
          type: string
          description: The name of the company that is related to this preregistration.
        taxID:
          $ref: '#/components/schemas/TaxIDObjectPayload'
    PreRegistrationObjectPayload:
      type: object
      properties:
        name:
          type: string
          description: >-
            When the preregistration will turn a company, this will be the name
            of the company that this preregistration is related.
        taxID:
          $ref: '#/components/schemas/TaxIDObjectPayload'
    PartnerApplicationPayload:
      type: object
      properties:
        name:
          type: string
          description: The name that identifies your application.
        isActive:
          type: boolean
          description: Current status of your application.
        type:
          $ref: '#/components/schemas/ApplicationEnumTypePayload'
        clientId:
          type: string
          description: The ID of this client application.
        clientSecret:
          type: string
          description: The secret of this client application.
        scopes:
          type: array
          items:
            type: string
          description: List of scopes assigned to the application for access control.
    PaymentApprovePayload:
      type: object
      properties:
        correlationID:
          type: string
          description: the correlation ID of the payment to be approved
    PaymentCreatePayload:
      oneOf:
        - title: Pix key
          type: object
          required:
            - type
            - value
            - destinationAlias
            - destinationAliasType
            - correlationID
          properties:
            type:
              type: string
              enum:
                - PIX_KEY
              description: type of the payment
            value:
              type: number
              description: value of the requested payment in cents
            destinationAlias:
              type: string
              description: the pix key the payment should be sent to
            destinationAliasType:
              type: string
              enum:
                - CPF
                - CNPJ
                - EMAIL
                - PHONE
                - RANDOM
              description: the type of the pix key the payment should be sent to
            correlationID:
              type: string
              description: a unique identifier for your payment
            pixKeyEndToEndId:
              type: string
              description: >-
                the end to end id of the pix key used for track pix key
                consultations
            comment:
              type: string
              description: the comment that will be sent alongside your payment
            metadata:
              type: object
              additionalProperties: true
              description: additional metadata for the payment (max 30 keys)
        - title: QR Code
          type: object
          required:
            - type
            - qrCode
            - correlationID
          properties:
            type:
              type: string
              enum:
                - QR_CODE
              description: type of the payment
            qrCode:
              type: string
              description: >-
                the BR Code (Pix QR Code) string to be paid. The system will
                decode it and extract the destination and value automatically
            value:
              type: number
              description: >-
                optional value in cents. Use this to override the value
                extracted from the QR Code, or to set a value for QR Codes
                without a fixed amount
            correlationID:
              type: string
              description: a unique identifier for your payment
            sourceAccountId:
              type: string
              description: optional source account ID to use for the payment
            comment:
              type: string
              description: the comment that will be sent alongside your payment
            metadata:
              type: object
              additionalProperties: true
              description: additional metadata for the payment (max 30 keys)
        - title: Manual
          type: object
          required:
            - type
            - value
            - correlationID
            - holder
            - account
            - psp
          properties:
            type:
              type: string
              enum:
                - MANUAL
              description: type of the payment
            value:
              type: number
              description: value of the requested payment in cents
            correlationID:
              type: string
              description: a unique identifier for your payment
            pixKeyEndToEndId:
              type: string
              description: >-
                the end to end id of the pix key used for track pix key
                consultations
            psp:
              type: string
              description: the PSP (Payment Service Provider) identifier
            holder:
              type: object
              required:
                - name
                - taxID
              properties:
                name:
                  type: string
                  description: name of the account holder
                taxID:
                  type: object
                  required:
                    - type
                    - taxID
                  properties:
                    type:
                      type: string
                      description: type of the tax ID (e.g., BR:CNPJ)
                    taxID:
                      type: string
                      description: tax ID number
            account:
              type: object
              required:
                - account
                - branch
                - accountType
              properties:
                account:
                  type: string
                  description: account number
                branch:
                  type: string
                  description: branch number
                accountType:
                  type: string
                  description: type of the account (e.g., TRAN)
            metadata:
              type: object
              additionalProperties: true
              description: additional metadata for the payment (max 30 keys)
    Payment:
      type: object
      properties:
        type:
          type: string
          enum:
            - PIX_KEY
            - QR_CODE
            - MANUAL
          description: type of the payment
        value:
          type: number
          description: value of the requested payment in cents
        destinationAlias:
          type: string
          description: the pix key the payment should be sent to
        destinationAliasType:
          type: string
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - RANDOM
          description: the type of the pix key the payment should be sent to
        qrCode:
          type: string
          description: the QR Code to be paid
        correlationID:
          type: string
          description: Your correlation ID to keep track of this payment
        comment:
          type: string
          description: the comment that will be sent alongside your payment
        status:
          type: string
          description: payment status
          enum:
            - CREATED
            - FAILED
            - CONFIRMED
            - DENIED
    Party:
      type: object
      properties:
        account:
          type: object
          properties:
            branch:
              type: string
              description: account branch
            account:
              type: string
              description: account number
            accountType:
              type: string
              description: account type
        psp:
          type: object
          properties:
            id:
              type: string
              description: psp id
            name:
              type: string
              description: psp name
            code:
              type: string
              description: psp code
        holder:
          type: object
          properties:
            name:
              type: string
              description: holder name
            nameFriendly:
              type: string
              description: holder name friendly
        taxID:
          type: object
          properties:
            taxID:
              type: string
              description: taxID
            type:
              type: string
              description: taxID type
    PaymentTransaction:
      type: object
      properties:
        value:
          type: number
          description: value of the transaction generated by the payment in cents
        endToEndId:
          type: string
          description: endToEndId of the transaction generated by the payment
        time:
          type: string
          description: time the transaction generated by the payment happened
        providerRejectedReason:
          type: string
          description: providerRejectedReason
        debitParty:
          type: object
          $ref: '#/components/schemas/Party'
          description: debitParty
        creditParty:
          type: object
          $ref: '#/components/schemas/Party'
          description: creditParty
    PaymentDestination:
      type: object
      properties:
        name:
          type: string
          description: the name of the payment destination
        taxID:
          type: string
          description: the tax id of the payment destination
        pixKey:
          type: string
          description: the pix key of the payment destination
        bank:
          type: string
          description: the payment destination bank name
        branch:
          type: string
          description: the payment destination bank branch
        account:
          type: string
          description: the payment destination bank account
    PixKey:
      type: object
      properties:
        key:
          type: string
        type:
          type: string
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
        isDefault:
          type: boolean
    PixKeyTokens:
      type: object
      properties:
        tokens:
          type: number
        maxTokens:
          type: number
        nextRefresh:
          type: string
        tokensAfterRefresh:
          type: number
        refreshRate:
          type: number
    PixKeyCreate:
      type: object
      required:
        - key
        - type
      properties:
        key:
          type: string
        type:
          type: string
          enum:
            - CNPJ
            - EVP
    PixKeyCheck:
      type: object
      properties:
        pixKey:
          type: string
        type:
          type: string
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
        pixKeyEndToEndId:
          type: string
        owner:
          type: object
          properties:
            account:
              type: string
            branch:
              type: string
            psp:
              type: string
            name:
              type: string
            taxID:
              type: string
    NumericWindow:
      type: object
      description: >-
        Numeric window with 90 days, 12 months, and 60 months (values are
        numeric strings).
      properties:
        d90:
          type: string
          example: '1'
        m12:
          type: string
          example: '10'
        m60:
          type: string
          example: '21'
    FraudMarkers:
      type: object
      properties:
        watermark:
          type: string
          format: date-time
          example: '2025-08-04T17:18:21.716Z'
        applicationFrauds:
          $ref: '#/components/schemas/NumericWindow'
        muleAccounts:
          $ref: '#/components/schemas/NumericWindow'
        scammerAccounts:
          $ref: '#/components/schemas/NumericWindow'
        otherFrauds:
          $ref: '#/components/schemas/NumericWindow'
        unknownFrauds:
          $ref: '#/components/schemas/NumericWindow'
        totalFraudTransactionAmount:
          $ref: '#/components/schemas/NumericWindow'
        distinctFraudReporters:
          $ref: '#/components/schemas/NumericWindow'
    InfractionReports:
      type: object
      properties:
        watermark:
          type: string
          format: date-time
          example: '2025-08-04T17:18:21.756Z'
        openReports:
          type: string
          example: '2'
        openReportsDistinctReporters:
          type: string
          example: '1'
        rejectedReports:
          $ref: '#/components/schemas/NumericWindow'
    KeyOrOwnerStatistics:
      type: object
      properties:
        fraudMarkers:
          $ref: '#/components/schemas/FraudMarkers'
        infractionReports:
          $ref: '#/components/schemas/InfractionReports'
    PixKeyFraudValidationData:
      type: object
      properties:
        keyStatistics:
          $ref: '#/components/schemas/KeyOrOwnerStatistics'
        ownerStatistics:
          $ref: '#/components/schemas/KeyOrOwnerStatistics'
    PixKeyFraudValidationResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/PixKeyFraudValidationData'
    TokenBucketLog:
      type: object
      properties:
        operation:
          type: string
          enum:
            - ADD
            - REMOVE
        reason:
          type: string
        tokens:
          type: number
        tokensBefore:
          type: number
        tokensAfter:
          type: number
        endToEndId:
          type: string
        pixKey:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PixQrCode:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
        comment:
          type: string
        brCode:
          type: string
          description: EMV BRCode to be rendered as a Pix QRCode
        correlationID:
          type: string
          description: Your correlation ID to keep track of this pix qrcode
        paymentLinkID:
          type: string
          description: Payment Link ID, used on payment link and to retrieve qrcode image
        paymentLinkUrl:
          description: Payment Link URL to be shared with customers
        pixKey:
          type: string
          description: The pix key that this qrcode is associated with
        qrCodeImage:
          description: QRCode image link URL
        createdAt:
          type: string
        updatedAt:
          type: string
    PixQrCodePayload:
      type: object
      properties:
        name:
          type: string
          description: Name of this pix qrcode
        correlationID:
          type: string
          description: Your correlation ID to keep track of this qrcode
        value:
          type: number
          description: Value in cents of this qrcode
        comment:
          type: string
          description: Comment to be added in infoPagador
        pixKey:
          type: string
          description: The pix key that this qrcode is associated with
      required:
        - name
    Transaction:
      type: object
      properties:
        charge:
          type: object
          $ref: '#/components/schemas/Charge'
        value:
          type: number
        time:
          type: string
        endToEndID:
          type: string
        transactionID:
          type: string
        infoPagador:
          type: string
        endToEndId:
          type: string
        customer:
          type: object
          $ref: '#/components/schemas/Customer'
        withdraw:
          type: object
          $ref: '#/components/schemas/PixWithdrawTransaction'
        payer:
          type: object
          $ref: '#/components/schemas/Customer'
        type:
          type: string
          description: Pix Transaction type
          enum:
            - CREATED
            - CONFIRMED
            - REFUNDED
            - PARTIAL_REFUND
            - IN_PROCESSING
            - REJECTED
        status:
          type: string
          description: Pix Transaction type
          enum:
            - PAYMENT
            - WITHDRAW
            - REFUND
            - FEE
        globalID:
          description: External ID of this transaction
        pixQrCode:
          type: object
          $ref: '#/components/schemas/PixQrCode'
        webhookSent:
          type: array
          description: >-
            List of webhook delivery attempts for this transaction, sorted by
            most recent first. Each item contains the event name as key with
            status and time, plus an isRetry flag.
          items:
            type: object
            properties:
              isRetry:
                type: boolean
                description: Whether this webhook delivery was a retry
            additionalProperties:
              type: object
              properties:
                status:
                  type: number
                  description: HTTP response status code of the webhook delivery attempt
                time:
                  type: string
                  description: Timestamp of the webhook delivery attempt
          example:
            - OPENPIX:TRANSACTION_RECEIVED:
                status: 200
                time: '2025-01-01T00:00:00.000Z'
              isRetry: false
            - OPENPIX:TRANSACTION_RECEIVED:
                status: 404
                time: '2025-01-02T00:00:00.000Z'
              isRetry: true
    PixWithdrawTransaction:
      type: object
      properties:
        value:
          type: number
        time:
          type: string
        endToEndID:
          type: string
        transactionID:
          type: string
        infoPagador:
          type: string
        endToEndId:
          type: string
        payer:
          type: object
          $ref: '#/components/schemas/Customer'
        type:
          type: string
    Refund:
      type: object
      properties:
        value:
          type: number
        status:
          type: string
          enum:
            - IN_PROCESSING
            - REFUNDED
            - NOT_ACCOMPLISHED
        correlationID:
          type: string
          description: Your correlation ID to keep track of this refund
        refundId:
          type: string
          description: Unique refund ID for this pix refund
        time:
          type: string
          description: Time of this refund
        comment:
          type: string
          description: Comment of this refund
    RefundPayload:
      type: object
      properties:
        value:
          type: number
        transactionEndToEndId:
          type: string
          description: Your transaction ID, or endToEnd ID, to keep track of this refund
        correlationID:
          type: string
          description: Your correlation ID, unique identifier refund
        comment:
          type: string
          description: Comment of this refund. Maximum length of 140 characters.
          maximum: 140
    PSP:
      type: object
      properties:
        name:
          type: string
          description: The name of the PSP
          example: BCO DO BRASIL S.A.
        ispb:
          type: string
          description: The ISPB code of the PSP (8 digits)
          example: '00000000'
        compe:
          type: string
          nullable: true
          description: The COMPE code of the PSP (3 digits)
          example: '001'
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    Start:
      type: string
      format: date-time
      title: Start Date
      description: Start date used in the query. Complies with RFC 3339.
      example: '2020-01-01T00:00:00Z'
    SubAccount:
      type: object
      properties:
        name:
          type: string
          description: Name of the sub account
        pixKey:
          type: string
          description: The pix key for the sub account
        balance:
          type: number
          description: Number in cents that represent the balance of the sub account
        withdrawBlocked:
          type: boolean
          description: >-
            Whether withdrawals are blocked for this sub account due to an
            invalid or restricted pix key
    transaction:
      type: object
      properties:
        status:
          type: string
          description: The status of the transaction
        value:
          type: number
          description: The value of the transaction in cents
        correlationID:
          type: string
          description: The correlation ID of the transaction
        destinationAlias:
          type: string
          description: The pix key of the transaction
        comment:
          type: string
          description: The comment of the transaction
    SubAccountPayload:
      type: object
      properties:
        pixKey:
          type: string
          description: The pix key for the sub account
        name:
          type: string
          description: Name of the sub account
    SubAccountWithdrawPayload:
      type: object
      properties:
        value:
          type: number
          description: >-
            Value of the withdrawal in cents if want to make a partial
            withdrawal
    SubAccountTransferPayload:
      required:
        - value
        - fromPixKey
        - fromPixKeyType
        - toPixKey
        - toPixKeyType
      properties:
        value:
          type: number
          description: The value of the transfer in cents
        fromPixKey:
          type: string
          description: The transfer origin pix key
        fromPixKeyType:
          type: string
          description: The transfer origin pix key type
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - RANDOM
        toPixKey:
          type: string
          description: The transfer destination pix key
        toPixKeyType:
          type: string
          description: The transfer destination pix key type
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - RANDOM
        correlationID:
          type: string
          description: Your correlation ID to keep track of this transfer
    SubAccountTransferResponsePayload:
      type: object
      properties:
        value:
          type: number
          description: The value of the transfer in cents
        destinationSubaccount:
          type: object
          description: The destination subaccount
          properties:
            name:
              type: string
              description: Name of the subaccount
            pixKey:
              type: string
              description: The pix key for the subaccount
            balance:
              type: number
              description: Number in cents that represent the balance of the subaccount
        originSubaccount:
          type: object
          description: The destination subaccount
          properties:
            name:
              type: string
              description: Name of the subaccount
            pixKey:
              type: string
              description: The pix key for the subaccount
            balance:
              type: number
              description: Number in cents that represent the balance of the subaccount
    Subscription:
      type: object
      properties:
        globalID:
          type: string
          description: The globalID of the subscription.
        value:
          type: number
          description: Value in cents of the subscription
        name:
          type: string
          description: Name of the subscription
        customer:
          type: object
          $ref: '#/components/schemas/Customer'
        dayGenerateCharge:
          type: number
          description: Day of the month that the charges will be generated
        type:
          type: string
          enum:
            - PIX_RECURRING
            - RECURRENT
          description: Type of the subscription
        frequency:
          type: string
          enum:
            - WEEKLY
            - MONTHLY
            - SEMIANNUALY
            - ANNUALLY
          description: Frequency of the subscription
        isActive:
          type: boolean
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
            - EXPIRED
        correlationID:
          type: string
          description: Your correlation ID to keep track of this subscription
        paymentLinkUrl:
          type: string
          description: Payment link to this subscription
        addtionalInfo:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
        pixRecurringOptions:
          type: object
          description: Pix automatic options
          properties:
            emv:
              type: string
              description: QR Code
            status:
              type: string
              description: Pix automatic status
              enum:
                - CREATED
                - CANCELED
                - APPROVED
                - EXPIRED
                - REJECTED
            retryPolicy:
              type: string
              enum:
                - NON_PERMITED
                - THREE_RETRIES_7_DAYS
            journey:
              type: string
              description: Journey type of the pix automatic
              enum:
                - PAYMENT_ON_APPROVAL
                - ONLY_RECURRENCY
    SubscriptionPayload:
      type: object
      properties:
        customer:
          type: object
          description: Customer of this subscription
          properties:
            name:
              type: string
              description: Customer name
            email:
              type: string
              description: Customer email
            phone:
              type: string
              description: Customer phone
            taxID:
              type: string
              description: Customer taxID (CPF or CNPJ)
            address:
              type: object
              properties:
                zipcode:
                  type: string
                street:
                  type: string
                number:
                  type: string
                neighborhood:
                  type: string
                city:
                  type: string
                state:
                  type: string
                complement:
                  type: string
                country:
                  type: string
        value:
          type: number
          description: Value in cents of this subscription
        name:
          type: string
          description: Name of the subscription
        comment:
          type: string
          description: Comment to be show in QR Code
        dayGenerateCharge:
          oneOf:
            - type: number
              description: >-
                Day of the month that the charges will be generated. Maximum of
                31.
              minimum: 1
              maximum: 31
              default: 5
            - type: string
              format: date-time
              description: >-
                Full UTC date for the first charge generation (e.g.
                "2026-02-22T00:00:00.000Z"). The day of the month will be
                extracted for recurring charges.
        frequency:
          type: string
          enum:
            - WEEKLY
            - MONTHLY
            - SEMIANNUALLY
            - ANNUALLY
          description: Frequency of the subscription
        type:
          type: string
          enum:
            - PIX_RECURRING
            - RECURRENT
          description: Type of the subscription
        dayDue:
          type: number
          minimum: 3
          default: 7
          description: Days that the charge will take to expire from the generation day.
        installmentCount:
          type: number
          description: number of installments (optional)
        correlationID:
          type: string
          description: Your correlation ID to keep track of this subscription
        additionalInfo:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
        pixRecurringOptions:
          type: object
          description: Pix automatic options
          properties:
            retryPolicy:
              type: string
              enum:
                - NON_PERMITED
                - THREE_RETRIES_7_DAYS
            journey:
              type: string
              description: Journey type of the pix automatic
              enum:
                - PAYMENT_ON_APPROVAL
                - ONLY_RECURRENCY
            minimumValue:
              type: number
              description: Minimum value for each cobr
      required:
        - customer
        - value
        - correlationID
        - type
    Pagination:
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
                properties:
                  skip:
                    type: number
                  limit:
                    type: number
        skip:
          type: number
        limit:
          type: number
        hasPreviousPage:
          type: boolean
        hasNextPage:
          type: boolean
    Installment:
      type: object
      properties:
        dateGenerateCharge:
          type: string
          format: date-time
        expiration:
          type: number
        installmentNumber:
          type: number
        value:
          type: number
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        cobr:
          type: object
          nullable: true
          properties:
            identifierId:
              type: string
            recurrencyId:
              type: string
            installmentId:
              type: string
            endToEndId:
              type: string
            rejectCode:
              type: string
            status:
              type: string
            value:
              type: number
            tries:
              type: array
              items:
                type: object
                properties:
                  tryStatus:
                    type: string
                  finalityPurpose:
                    type: string
                  rejectCode:
                    type: string
                  value:
                    type: number
                  requestedExecutionDate:
                    type: string
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
            paymentDate:
              type: string
            chargeDate:
              type: string
            expiryDate:
              type: string
            description:
              type: string
            createdAt:
              type: string
        paymentSubscriptionGlobalID:
          type: string
        correlationID:
          type: string
        globalID:
          type: string
    TransferCreatePayload:
      type: object
      properties:
        value:
          type: number
          description: value of the transfer in cents
        fromPixKey:
          type: string
          description: >-
            the pix key of the account the value of the transfer will come out
            from
        toPixKey:
          type: string
          description: the pix key of the account the value of the transfer will go to
        correlationID:
          type: string
          description: your correlation ID to keep track of this transfer
    TransferTransaction:
      type: object
      properties:
        value:
          type: number
          description: value of the transaction generated by the transfer
        time:
          type: string
          description: the time the transfer happened
        correlationID:
          type: string
          description: your correlation ID to keep track of this transfer
    WebhookPayload:
      type: object
      properties:
        name:
          type: string
        event:
          type: string
          description: >-
            The event to listen to. If omitted, the webhook will be registered
            to listen the OPENPIX:TRANSACTION_RECEIVED. Event called when a new
            pix transactions is received
          $ref: '#/components/schemas/WebhookEventEnum'
        url:
          type: string
        authorization:
          type: string
        isActive:
          type: boolean
    Webhook:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        event:
          type: string
          $ref: '#/components/schemas/WebhookEventEnum'
        url:
          type: string
        authorization:
          type: string
        isActive:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    WebhookEventEnum:
      type: string
      description: >
        Available events to register a webhook to listen to. If no one selected
        anyone the default event will be OPENPIX:TRANSACTION_RECEIVED.


        * **OPENPIX:CHARGE_CREATED** - New charge created

        * **OPENPIX:CHARGE_COMPLETED** - Charge completed is when a charge is
        fully paid

        * **OPENPIX:CHARGE_EXPIRED** - Charge expired is when a charge is not
        fully paid and expired


        * **OPENPIX:TRANSACTION_RECEIVED** - New PIX transaction received

        * **OPENPIX:TRANSACTION_REFUND_RECEIVED** - New PIX transaction refund
        received or refunded


        * **PIX_TRANSACTION_REFUND_RECEIVED_CONFIRMED** - Pix transaction refund
        received confirmed

        * **PIX_TRANSACTION_REFUND_SENT_CONFIRMED** - Pix transaction refund
        sent confirmed

        * **PIX_TRANSACTION_REFUND_RECEIVED_REJECTED** - Pix transaction refund
        received rejected

        * **PIX_TRANSACTION_REFUND_SENT_REJECTED** - Pix transaction refund sent
        rejected


        * **OPENPIX:MOVEMENT_CONFIRMED** - Payment confirmed is when the pix
        transaction related to the payment gets confirmed

        * **OPENPIX:MOVEMENT_FAILED** - Payment failed is when the payment gets
        approved and a error occurs

        * **OPENPIX:MOVEMENT_REMOVED** - Payment was removed by a user


        * **OPENPIX:MOVEMENT_CONFIRMED** - Movement confirmed

        * **OPENPIX:MOVEMENT_FAILED** - Movement failed

        * **OPENPIX:MOVEMENT_REMOVED** - Movement removed


        * **OPENPIX:DISPUTE_CREATED** - Dispute created

        * **OPENPIX:DISPUTE_ACCEPTED** - Dispute accepted

        * **OPENPIX:DISPUTE_REJECTED** - Dispute rejected

        * **OPENPIX:DISPUTE_CANCELED** - Dispute canceled


        * **ACCOUNT_REGISTER_APPROVED** - Account register approved

        * **ACCOUNT_REGISTER_REJECTED** - Account register rejected

        * **ACCOUNT_REGISTER_PENDING** - Account register pending


        * **PIX_AUTOMATIC_APPROVED** - Pix Automatic approved

        * **PIX_AUTOMATIC_REJECTED** - Pix Automatic rejected

        * **PIX_AUTOMATIC_COBR_CREATED** - Pix Automatic cobr created

        * **PIX_AUTOMATIC_COBR_APPROVED** - Pix Automatic cobr approved

        * **PIX_AUTOMATIC_COBR_REJECTED** - Pix Automatic cobr rejected

        * **PIX_AUTOMATIC_COBR_COMPLETED** - Pix Automatic cobr completed

        * **PIX_AUTOMATIC_COBR_TRY_REJECTED** - Pix Automatic cobr try rejected

        * **PIX_AUTOMATIC_COBR_TRY_REQUESTED** - Pix Automatic cobr try
        requested
      enum:
        - OPENPIX:CHARGE_CREATED
        - OPENPIX:CHARGE_COMPLETED
        - OPENPIX:CHARGE_EXPIRED
        - OPENPIX:CHARGE_COMPLETED_NOT_SAME_CUSTOMER_PAYER
        - OPENPIX:TRANSACTION_RECEIVED
        - OPENPIX:TRANSACTION_REFUND_RECEIVED
        - PIX_TRANSACTION_REFUND_RECEIVED_CONFIRMED
        - PIX_TRANSACTION_REFUND_SENT_CONFIRMED
        - PIX_TRANSACTION_REFUND_RECEIVED_REJECTED
        - PIX_TRANSACTION_REFUND_SENT_REJECTED
        - OPENPIX:MOVEMENT_CONFIRMED
        - OPENPIX:MOVEMENT_FAILED
        - OPENPIX:MOVEMENT_REMOVED
        - OPENPIX:DISPUTE_CREATED
        - OPENPIX:DISPUTE_ACCEPTED
        - OPENPIX:DISPUTE_REJECTED
        - OPENPIX:DISPUTE_CANCELED
        - ACCOUNT_REGISTER_APPROVED
        - ACCOUNT_REGISTER_REJECTED
        - ACCOUNT_REGISTER_PENDING
        - PIX_AUTOMATIC_APPROVED
        - PIX_AUTOMATIC_REJECTED
        - PIX_AUTOMATIC_COBR_CREATED
        - PIX_AUTOMATIC_COBR_APPROVED
        - PIX_AUTOMATIC_COBR_REJECTED
        - PIX_AUTOMATIC_COBR_TRY_REJECTED
        - PIX_AUTOMATIC_COBR_TRY_REQUESTED
        - PIX_AUTOMATIC_COBR_COMPLETED
  securitySchemes:
    AppID:
      type: oauth2
      description: |
        API authentication using Application ID.
        Create an application at https://app.woovi.com to get your AppID.
        Include the AppID in the Authorization header.
      flows:
        authorizationCode:
          authorizationUrl: https://api.woovi.com
          tokenUrl: https://api.woovi.com
          scopes:
            ACCOUNT_GET: Get an Account
            ACCOUNT_GET_LIST: Get a list of Accounts
            ACCOUNT_POST: Duplicates the Account
            ACCOUNT_DELETE: Close an Account
            ACCOUNT_WITHDRAW_POST: Withdraw from an Account
            ACCOUNT_REGISTER_POST: Register a new account
            ACCOUNT_REGISTER_PATCH: Update an existing account registration
            ACCOUNT_REGISTER_GET: Get account register by Tax ID
            ACCOUNT_REGISTER_DELETE: Delete an account registration
            APPLICATION_POST: Create a new application
            APPLICATION_DELETE: Delete an application
            CASHBACK_FIDELITY_BALANCE_GET: >-
              Get the exclusive cashback amount an user still has to receive by
              taxID
            CASHBACK_FIDELITY_POST: Get or create cashback for a customer
            CHARGE_GET: Get one charge
            CHARGE_GET_LIST: Get a list of charges
            CHARGE_POST: Create a new Charge
            CHARGE_PATCH: Edit expiration date of a charge
            CHARGE_DELETE: Delete a charge
            CHARGE_BRCODE_IMAGE_GET: Get a base64 encoded QR Code image from a Charge
            CHARGE_IMAGE_GET: Get an image of Qr Code from a Charge
            CHARGE_REFUND_GET_LIST: Get all refunds of a charge
            CHARGE_REFUND_POST: Create a new refund for a charge
            COMPANY_GET: Get a Company
            CUSTOMER_GET: Get one customer
            CUSTOMER_GET_LIST: Get a list of customers
            CUSTOMER_POST: Create a new Customer
            CUSTOMER_PATCH: Update a Customer
            DECODE_EMV_POST: Parse EMV (PIX) QR code and optionally resolve COB/REC locations
            DISPUTE_POST: Upload new evidence
            DISPUTE_GET: Get one dispute
            DISPUTE_GET_LIST: Get a list of disputes
            PARTNER_COMPANY_POST: Create a pre registration with a partner reference
            PARTNER_COMPANY_GET: Get an specific preregistration via taxID param
            PARTNER_COMPANY_GET_LIST: Get every preregistration that is managed by you
            PARTNER_APPLICATION_POST: Create a new application to some of your preregistrations company
            PAYMENT_GET: Get one Payment
            PAYMENT_GET_LIST: Get a list of payments
            PAYMENT_POST: Create a Payment Request
            PAYMENT_APPROVE_POST: Approve a Payment Request
            PIX_QRCODE_GET: Get one Pix QR Code
            PIX_QRCODE_GET_LIST: Get a list of Pix QR Codes
            PIX_QRCODE_POST: Create a Pix QR Code
            PIX_QRCODE_DELETE: Delete a Pix QR Code
            PSP_GET_LIST: Get a list of PSPs (Payment Service Providers)
            REFUND_GET: Get one refund
            REFUND_GET_LIST: Get a list of refunds
            REFUND_POST: Create a new refund
            STATEMENT_GET: Get statement by company
            SUBACCOUNT_GET: Get subaccount details
            SUBACCOUNT_GET_LIST: Get a list of subaccounts
            SUBACCOUNT_POST: Create a subaccount
            SUBACCOUNT_WITHDRAW_POST: Withdraw from a Sub Account
            SUBACCOUNT_TRANSFER_POST: Transfer between subaccounts
            SUBACCOUNT_DELETE: Delete a Sub Account
            SUBACCOUNT_DEBIT_POST: Debit from a Sub Account and send to the main account
            SUBACCOUNT_CREDIT_POST: Credit a Sub Account from the main account
            SUBSCRIPTION_GET: Get one subscription
            SUBSCRIPTION_GET_LIST: Get a list of subscriptions
            SUBSCRIPTION_POST: Create a new Subscription
            SUBSCRIPTION_INSTALLMENT_GET_LIST: Get a list of installments for a subscription
            SUBSCRIPTION_INSTALLMENT_GET: Get one installment
            SUBSCRIPTION_INSTALLMENT_COBR_POST: Charge an installment
            SUBSCRIPTION_INSTALLMENT_COBR_RETRY_POST: Retry charging an installment
            SUBSCRIPTION_VALUE_PUT: Update the value of the next installments of the subscription
            SUBSCRIPTION_CANCEL_PUT: Cancel a Subscription
            TRANSACTION_GET: Get a Transaction
            TRANSACTION_GET_LIST: Get a list of transactions
            TRANSFER_POST: Transfer between company accounts
            WEBHOOK_GET: Get one webhook
            WEBHOOK_GET_LIST: Get a list of webhooks
            WEBHOOK_EVENTS_GET_LIST: Get a list of webhook events
            WEBHOOK_POST: Create a new Webhook
            WEBHOOK_DELETE: Delete a Webhook
            WEBHOOK_IPS_GET: Get a list of webhook IPs
tags:
  - name: account
    description: |
      Endpoint to manage Accounts
  - name: account register
    description: Endpoint to manage account registrations.
  - name: application
    description: |
      Endpoints to manage applications for authentication and API access.
  - name: cashback-fidelity
    description: |
      Endpoint to manage exclusive cashbacks
  - name: charge
    description: |
      Endpoint to manage Charges
  - name: charge refund
    description: |
      Endpoint to manage charge refunds
  - name: company
    description: |
      Endpoint to manage Company information
  - name: customer
    description: |
      Endpoint to manage Customer
  - name: dispute
    description: |
      Endpoint to manage Dispute
  - name: kyc
    description: Endpoints for KYC onboarding
  - name: account limits
    description: |
      Endpoints to query account limits for a given bank account.
  - name: partner (request access)
    description: |
      Partners integrate affiliated companies.<br/>
      They can register new companies, manage them, and earn money from them.
  - name: payment (request access)
    description: >
      Endpoints to create and manage Pix payment requests. Supports three
      payment types:


      **1. Pix Key (`PIX_KEY`)** - Pay directly to a Pix key (CPF, CNPJ, email,
      phone, or random key).


      **2. QR Code (`QR_CODE`)** - Pay a Pix QR Code (BR Code). Send the raw QR
      Code string and the system will decode it, extract the destination and
      value automatically.


      **3. Manual (`MANUAL`)** - Pay by providing the destination bank account
      details directly (holder, account, branch, PSP).


      ### QR Code Payment Flow


      To pay a QR Code, follow these steps:


      1. **Create the payment** - Call `POST /api/v1/payment` with `type:
      "QR_CODE"` and the `qrCode` field containing the BR Code string. The value
      is automatically extracted from the QR Code. You can optionally provide a
      `value` field to override it (for QR Codes without a fixed value).

      2. **Review the response** - The response includes the decoded payment
      details (destination, value, status `CREATED`).

      3. **Approve the payment** - Call `POST /api/v1/payment/approve` with the
      `correlationID` to execute the payment.

      4. **Check the status** - Call `GET /api/v1/payment/{id}` with the
      correlationID to verify the payment status and get transaction details.
  - name: pixKey
    description: |
      Endpoint to manage Pix Keys
  - name: pixQrCode
    description: |
      Endpoint to manage static QRCodes
  - name: transactions
    description: |
      Endpoint to manage Transactions
  - name: refund
    description: |
      Endpoint to manage Refunds
  - name: psp
    description: >
      Endpoints to manage Payment Service Providers (PSPs) in the PIX ecosystem.


      PSPs are financial institutions that can process PIX payments. Each PSP
      has unique 

      identifiers like ISPB and COMPE codes used for identification and
      validation.
  - name: receipt
    description: >
      Get a pdf document related to a payment transaction formated in a receipt
      style.
  - name: subaccount
    description: |
      Endpoint to manage sub accounts.
  - name: subscription
    description: |
      Endpoint to manage Subscriptions
  - name: CobR
    description: |
      Endpoint to manually create and retry CobR from Pix Automatic
  - name: transfer (request access)
    description: |
      Endpoint to transfer values between accounts.
  - name: webhook
    description: |
      Endpoint to manage Webhooks
