VTEX Customer Credit API

The VTEX Customer Credit API manages credit lines for B2B and B2C customers. It enables merchants to create credit accounts, set credit limits, track outstanding balances, open and close invoices, and manage credit terms. Useful for businesses that extend net-terms or credit facilities to their buyers.

OpenAPI Specification

vtex-customer-credit-openapi-original.yml Raw ↑
openapi: 3.0.0
info:
  title: VTex Customer Credit API
  description: "With Customer Credit your store can enable **credit payments** through the checkout. You can also control **invoices** and the **credit limits** of your clients.\r\n\r\nLearn more about Customer Credit in our [Help Center article](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/36grlQ69NK6OCuioeekyCs).\r\n\r\nAdditionally, you can find more information on installment payments for an order in the `customData`  field found in the [Get Order](https://developers.vtex.com/docs/api-reference/orders-api#get-/api/oms/pvt/orders/-orderId-) endpoint of the Orders API. This includes the number of installments, amount and due dates.\r\n\r\nAll requests need an authorization header. This API allows two kinds of authorization:\r\n\r\n1. Authorization header containing the VTEX ID authentication token.\r\n2. VTEX Appkey and Apptoken headers.\r\n\r\nRead [Authentication](https://developers.vtex.com/docs/guides/authentication) for more information about authentication options.\r\n\r\n## Customer Credit API Index\r\n\r\n### Invoices\r\n\r\n- `GET` [Search all invoices](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/invoices)\r\n- `GET` [Retrieve Invoice by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `PUT` [Change Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `DELETE` [Cancel Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `GET` [Retrieve invoice by creditAccountId](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices)\r\n- `POST` [Mark an invoice as Paid](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/payments)\r\n- `PUT` [Postpone an invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/postponement)\r\n\r\n### Account\r\n\r\n- `GET` [Search all accounts](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts)\r\n- `POST` [Open an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts)\r\n- `GET` [Retrieve an account by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `DELETE` [Close an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `PUT` [Update account information](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `GET` [Account statements](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/statements)\r\n- `PUT` [Change credit limit of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/creditlimit)\r\n- `PUT` [Decrease balance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/statements/-statementId-)\r\n- `PUT` [Create or Update Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/settlement)\r\n- `POST` [Create a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions)\r\n- `PUT` [Update a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)\r\
    \n- `DELETE` [Cancel a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)\r\n- `POST` [Add an account Holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/holders)\r\n- `DELETE` [Delete an account holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/holders/-holderId-)\r\n- `PUT` [Change tolerance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/tolerance)\r\n- `POST` [Partial or Total Refund a Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/refunds)\r\n\r\n### Store Configuration\r\n\r\n- `GET` [Retrieve store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/storeconfig)\r\n- `PUT` [Create or change store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/storeconfig)\r\n"
  contact: {}
  version: '1.0'
servers:
  - url: https://{accountName}.{environment}.com.br
    description: VTEX server URL.
    variables:
      accountName:
        description: Name of the VTEX account. Used as part of the URL
        default: apiexamples
      environment:
        description: Environment to use. Used as part of the URL.
        enum:
          - vtexcommercestable
        default: vtexcommercestable
paths:
  /api/creditcontrol/invoices:
    get:
      tags:
        - Invoices
      summary: VTex Search all invoices
      description: "Returns a list of invoices related to payment orders created through [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n>ℹ️ Query parameters can be used individually or combined to filter invoice results.\r\n\r\n### Queries to filter results\r\n\r\n- **By the location of the invoices in the list (quantity of invoices)**: `?from={int}&to={int}`\r\n- **By creation date**: `?createdDateFrom={dateISO8601}&createDateTo={dateISO8601}`. The dates should be in ISO8601 format.\r\n- **By due date**: `?dueDateFrom={dateISO8601}&dueDateTo={dateISO8601}`. The dates should be in ISO8601 format.\r\n- **By value**: `?value={decimal}`\r\n- **By status**: `?status={string}`\r\n- **By Id**: `?friendlyId={string}`\r\n- **By observation**: `?observation={string}`\r\n- **By creditAccountId**: `?creditAccountId={creditAcountId}`\r\n\r\n### Combining filters\r\n\r\nYou can use the `op` query parameter to specify if filters will be evaluated as `AND` or `OR` for the query. The default behavior when there is more than one query parameter is `AND`.\r\n\r\nExample:\r\n\r\nFor the query `?value=100&status=Paid`, the criteria will build **value = 100 AND status = Paid**.\r\n\r\nFor the same query, adding the `op` parameter (`?value=100&status=Paid&op=or`), the criteria will build **value = 100 OR status = Paid**.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: Searchallinvoices
      parameters:
        - $ref: '#/components/parameters/Content-Type'
        - $ref: '#/components/parameters/Accept'
        - name: from
          in: query
          description: Indicates the starting position of the invoice to be searched in the invoice list. For example, the value `1` indicates that the first invoice in the list will be returned.
          required: false
          style: form
          schema:
            type: string
            example: '1'
        - name: to
          in: query
          description: Indicates the final position of the invoice to be searched in the invoice list. For example, if the value of `from` is equal to `1` and `to` is `300`, information from 300 invoices will be displayed in the response body of the request.
          required: false
          style: form
          schema:
            type: string
            example: '300'
        - name: createdDateFrom
          in: query
          description: Indicates the initial creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
          required: false
          style: form
          schema:
            type: string
            example: '2023-01-20'
        - name: createdDateTo
          in: query
          description: Indicates the final creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
          required: false
          style: form
          schema:
            type: string
            example: '2023-01-25'
        - name: dueDateFrom
          in: query
          description: Indicates the initial due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
          required: false
          style: form
          schema:
            type: string
            example: '2023-01-20'
        - name: dueDateTo
          in: query
          description: Indicates the final due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.
          required: false
          style: form
          schema:
            type: string
            example: '2023-01-25'
        - name: value
          in: query
          description: Indicates the value of the invoices to be searched for. It must be completed with a decimal value.
          required: false
          style: form
          schema:
            type: number
            example: 101.22
        - name: status
          in: query
          description: Indicates the status of the invoices to be searched for.
          required: false
          style: form
          schema:
            type: string
            enum:
              - Open
              - Paid
              - Cancelled
            example: Paid
        - $ref: '#/components/parameters/friendlyId'
        - name: observation
          in: query
          description: Observation notes about the invoice.
          required: false
          style: form
          schema:
            type: string
            example: Some observation about the invoice
        - name: creditAccountId
          in: query
          description: Credit account identification.
          required: true
          style: form
          schema:
            type: string
            example: 01bce461-9g03-12ds-8217-b3d39271e15b
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                  - data
                  - summary
                type: object
                properties:
                  data:
                    type: array
                    description: Data information.
                    items:
                      required:
                        - id
                        - friendlyId
                        - status
                        - value
                        - accountId
                        - creditValue
                        - createdAt
                        - updatedAt
                        - originalDueDate
                        - dueDate
                        - installment
                        - orderId
                        - transactionId
                        - numberOfInstallments
                        - creditAccountId
                      type: object
                      description: Object with information about each invoice.
                      properties:
                        id:
                          type: string
                          description: Invoice identification.
                        friendlyId:
                          type: string
                          description: Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.
                        status:
                          type: string
                          description: Invoice status.
                          enum:
                            - Opened
                            - Paid
                            - Cancelled
                        value:
                          type: number
                          description: Invoice value.
                        accountId:
                          type: string
                          description: Account identification. It is the same `creditAccountId` parameter used in other Customer Credit API endpoints.
                        creditValue:
                          type: number
                          description: Credit value.
                        createdAt:
                          type: string
                          description: Invoice creation date.
                        resolvedAt:
                          type: string
                          description: Invoice closing date.
                          nullable: true
                        updatedAt:
                          type: string
                          description: Date of the last update made to the invoice.
                        paymentLink:
                          type: string
                          description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                          nullable: true
                        originalDueDate:
                          type: string
                          description: Original invoice expiration date.
                        dueDate:
                          type: string
                          description: Modified invoice expiration date.
                        installment:
                          type: number
                          description: Identification of installment number.
                        orderId:
                          type: string
                          description: Identification of the order that generated the invoice.
                        observation:
                          type: string
                          description: Observation notes about the invoice.
                          nullable: true
                        transactionId:
                          type: string
                          description: Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.
                        numberOfInstallments:
                          type: number
                          description: Number of installments.
                        creditAccountId:
                          type: string
                          description: Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.
                  summary:
                    required:
                      - total
                      - count
                    type: object
                    description: Summary information.
                    properties:
                      total:
                        type: number
                        description: Total amount payable (sum of invoices listed with status `Open`).
                      count:
                        type: integer
                        description: Number of invoices listed.
                      totalPaid:
                        type: number
                        description: Total amount paid (sum of invoices listed with status `Paid`).
                      totalCancelled:
                        type: number
                        description: Total amount canceled (sum of invoices listed with status `Cancelled`).
              example:
                data:
                  - id: A424887D0F2D45028FE5C96E9B0E1A2D-01
                    friendlyId: u8KFsGDk-1
                    status: Paid
                    value: 5.01
                    accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                    creditValue: 0
                    createdAt: '2023-11-09T18:26:43.2112234Z'
                    resolvedAt: '2023-11-13T19:12:17.2778233Z'
                    updatedAt: '2023-11-13T19:12:17.3403115Z'
                    paymentLink: https://www.teste.com.br
                    originalDueDate: '2023-12-09T18:26:43.2112234Z'
                    dueDate: '2023-12-09T18:26:43.2112234Z'
                    installment: 1
                    orderId: 1375060513100-01
                    observation: Open test
                    transactionId: A424887D0F2D45028FE5C96E9B0E1A2D
                    numberOfInstallments: 1
                    creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                  - id: 742F1758D81F4E93BC2A3F8A382D44A8-01
                    friendlyId: 8UfrLSCc-1
                    status: Opened
                    value: 0.91
                    accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                    creditValue: 0
                    createdAt: '2023-11-10T19:46:50.551354Z'
                    updatedAt: '2023-11-14T12:07:21.9823956Z'
                    originalDueDate: '2023-12-10T19:46:50.551354Z'
                    dueDate: '2023-12-18T19:46:50.551354Z'
                    installment: 1
                    orderId: 1375070513102-01
                    transactionId: 742F1758D81F4E93BC2A3F8A382D44A8
                    numberOfInstallments: 1
                    creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                  - id: 742235D7E5E840798EC28A02EBA9E855-01
                    friendlyId: mvOEfmdk-1
                    status: Cancelled
                    value: 1.21
                    accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                    creditValue: 0
                    createdAt: '2023-11-13T18:05:39.1334296Z'
                    resolvedAt: '2023-11-13T19:25:22.1919688Z'
                    updatedAt: '2023-11-13T19:25:22.3326219Z'
                    originalDueDate: '2023-12-13T18:05:39.1334296Z'
                    dueDate: '2023-12-13T18:05:39.1334296Z'
                    installment: 1
                    orderId: 1376020513104-01
                    transactionId: 742235D7E5E840798EC28A02EBA9E855
                    numberOfInstallments: 1
                    creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                summary:
                  total: 0.91
                  count: 3
                  totalPaid: 5.01
                  totalCancelled: 1.21
      deprecated: false
  /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}:
    get:
      tags:
        - Invoices
      summary: VTex Retrieve invoice by ID
      description: "Returns data from a specific invoice using `invoiceId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: RetrieveInvoicebyId
      parameters:
        - $ref: '#/components/parameters/Content-Type'
        - $ref: '#/components/parameters/Accept'
        - $ref: '#/components/parameters/creditAccountId'
        - $ref: '#/components/parameters/invoiceId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                  - id
                  - friendlyId
                  - status
                  - value
                  - accountId
                  - creditValue
                  - createdAt
                  - updatedAt
                  - originalDueDate
                  - dueDate
                  - installment
                  - orderId
                  - transactionId
                  - numberOfInstallments
                  - creditAccountId
                type: object
                properties:
                  id:
                    type: string
                    description: Invoice identification.
                  friendlyId:
                    type: string
                    description: Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.
                  status:
                    type: string
                    description: Invoice status.
                    enum:
                      - Opened
                      - Paid
                      - Cancelled
                  value:
                    type: number
                    description: Invoice value.
                  accountId:
                    type: string
                    description: Account identification. It is the same `checkingAccountId` parameter used in other Customer Credit API endpoints.
                  creditValue:
                    type: number
                    description: Credit value.
                  createdAt:
                    type: string
                    description: Invoice creation date.
                  updatedAt:
                    type: string
                    description: Date of the last update made to the invoice.
                  originalDueDate:
                    type: string
                    description: Original invoice expiration date.
                  dueDate:
                    type: string
                    description: Modified invoice expiration date.
                  installment:
                    type: number
                    description: Identification of installment number.
                  orderId:
                    type: string
                    description: Identification of the order that generated the invoice.
                  transactionId:
                    type: string
                    description: Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.
                  numberOfInstallments:
                    type: number
                    description: Number of installments.
                  creditAccountId:
                    type: string
                    description: Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.
              example:
                id: A424887D0F2D45028FE5C96E9B0E1A2D-01
                friendlyId: u8KFsGDk-1
                status: Opened
                value: 50.01
                accountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
                creditValue: 0
                createdAt: '2023-11-09T18:26:43.2112234Z'
                updatedAt: '2023-11-09T18:26:43.289316Z'
                originalDueDate: '2023-12-09T18:26:43.2112234Z'
                dueDate: '2023-12-09T18:26:43.2112234Z'
                installment: 1
                orderId: 1375060513100-01
                transactionId: A424887D0F2D45028FE5C96E9B0E1A2D
                numberOfInstallments: 1
                creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b
      deprecated: false
    put:
      tags:
        - Invoices
      summary: VTex Change invoice
      description: "Updates invoice's `status`, `observation` and `paymentLink` attributes.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: ChangeInvoice
      parameters:
        - $ref: '#/components/parameters/Content-Type'
        - $ref: '#/components/parameters/Accept'
        - $ref: '#/components/parameters/creditAccountId'
        - $ref: '#/components/parameters/invoiceId'
        - $ref: '#/components/parameters/friendlyId'
      requestBody:
        content:
          application/json:
            schema:
              required:
                - status
              type: object
              properties:
                status:
                  type: string
                  description: Invoice status.
                  enum:
                    - Open
                    - Paid
                    - Cancelled
                  example: Paid
                observation:
                  type: string
                  description: Observation notes about the invoice.
                  example: BF 2023 customer invoice.
                  nullable: true
                paymentLink:
                  type: string
                  description: Link (URL) created to direct the customer to an invoice payment environment (optional).
                  example: https://paymentlink.com
                  nullable: true
        required: true
      responses:
        '200':
          description: OK. This endpoint does not return any data in the response body.
      deprecated: false
    delete:
      tags:
        - Invoices
      summary: VTex Cancel invoice
      description: "Changes the status of a specific invoice (`invoiceId`) to `Cancelled`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
      operationId: CancelInvoice
      parameters:
        - $ref: '#/components/parameters/Content-Type'
        - $ref: '#/components/parameters/Accept'
        - $ref: '#/components/parameters/creditAccountId'
        - $ref: '#/components/parameters/invoiceId'
      responses:
        '200':
          description: OK. This endpoint does not return any data in the response body.
      deprecated: false
  /api/creditcontrol/accounts/{creditAccountId}/invoices:
    get:
      tags:
        - Invoices
      summary: VTex Retrieve invoices by creditaccountid
      description: "Returns associated invoices given a specific `creditAccountId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practic

# --- truncated at 32 KB (146 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vtex/refs/heads/main/openapi/vtex-customer-credit-openapi-original.yml