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 practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations." operationId: SearchallinvoicesofaAccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' 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 `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. 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: integer description: Total amount paid (sum of invoices listed with status `Paid`). totalCancelled: type: integer description: Total amount canceled (sum of invoices listed with status `Cancelled`). example: data: - id: A424887D0F2D45028FE5C96E9B0E1A2D-01 friendlyId: u8KFsGDk-1 status: Opened value: 5.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 - 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-10T19:46:50.6295313Z' originalDueDate: '2023-12-10T19:46:50.551354Z' dueDate: '2023-12-10T19:46:50.551354Z' installment: 1 orderId: 1375070513102-01 transactionId: 742F1758D81F4E93BC2A3F8A382D44A8 numberOfInstallments: 1 creditAccountId: fcba59e0-7f26-11ee-ba3c-511336e1518b summary: total: 5.92 count: 2 totalPaid: 0 totalCancelled: 0 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments: post: tags: - Invoices summary: VTex Mark an invoice as paid description: "Records the payment of an invoice.\r\n\r\nThis operation causes a balance restore with the invoice value to the checking account.\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 | **Pay Invoice** |\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: MarkaninvoiceasPaid 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: - Open - 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: Paid value: 5.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 /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/postponement: put: tags: - Invoices summary: VTex Postpone an invoice description: "Postpones an invoice by the amount of time defined on the `dueDays` field (number of days for the invoice to be postponed by).\r\n\r\nThis operation updates the invoice field `dueDate`.\r\n\r\n>⚠️ Before making this request, access the endpoint [Retrieve store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/postponement) to check whether the option to postpone invoice is enabled in the store (`invoicePostponementLimit: value greater than 0` and `postponementEnabled: true`).\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: Postponeaninvoice parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - $ref: '#/components/parameters/invoiceId' requestBody: content: application/json: schema: required: - dueDays type: object properties: dueDays: type: number description: Number of days to postpone the invoice. example: 10 required: true responses: '200': description: OK. This endpoint does not return any data in the response body. deprecated: false /api/creditcontrol/accounts: get: tags: - Account summary: VTex Search all accounts description: "Retrieves a list of all [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) in the store.\r\n\r\n>ℹ️ You can use the queries below (individually or combined) to obtain a more accurate search result. If your store has more than 20 customer credit accounts and you do not use any queries in the call, only the first 20 account records will appear in the response body.\r\n\r\n>ℹ️ Query params can be used individually or combined.\r\n\r\n### Queries to filter results\r\n\r\n- **By the location of the accounts in the list (quantity of accounts)**: `?from={int}&to={int}`\r\n- **By status**: `?status={Open, Closed or Cancelled}`\r\n- **By email**: `?email={string}`\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 | Checking Accounts | **Read Checking Accounts** |\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: Searchallaccounts parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - name: from in: query description: Indicates the starting position of the credit customer account to be searched in the account list. Example, value `1` indicates that the first account 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 credit customer account to be searched in the account list. Example, if the value of `from` is equal to `1` and `to` is `40`, information from 40 accounts will be displayed in the response body of the request. required: false style: form schema: type: string example: '40' - name: status in: query description: Indicates the status of the accounts to be searched for. required: false style: form schema: type: string enum: - Open - Paid - Cancelled example: Paid - name: email in: query description: Indicates the email registered to the account to be searched. required: false style: form schema: type: string example: test@test.com responses: '200': description: OK content: application/json: schema: required: - data - summary type: object properties: data: type: array description: Data information. items: type: object description: Object with information about each account. required: - id - balance - document - status - documentType - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. document: type: string description: Account owner document. status: type: string description: Credit customer account status. This value will always come as `Open`. If an account is closed (`Closed`), it will not be displayed in the response body of this endpoint. enum: - Open - Closed documentType: type: string description: Document type. enum: - CPF - CNPJ - Other creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. summary: required: - count type: object description: Summary information. properties: count: type: integer description: Number of customer credit accounts in the store. example: data: - id: 39f5f920-149f-11ha-b5b0-2vb896d3212f balance: 0 document: '4354353453454' status: Open documentType: CPF creditLimit: 2000 updatedAt: '2020-01-02T15:26:40.3425717Z' createdAt: '2019-12-04T14:06:02.7905117Z' description: '' availableCredit: 2000 preAuthorizedCredit: 0 email: wtest@gmail.com tolerance: 20 availableBalance: 2000 - id: 71d3f4e5-9164-11ea-918f-93b2a93cb9ba balance: 0 document: '10120312' status: Open documentType: CPF creditLimit: 1 updatedAt: '2020-05-08T19:16:40.7202156Z' createdAt: '2020-05-08T19:16:40.5951631Z' description: '' availableCredit: 1 preAuthorizedCredit: 0 email: etest@yahoo.com tolerance: 0 availableBalance: 1 - id: 111111111_CPF balance: 0 document: '111111111' status: Open documentType: CPF creditLimit: 500 updatedAt: '2020-06-30T18:35:25.5793275Z' createdAt: '2020-06-30T18:35:25.5011788Z' description: '' availableCredit: 500 preAuthorizedCredit: 0 email: atest@test.com tolerance: 1 availableBalance: 500 - id: 2222222222_CPF balance: 0 document: '2222222222' status: Open documentType: CPF creditLimit: 100 updatedAt: '2020-07-07T21:08:07.1796362Z' createdAt: '2020-06-30T19:57:50.4832597Z' description: '' availableCredit: 100 preAuthorizedCredit: 0 email: dtest@hotmail.com tolerance: 0 availableBalance: 100 - id: 91d1f2e5-8169-11ea-728f-53b2a03cb8bc balance: 0 document: '0000000000' status: Open documentType: CPF creditLimit: 5000 updatedAt: '2020-07-28T18:50:46.7315579Z' createdAt: '2020-06-30T18:49:35.424369Z' description: '' availableCredit: 5000 preAuthorizedCredit: 0 email: test@test.com tolerance: 0 availableBalance: 5000 summary: count: 5 deprecated: false post: tags: - Account summary: VTex Open an account description: "Opens a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) on your store.\r\n\r\n>⚠️ This request should only be used if you do not have an account yet registered. If you already have an account (open or closed) and want to create or modify an account, go to [Open or Change Account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-accountId-) endpoint.\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 | Checking Accounts | **Create Checking Accounts** |\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: OpenanAccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' requestBody: content: application/json: schema: required: - document - documentType - email - creditLimit - description - tolerance type: object properties: document: type: string description: Account owner document. example: '11111111111' documentType: type: string description: Document type. enum: - CPF - CNPJ - Other example: CPF email: type: string description: Account owner email. example: test@test.com creditLimit: type: string description: Maximum credit amount on the account. example: '1100' description: type: string description: This field is deprecated. example: Not applicable. deprecated: true tolerance: type: string description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. example: '0.2' required: true responses: '200': description: OK content: application/json: schema: required: - id - balance - document - status - documentType - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. document: type: string description: Account owner document. status: type: string description: Credit customer account status. documentType: type: string description: 'Document type. Possible values: `CPF`, `CNPJ` or `Other`.' creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: 11111111111_CPF balance: 0 document: '11111111111' status: Open documentType: CPF creditLimit: 1100 updatedAt: '2023-11-09T13:29:01.2505088Z' createdAt: '2023-11-09T13:29:01.1567887Z' description: '' availableCredit: 1100 preAuthorizedCredit: 0 email: ricardo@teste.com.br tolerance: 0.2 availableBalance: 1100 deprecated: false /api/creditcontrol/accounts/{creditAccountId}: get: tags: - Account summary: VTex Retrieve an account by ID description: "Retrieves a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) by the credit account identification.\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 | Checking Accounts | **Read Checking Accounts** |\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: RetrieveaAccountbyId parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' responses: '200': description: OK content: application/json: schema: required: - id - balance - document - status - documentType - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. document: type: string description: Account owner document. status: type: string description: Credit customer account status. documentType: type: string description: 'Document type. Possible values: `CPF`, `CNPJ` or `Other`.' creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: 11111111111_CPF balance: 0 document: '11111111111' status: Open documentType: CPF creditLimit: 1100 updatedAt: '2023-11-09T13:29:01.2505088Z' createdAt: '2023-11-09T13:29:01.1567887Z' description: '' availableCredit: 1100 preAuthorizedCredit: 0 email: ricardo@teste.com.br tolerance: 0.2 availableBalance: 1100 deprecated: false delete: tags: - Account summary: VTex Close an account description: "Closes a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Create Checking Accounts** |\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: CloseanAccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: type: object properties: document: type: string description: Account owner document. example: '32222222222' documentType: type: string description: Document type. enum: - CPF - CNPJ - Other example: CPF email: type: string description: Account owner email. example: email@domain.com required: true responses: '200': description: OK content: application/json: schema: required: - id - balance - document - status - documentType - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. document: type: string description: Account owner document. status: type: string description: Credit customer account status. documentType: type: string description: Document type. enum: - CPF - CNPJ - Other creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. deprecated: true availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: 32222222222_CPF balance: 0 document: '32222222222' status: Closed documentType: CPF creditLimit: 500 updatedAt: '2023-11-09T14:36:09.0201326Z' createdAt: '2023-11-09T14:31:27.0775349Z' description: '' availableCredit: 500 preAuthorizedCredit: 0 email: test3@teste.com tolerance: 1 availableBalance: 500 deprecated: false put: tags: - Account summary: VTex Update account information description: "Updates information on a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Create Checking Accounts** |\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: Updateemailanddescriptionofaaccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: required: - email - document - documentType type: object properties: email: type: string description: Account owner email. example: test1@test.com document: type: string description: Account owner document. example: '111111111111' documentType: type: string description: Document type. enum: - CPF - CNPJ - Other example: CPF creditLimit: type: number description: Maximum credit amount on the account. example: 3400 tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. example: 0.25 required: true responses: '200': description: OK content: application/json: schema: required: - id - balance - status - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. document: type: string description: Account owner document. status: type: string description: Credit customer account status. documentType: type: string description: Document type. enum: - CPF - CNPJ - Other creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: 30c59e60-895f-11ee-917a-1117db360d00 balance: 0 document: '111111111111' status: Open documentType: CPF creditLimit: 3400 updatedAt: '2023-11-22T19:06:07.4014762Z' createdAt: '2023-11-22T17:47:22.9450309Z' description: '' availableCredit: 3400 preAuthorizedCredit: 0 email: test1@test.com tolerance: 0.25 availableBalance: 3400 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/statements: get: tags: - Account summary: VTex Get account statements description: "Retrieves the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) statements.\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 | Statements | **Read Statements** |\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: Accountstatements parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' responses: '200': description: OK content: application/json: schema: required: - statements - currentBalance - intervalBalance - previousBalance type: object properties: statements: type: array description: Statements information. items: required: - value - date - origin type: object description: Object with information about each statement. properties: value: type: number description: Operation value. date: type: string description: Operation date. doneby: type: string description: Email of the person responsible for the operation. origin: type: string description: Operation origin. enum: - Credit - Invoice - Payment - Statement metadata: type: object description: Metadata information. properties: transactionId: type: string description: Transaction identification. numberOfInstallments: type: number description: Number of installments. currentBalance: type: number description: Current balance value. intervalBalance: type: number description: Interval balance. Indicates the balance between debits and credits made since the account was opened. Negative values ​​indicate that there were more debits than new credits in the account. previousBalance: type: number description: Current balance value. example: statements: - value: -5.01 date: '2023-11-09T18:26:43.3361896Z' origin: Invoice metadata: transactionId: A424887D0F2D45028FE5C96E9B0E1A2D numberOfInstallments: 1 - value: -15 date: '2023-11-09T18:48:32.1436064Z' doneBy: ricardo.silva@vtex.com.br origin: Statement - value: -500 date: '2023-11-09T19:38:04.3798157Z' origin: Credit - value: -200 date: '2023-11-09T19:40:08.9716204Z' origin: Credit - value: 200 date: '2023-11-09T19:40:14.5497445Z' origin: Credit - value: 5.01 date: '2023-11-17T19:33:32.6653898Z' origin: Payment metadata: transactionId: A424887D0F2D45028FE5C96E9B0E1A2D installment: 1 currentBalance: -15 intervalBalance: -1110.9 previousBalance: 0 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/creditlimit: put: tags: - Account summary: VTex Change credit limit of an account description: "Increases or decreases the credit limit of a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Edit credits** |\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: ChangecreditlimitofanAccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: required: - value type: object properties: value: type: number description: Credit limit value. example: 5500 required: true responses: '200': description: OK content: application/json: schema: required: - id - balance - status - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. status: type: string description: Credit customer account status. creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: fcba59e0-7f26-11ee-ba3c-511336e1518b balance: -15 status: Open creditLimit: 5500 updatedAt: '2023-11-22T19:35:40.0047136Z' createdAt: '2023-11-09T17:39:52.151897Z' description: '' availableCredit: 5500 preAuthorizedCredit: 0 email: test@test.com tolerance: 0.3 availableBalance: 5500 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/statements/{statementId}: put: tags: - Account summary: VTex Decrease balance of an account description: "Creates a debit value updating the account balance.\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 | Checking Accounts | **Edit credits** |\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: Decreasebalanceofanaccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - name: statementId in: path description: Statement identification. This is the same `transactionId` value obtained from the [Account statements](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-) endpoint response body. required: true style: simple schema: type: string example: 451924c579a6759cf6e112a requestBody: content: application/json: schema: required: - value type: object properties: value: type: string description: Value to be debited from the account balance. example: '-15' required: true responses: '200': description: OK content: application/json: schema: required: - value type: object properties: value: type: string description: Value debited from the account balance. example: value: '-15.0' deprecated: false /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/settlement: put: tags: - Account summary: VTex Create or update settlement description: "Creates an invoice or update its value for an order placed in the store that used customer credit as a payment method.\r\n\r\n>ℹ️ If payment for the order is made in installments, you can create an invoice for each installment. The first invoice will be due in 30 days, and subsequent invoices will be due 30 days after the previous invoice.\r\n\r\n.\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 | Statements | **Create Statements** |\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: CreateorUpdateSettlement parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - $ref: '#/components/parameters/transactionId' requestBody: content: application/json: schema: required: - value type: object properties: value: type: number description: Value to be settled in the invoice. example: 49.95 required: true responses: '200': description: OK content: application/json: schema: required: - value - id type: object properties: value: type: number description: Invoice value. id: type: string description: Identification of the pre-authorization generated when creating the order. This number plus the information `-01` indicates the number of the invoice created. example: value: 49.95 id: B2E754DCD7304D22866CB6F221CF0FEB deprecated: false /api/creditcontrol/accounts/{creditAccountId}/transactions: post: tags: - Account summary: VTex Create a pre-authorization description: "Creates a Pre-Authorization. Also known as authorization hold, card authorization or pre-auth, pre-authorization is the practice of holding this balance as unavailable until either the merchant clears the transaction, also called settlement, or the hold *falls off*.\r\n\r\nThis operation does not appear in statements, but the available balance will be updated.\r\n\r\nThe result of this operation is generating a `transactionId` (pre-authorization identification) to use in a settlement.\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 | Statements | **Create Statements** |\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: CreateaPreAuthorization parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: required: - value - settle - installments type: object properties: value: type: number description: Pre-Authorization value. example: 49.7 settle: type: boolean description: Indicates whether pre-authorization should be available to be settled. This means that the `transactionId` created in this request can be used to be associated with an order within a maximum period of 30 days. example: true installments: type: number description: Number of installments. example: 1 expirationDate: type: string description: Pre-Authorization expiration date. This field should only be sent if the `settle` field is sent as `false`. example: '2023-11-25' required: true responses: '200': description: OK content: application/json: schema: required: - id - value - installments type: object properties: id: type: string description: Pre-Authorization identification. value: type: number description: Pre-Authorization value. expirationDate: type: string description: Pre-Authorization expiration date. installments: type: number description: Number of installments. example: id: 5d96bcdf0fbc46e1866a05f721f31623 value: 49.7 expirationDate: '2023-11-25T00:00:00' installments: 1 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}: put: tags: - Account summary: VTex Update a pre-authorization description: "Updates information for a specific pre-authorization request.\r\n\r\n>⚠️ This call can only be used for pre-authorizations that have not yet been captured or canceled.\r\n\r\nAlso known as authorization hold, card authorization or pre-auth, pre-authorization is the practice of holding this balance as unavailable until either the merchant clears the transaction, also called settlement, or the hold *falls off*.\r\n\r\nThis operation does not appear in statements but the available balance will be updated.\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 | Statements | **Create Statements** |\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: CreateaPreAuthorization(usingid) parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - $ref: '#/components/parameters/transactionId' requestBody: content: application/json: schema: required: - value - settle - installments type: object properties: value: type: number description: Pre-Authorization value. example: 55 settle: type: boolean description: Indicates whether pre-authorization should be available to be settled. This means that the `transactionId` can be used to be associated with an order within a maximum period of 30 days. example: true installments: type: number description: Number of installments. example: 1 required: true responses: '200': description: OK content: application/json: schema: required: - id - value - installments type: object properties: id: type: string description: Pre-Authorization identification. value: type: number description: Pre-Authorization value. installments: type: number description: Number of installments. example: id: d86454d23a624417b90af3876a31b981 value: 55 installments: 1 deprecated: false delete: tags: - Account summary: VTex Cancel a pre-authorization description: "Cancels a pre-authorization created by the [Create a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transaction) endpoint. \r\n\r\n>⚠️ The pre-authorization can only be deleted by this endpoint if it was created with the `settled` field set to `false` previously.\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 | Statements | **Create Statements** |\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: CancelaPreAuthorization parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - $ref: '#/components/parameters/transactionId' responses: '200': description: OK. This endpoint does not return any data in the response body. deprecated: false /api/creditcontrol/accounts/{creditAccountId}/holders: post: tags: - Account summary: VTex Add an account holder description: "Adds a new account holder to the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU). This new user can share the account's credit limit with users already registered on the account.\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 | Checking Accounts | **Create Checking Accounts** |\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: AddanaccountHolder parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: required: - claims type: object properties: claims: required: - email type: object description: Holder information. properties: email: type: string description: Holder email. example: email@domain.com required: true responses: '200': description: OK content: application/json: schema: required: - level - claims - id - createdAt type: object properties: level: type: number description: Holder hierarchy. The value `2` indicates that the holder is a dependent of the account's main holder. claims: required: - email type: object description: New holder information. properties: email: type: string description: Holder email. id: type: string description: Holder identification. createdAt: type: string description: Date of appointment of the holder. example: level: 2 claims: email: holdertest@holder.com.br id: 054a67b342164018a0f291636c1669f1 createdAt: '2023-11-10T18:33:58.402627Z' deprecated: false /api/creditcontrol/accounts/{creditAccountId}/holders/{holderId}: delete: tags: - Account summary: VTex Delete an account holder description: "Deletes an account holder from the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Create Checking Accounts** |\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: Deleteanaccountholder parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - name: holderId in: path description: Holder identification. required: true style: simple schema: type: string example: 524bc947d2b37a1a759ba3d174b58f9b responses: '200': description: OK content: application/json: schema: required: - id type: object properties: id: type: string description: Identification of the holder deleted from the account. example: id: 054a67b342164018a0f291636c1669f1 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/tolerance: put: tags: - Account summary: VTex Change tolerance of an account description: "Modifies the credit tolerance amount to increase the credit limit on a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Checking Accounts | **Create Checking Accounts** |\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: Changetoleranceofanaccount parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' requestBody: content: application/json: schema: required: - value type: object properties: value: type: number description: This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. example: 0.3 required: true responses: '200': description: OK content: application/json: schema: required: - id - balance - status - creditLimit - updatedAt - createdAt - availableCredit - preAuthorizedCredit - email - tolerance - availableBalance type: object properties: id: type: string description: Credit customer account identification. balance: type: number description: Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used. status: type: string description: Credit customer account status. creditLimit: type: number description: Maximum credit amount on the account. updatedAt: type: string description: Date of the last update made to the account. createdAt: type: string description: Account creation date. description: type: string description: This field is deprecated. deprecated: true availableCredit: type: number description: Credit amount available on the account. preAuthorizedCredit: type: number description: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction. email: type: string description: Account owner email. tolerance: type: number description: Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount. availableBalance: type: number description: Balance available for use on the account. example: id: fcba59e0-7f26-11ee-ba3c-511336e1518b balance: -15 status: Open creditLimit: 12500 updatedAt: '2023-11-10T18:49:50.8074778Z' createdAt: '2023-11-09T17:39:52.151897Z' description: '' availableCredit: 12444.99 preAuthorizedCredit: 55.92 email: test@test.com.br tolerance: 0.3 availableBalance: 12444.99 deprecated: false /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/refunds: post: tags: - Account summary: VTex Partially or totally refund a settlement description: "Refunds a value from an already settled transaction.\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 | Statements | **Create Statements** |\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: PartialorTotalRefundaSettlement parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/creditAccountId' - $ref: '#/components/parameters/transactionId' requestBody: content: application/json: schema: required: - value type: object properties: value: type: number description: Refund amount. This number must always be less than or equal to the value of the captured transaction. example: 30 required: true responses: '200': description: OK content: application/json: schema: required: - value type: object properties: value: type: number description: Refunded amount. example: value: 30 deprecated: false /api/creditcontrol/storeconfig: get: tags: - Store Configuration summary: VTex Retrieve store configuration description: "Gets store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Store Configuration | **Read Configuration** |\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: Retrievestoreconfiguration parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' responses: '200': description: OK content: application/json: schema: required: - dailyInterestRate - invoicePostponementLimit - taxRate - maxPostponementDays - defaultCreditValue - postponementEnabled - automaticCheckingAccountCreationEnabled - toleranceEnabled - myCreditsEnabled - maxPreAuthorizationGrowthRate type: object properties: dailyInterestRate: type: number description: Daily interest rate (percent 0.1 = 10%). invoicePostponementLimit: type: number description: Maximum number of postponements allowed. taxRate: type: number description: Tax rate value (percent 0.1 = 10%). maxPostponementDays: type: number description: Maximum number of days of postponement. defaultCreditValue: type: number description: Default credit amount. postponementEnabled: type: boolean description: Postponement option activated. default: false automaticCheckingAccountCreationEnabled: type: boolean description: Allows users who have not previously received credit to complete an order. default: false toleranceEnabled: type: boolean description: Allows orders to be placed even if they exceed X % of the account's credit limit. default: false myCreditsEnabled: type: boolean description: Show the [My Credits](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront. default: false maxPreAuthorizationGrowthRate: type: number description: Pre-authorization growth-rate value (percent 0.1 = 10%). notificationsSettings: type: object description: Notification settings information. properties: daysPrior: type: array description: Notification information sent before invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days before the invoice payment date is the notification sent. timeOfDay: type: string description: Notification sending time. daysAfter: type: array description: Notification information sent after invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days after the invoice payment date is the notification sent. timeOfDay: type: string description: Notification sending time. example: dailyInterestRate: 0 invoicePostponementLimit: 0 taxRate: 0 maxPostponementDays: 0 defaultCreditValue: 2000 postponementEnabled: false automaticCheckingAccountCreationEnabled: false toleranceEnabled: false myCreditsEnabled: false maxPreAuthorizationGrowthRate: 0 notificationsSettings: daysPrior: - days: 5 timeOfDay: '12:00:00' - days: 1 timeOfDay: '12:00:00' - days: 0 timeOfDay: '12:00:00' daysAfter: - days: 3 timeOfDay: '12:00:00' deprecated: false put: tags: - Store Configuration summary: VTex Create or change store configuration description: "Creates or changes store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\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 | Store Configuration | **Edit Configuration** |\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: Createorchangestoreconfiguration parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' requestBody: content: application/json: schema: required: - dailyInterestRate - invoicePostponementLimit - taxRate - maxPostponementDays - defaultCreditValue - maxPreAuthorizationGrowthRate - myCreditsEnabled - toleranceEnabled - automaticCheckingAccountCreationEnabled - postponementEnabled type: object properties: dailyInterestRate: type: number description: Daily interest rate (percent 0.1 = 10%). example: 0.01 invoicePostponementLimit: type: number description: Maximum number of postponements allowed. example: 2 taxRate: type: number description: Tax rate value (percent 0.1 = 10%). example: 0.4 maxPostponementDays: type: number description: Maximum number of days of postponement. example: 3 defaultCreditValue: type: number description: Default credit amount. example: 150 maxPreAuthorizationGrowthRate: type: number description: Pre-authorization growth rate value (percent 0.1 = 10%). example: 0.1 myCreditsEnabled: type: boolean description: Show the [My Credits](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront. example: true toleranceEnabled: type: boolean description: Allows orders to be placed even if they exceed X % of the account's credit limit. example: true automaticCheckingAccountCreationEnabled: type: boolean description: Allows users who have not previously received credit to complete an order. example: true postponementEnabled: type: boolean description: Postponement option activated. example: true notificationsSettings: type: object description: Notification settings information. properties: daysPrior: type: array description: Notification information sent before invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days before the invoice payment date is the notification sent. example: 1 timeOfDay: type: string description: Notification sending time. example: '16:00:00' daysAfter: type: array description: Notification information sent after invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days after the invoice payment date is the notification sent. example: 0 timeOfDay: type: string description: Notification sending time. example: '12:00:00' required: true responses: '200': description: OK content: application/json: schema: required: - dailyInterestRate - invoicePostponementLimit - taxRate - maxPostponementDays - defaultCreditValue - postponementEnabled - automaticCheckingAccountCreationEnabled - toleranceEnabled - myCreditsEnabled - maxPreAuthorizationGrowthRate type: object properties: dailyInterestRate: type: number description: Daily interest rate (percent 0.1 = 10%). invoicePostponementLimit: type: number description: Maximum number of postponements allowed. taxRate: type: number description: Tax rate value (percent 0.1 = 10%). maxPostponementDays: type: number description: Maximum number of days of postponement. defaultCreditValue: type: number description: Default credit amount. postponementEnabled: type: boolean description: Postponement option activated. default: false automaticCheckingAccountCreationEnabled: type: boolean description: Allows users who have not previously received credit to complete an order. default: false toleranceEnabled: type: boolean description: Allows orders to be placed even if they exceed X % of the account's credit limit. default: false myCreditsEnabled: type: boolean description: Show the [My Credits](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront. default: false maxPreAuthorizationGrowthRate: type: number description: Pre-authorization growth rate value (percent 0.1 = 10%). notificationsSettings: type: object description: Notification settings information. properties: daysPrior: type: array description: Notification information sent before invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days before the invoice payment date is the notification sent. timeOfDay: type: string description: Notification sending time. daysAfter: type: array description: Notification information sent after invoice payment date. items: required: - days - timeOfDay type: object description: Object with information about the moment when the notification is sent. properties: days: type: integer description: How many days after the invoice payment date is the notification sent. timeOfDay: type: string description: Notification sending time. example: dailyInterestRate: 0.01 invoicePostponementLimit: 2 taxRate: 0.4 maxPostponementDays: 3 defaultCreditValue: 150 postponementEnabled: false automaticCheckingAccountCreationEnabled: false toleranceEnabled: false myCreditsEnabled: false maxPreAuthorizationGrowthRate: 0.1 notificationsSettings: daysPrior: - days: 5 timeOfDay: '12:00:00' - days: 1 timeOfDay: '12:00:00' - days: 0 timeOfDay: '12:00:00' daysAfter: - days: 3 timeOfDay: '12:00:00' deprecated: false components: schemas: {} securitySchemes: appKey: type: apiKey in: header name: X-VTEX-API-AppKey description: Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). appToken: type: apiKey in: header name: X-VTEX-API-AppToken description: Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). VtexIdclientAutCookie: type: apiKey in: header name: VtexIdclientAutCookie description: '[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours.' parameters: Content-Type: name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json Accept: name: Accept in: header description: HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json creditAccountId: name: creditAccountId in: path description: Credit account identification. required: true style: simple schema: type: string example: 01bce461-9g03-12ds-8217-b3d39271e15b invoiceId: name: invoiceId in: path description: Invoice identification. required: true style: simple schema: type: string example: A424887D0F2D45028FE5C96E9B0E1A2D-01 friendlyId: name: friendlyId in: query 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. required: false style: form schema: type: string example: u8KFsGDk-1 transactionId: name: transactionId in: path description: Pre-authorization identification. required: true style: simple schema: type: string example: B2E754DCD7304D22866CB6F221CF0FEB tags: - name: Account - name: Invoices - name: Store Configuration security: - appKey: [] appToken: [] - VtexIdclientAutCookie: []