[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides managing a customer credit account in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account)

[Managing a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-invoice)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account)

[Managing a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-invoice)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides)

Integration Guides

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account)

Managing a Customer Credit account

This guide describes how to manage a [Customer Credit account](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0) in your store by performing the following actions through the endpoints of the [Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api):

* [Create a Customer Credit account](#creating-a-customer-credit-account)
* [Check Customer Credit account details](#checking-customer-credit-account-details)
* [Update personal information and credit settings](#changing-customer-credit-account-information)
* [Check operations statement](#checking-operations-in-a-customer-credit-account)
* [Register dependents for credit sharing](#sharing-credit-with-dependents)
* [Check all Customer Credit accounts of a store](#checking-all-customer-credit-accounts-of-a-store)
* [Close a Customer Credit account](#closing-a-customer-credit-account)

> For more information about Customer Credit functionalities, access [Customer Credit - Overview](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0) and [Customer Credit - Getting Started](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/21ok0GBwmcIeaY2IukYMOg).

## Creating a Customer Credit account

To provide exclusive credit to a customer, you can create a Customer Credit account via VTEX Admin or use the [Open an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts) endpoint. In this request, you must send the following customer data and account usage parameters:

* `document`: Customer document.
* `documentType`: Document type (CPF, CNPJ, other).
* `email`: Customer email.
* `creditLimit`: Maximum credit amount on the account.
* `tolerance`: 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 customer - can use up to 30% above the account's original maximum credit amount.

**POST - Open an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts`

Request body

`1

{

2

 "document": "55555555555",

3

 "documentType": "CPF",

4

 "email": "customer@test.com",

5

 "creditLimit": "3000",

6

 "tolerance": "0.05"

7

}

`

The endpoint will return some of the previously sent data and new information about the created account, such as:

* `id`: Client’s Customer Credit account identification.
* `balance`: Account balance value. If this number is negative, the account has a debit instead of a credit to be used.
* `status`: Client’s Customer Credit account status. All accounts are created with the status `Open`.
* `updatedAt`: Date of the last update made to the account (UTC format).
* `createdAt`: Account creation date (UTC format).
* `availableCredit`: Credit amount available on the account.
* `preAuthorizedCredit`: Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.
* `availableBalance`: Balance available in the account

Response body

`1

{

2

 "id": "55555555555_CPF",

3

 "balance": 0.0,

4

 "document": "55555555555",

5

 "status": "Open",

6

 "documentType": "CPF",

7

 "creditLimit": 3000.00,

8

 "updatedAt": "2024-02-22T20:43:21.8753045Z",

9

 "createdAt": "2024-02-22T20:43:21.8287567Z",

10

 "description": "",

11

 "availableCredit": 3000.00,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customer@test.com",

14

 "tolerance": 0.05,

15

 "availableBalance": 3000.00

16

}

`

You can also access your VTEX Admin (**Apps > Customer Credit > Accounts**) to confirm that the new Customer Credit account was created.

![{"base64":"  ","img":{"width":1502,"height":606,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":78571,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_1.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_1.png)

> When the Customer Credit account is created using the [Open an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts) endpoint, the account identification (`id`) will be composed of information from the `document` and `documentType` fields, for example, `55555555555_CPF`. If account creation is performed through your VTEX Admin (**Apps > Customer credit > Accounts > New**), an identification code will be randomly created by the system and will be used as account identification, such as `92bccd01-b4ed-15sa-88a4 -175868a0bf42`.

## Checking Customer Credit account details

When you want to check details about a specific Customer Credit account, you can use the [Retrieve an account by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-) endpoint. In this request, you must send the account identification (`id`) as a path parameter.

See an example below using the account `111111111_CPF`:

**GET - Retrieve an account by ID**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/111111111_CPF`

Response body

`1

{

2

 "id": "111111111_CPF",

3

 "balance": 0.0,

4

 "document": "111111111",

5

 "status": "Open",

6

 "documentType": "CPF",

7

 "creditLimit": 5000.0,

8

 "updatedAt": "2024-02-22T21:47:37.2832458Z",

9

 "createdAt": "2024-02-22T21:47:37.2207379Z",

10

 "description": "",

11

 "availableCredit": 5000.0,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customer2@test.com",

14

 "tolerance": 0.0,

15

 "availableBalance": 5000.0,

16

}

`

> You can also check a Customer's Credit account details using the VTEX Admin. For more information, go to **Apps > Customer Credit > Accounts** and click the desired account.

## Changing Customer Credit account information

The Customer Credit API allows you to modify an account settings through the following actions:

* [Update account information](#updating-account-information)
* [Change credit limit](#changing-the-credit-limit-of-an-account)
* [Change tolerance](#changing-a-credit-account-tolerance)

### Updating account information

The [Update account information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-) endpoint must be used to update the email address, type, and document number registered to the client.

> You can also use this endpoint to change the credit limit and tolerance information, but it will be mandatory to send the `id`, `document`, and `documentId` fields, even when you do not intend to update this information. If the `id`, `document`, and `documentId` fields are not sent in this request, the information related to them will be removed from the account.

See an example below using the account `fe60ff40-d1cb-11ee-a0ed-87f4fcc03446`:

**PUT - Update account information**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446`

Request body

`1

{

2

 "email": "customer32@test.com",

3

 "document": "44444444",

4

 "documentType": "CPF"

5

}

`

The endpoint will return the account details with updated information.

Response body

`1

{

2

 "id": "fe60ff40-d1cb-11ee-a0ed-87f4fcc03446",

3

 "balance": 0.0,

4

 "document": "44444444",

5

 "status": "Open",

6

 "documentType": "CPF",

7

 "creditLimit": 4500.0,

8

 "updatedAt": "2024-02-23T17:21:41.6800112Z",

9

 "createdAt": "2024-02-22T21:47:37.2207379Z",

10

 "description": "",

11

 "availableCredit": 4500.0,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customer32@test.com",

14

 "tolerance": 0.0,

15

 "availableBalance": 5000.0

16

}

`

### Changing the credit limit of an account

The [Change credit limit of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/creditlimit) endpoint must be used when you want to change the credit limit value available to a customer credit account. In this request, you must send the account identification (`id`) as a path parameter and the `value` field containing the new credit limit, as shown in the example below:

**PUT - Change credit limit of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/creditlimit`

Request body

`1

{

2

 "value": 5300

3

}

`

The endpoint will return the account details and the `creditLimit` field already updated.

Response body

`1

{

2

 "id": "fe60ff40-d1cb-11ee-a0ed-87f4fcc03446",

3

 "balance": 0.0,

4

 "document": "44444444",

5

 "status": "Open",

6

 "documentType": "CPF",

7

 "creditLimit": 5300.0,

8

 "updatedAt": "2024-02-23T17:44:44.7931543Z",

9

 "createdAt": "2024-02-22T21:47:37.2207379Z",

10

 "description": "",

11

 "availableCredit": 5300.0,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customer32@test.com",

14

 "tolerance": 0.3,

15

 "availableBalance": 5300.0

16

}

`

### Changing a credit account tolerance

The [Change tolerance of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/tolerance) endpoint must be used when you want to change the credit tolerance amount available on a customer credit account.

In this request, you must send the account identification (`id`) as a path parameter and the `value` field containing the new credit limit. The `value` is represented by a decimal number, where a `value` of `0.30` means 30% of tolerance.

See an example below using the account `fe60ff40-d1cb-11ee-a0ed-87f4fcc03446` and a tolerance of 15%.

**PUT - Change tolerance of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/tolerance`

Request body

`1

{

2

 "value": 0.15

3

}

`

The endpoint will return the account details and the `tolerance` field already updated.

Response body

`1

{

2

 "id": "fe60ff40-d1cb-11ee-a0ed-87f4fcc03446",

3

 "balance": 0.0,

4

 "document": "44444444",

5

 "status": "Open",

6

 "documentType": "CPF",

7

 "creditLimit": 5800.00,

8

 "updatedAt": "2024-02-23T18:03:03.4849783Z",

9

 "createdAt": "2024-02-22T21:47:37.2207379Z",

10

 "description": "",

11

 "availableCredit": 5800.00,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customer32@test.com",

14

 "tolerance": 0.15,

15

 "availableBalance": 5800.00

16

}

`

## Checking operations in a customer credit account

The [Get account statements](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/statements) endpoint can be used to track operations performed on a customer credit account, such as:

* [Customer credit limit modification](#tracking-a-credit-limit-change-operation)
* [Tolerance percentage modification](#tracking-a-tolerance-value-change-transaction)
* [Invoice Issuance](#tracking-a-credit-invoice-creation)
* [Invoice payment](#tracking-a-credit-invoice-payment)

In this request, you must send the account identification (`id`) as a path parameter:

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

If you send the `id` of a new account or one without an operation type, the response body of the request will not present any value, as shown below:

Response body

`1

{

2

 "statements": [],

3

 "currentBalance": 0.0,

4

 "intervalBalance": 0.0,

5

 "previousBalance": 0.0

6

}

`

### Tracking a credit limit change operation

When the credit limit of a customer credit account is modified via VTEX Admin or through the [Change credit limit of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/creditlimit) endpoint, it is possible to identify the new value indicated and when the operation was carried out.

See below a scenario where an initial credit limit USD 10.000 is reduced to USD 9.000 and then increased to USD 12.000\. The tolerance value configured on this account is 10%.

#### FIRST OPERATION: Decreasing credit limit from USD 10.000 to USD 9.000

**PUT - Change credit limit of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/creditlimit`

Request body

`1

{

2

 "value": 9.000

3

}

`

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": -1100.0,

5

 "date": "2024-02-26T13:29:08.3978356Z",

6

 "origin": "Credit"

7

 }

8

 ],

9

 "currentBalance": 0.0,

10

 "intervalBalance": -1100.0,

11

 "previousBalance": 0.0

12

}

`

Note that the value displayed in the `value` field is indicated by a negative sign and 1100.0, instead of 1000.0 which would correspond to how much the credit limit was reduced. This occurs because the endpoint returns the sum of the amount of the reduced credit limit and the percentage of credit tolerance applied to it, in this case, 10% over 1000.0 (100.0).

#### SECOND OPERATION: Increasing credit limit from USD 9.000 to USD 12.000

**PUT - Change credit limit of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/creditlimit`

Request body

`1

{

2

 "value": 12.000

3

}

`

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": -1100.0,

5

 "date": "2024-02-26T17:08:49.3904874Z",

6

 "origin": "Credit"

7

 },

8

 {

9

 "value": 3300.0,

10

 "date": "2024-02-26T17:08:55.3123304Z",

11

 "origin": "Credit"

12

 }

13

 ],

14

 "currentBalance": 0.0,

15

 "intervalBalance": 2200.0,

16

 "previousBalance": 0.0

17

}

`

As in the credit limit-reducing operation, the value present in the "value" field (3300.0) is indicated by the sum of the value added to the credit limit (3000.0) and the percentage of credit tolerance applied to the operation, 10% on 3000.0 (300.0).

> The "intervalBalance" field is responsible for showing the balance between all amounts reduced and added in operations performed on a customer credit account since its opening. In this case, 2200.0 (3300.0 - 1100.0).

### Tracking a tolerance value change transaction

When the credit tolerance value in a customer credit account is modified via VTEX Admin or through the [Change tolerance of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/tolerance) endpoint, it is possible to identify the new value indicated and when the operation was carried out.

See below a scenario where an initial credit tolerance of 10% is reduced to 0%, and then increased to 25%. The credit limit value configured on this account is 5.000.

#### FIRST OPERATION: Decreasing credit tolerance from 10% to 0%

**PUT - Change tolerance of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/tolerance`

Request body

`1

{

2

 "value": 0

3

}

`

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": -500.0,

5

 "date": "2024-02-26T20:04:27.7754907Z",

6

 "origin": "Credit"

7

 }

8

 ],

9

 "currentBalance": 0.0,

10

 "intervalBalance": -500.0,

11

 "previousBalance": 0.0

12

}

`

Note that the value displayed in the `value` field is indicated by a negative sign (reduced tolerance percentage) and 500.0, instead of the percentage value 0\. This occurs because the endpoint returns the value referring to the percentage reduced in the operation applied to the total amount of credit limit registered on the account. That is, a 10% tolerance reduction over 5000.0 equals 500.0.

#### SECOND OPERATION: Increasing credit tolerance from 0% to 25%

**PUT - Change tolerance of an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/tolerance`

Request body

`1

{

2

 "value": 0.25

3

}

`

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": -500.0,

5

 "date": "2024-02-26T20:04:27.7754907Z",

6

 "origin": "Credit"

7

 },

8

 {

9

 "value": 1250.0,

10

 "date": "2024-02-26T22:39:53.8090863Z",

11

 "origin": "Credit"

12

 }

13

 ],

14

 "currentBalance": 0.0,

15

 "intervalBalance": 750.0,

16

 "previousBalance": 0.0

17

}

`

In the same way, as in the operation in which the tolerance percentage was reduced, the value present in the `value` field (1250.0) represents the added percentage of 25% applied to the credit limit registered in the account (5000.0).

### Tracking a credit invoice creation

After the customer makes a purchase in the store using customer credit as a payment method and the order is [invoiced](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/how-to-invoice-an-order--7p1h852V5t54KyscpgxE2v), it is possible to check the credit operation information on the [Get account statements](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/statements) endpoint.

Unlike situations involving credit limit and tolerance changes, in the response body of this type of operation, the `origin` field is indicated as `invoice` and a new object named `metadata` is shown containing the following information:

* `transactionId`: Transaction identification.
* `orderId`: Identification of the order for which the invoice was created.
* `numberOfInstallments`: Number of invoices created to pay for the transaction. invoices created to pay for the order.

See the example below for the response body information related to the operation of a purchase made worth USD 15.

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": -15.0,

5

 "date": "2024-02-26T14:39:54.7141907Z",

6

 "origin": "Invoice",

7

 "metadata": {

8

 "transactionId": "ED01C38CD4C949C2BCDFDB2C461C80F1",

9

 "orderId": "1413590513132-01",

10

 "numberOfInstallments": 1

11

 }

12

 }

13

 ],

14

 "currentBalance": 0.0,

15

 "intervalBalance": -8.01,

16

 "previousBalance": 0.0

17

}

`

### Tracking a credit invoice payment

To confirm when a customer credit invoice has been paid by the customer you can also use the [Get account statements](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/statements) endpoint.

See below the response body containing the invoice information after order payment.

**GET - Get account statements**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/statements`

Response body

`1

{

2

 "statements": [

3

 {

4

 "value": 8.01,

5

 "date": "2024-02-26T14:47:15.9276873Z",

6

 "origin": "Payment",

7

 "metadata": {

8

 "transactionId": "ED01C38CD4C949C2BCDFDB2C461C80F1",

9

 "installment": 1

10

 }

11

 }

12

 ],

13

 "currentBalance": 0.0,

14

 "intervalBalance": 0.0,

15

 "previousBalance": 0.0

16

}

`

## Sharing credit with dependents

You can also share the credit available in a customer account with other customers. To do this, you must add a dependent — also known as an account holder — to the account.

> Credit sharing between account holders registered in an account occurs in such a way that the sum of all purchases made by them through Customer Credit cannot exceed the amount of credit available in the account.

### Adding a new account holder

To add the new account holder to the customer credit account, use the VTEX Admin or the [Add an account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts/-creditAccountId-/holders) endpoint. In this request, you must send the account identification (`id`) as a path parameter.

See an example below using the account `fe60ff40-d1cb-11ee-a0ed-87f4fcc03446`:

**POST - Add an account holder**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/holders`

Request body

`1

{

2

 "claims": {

3

 "email": "customertestholder1@test.com"

4

 }

5

}

`

The endpoint will return information about the creation of the new holder such as:

* `level`: Holder hierarchy. The value 2 indicates that the holder is a dependent of the account's main holder.
* `email`: Holder email.
* `id`: Holder identification.
* `createdAt`: Date of appointment of the holder.

Response body

`1

{

2

 "level": 2,

3

 "claims": {

4

 "email": "customertestholder1@test.com"

5

 },

6

 "id": "78d22849ad844ae5a57ef1715de73467",

7

 "createdAt": "2024-02-27T14:38:36.0027682Z"

8

}

`

You can also access your VTEX Admin (**Apps > Customer Credit > Accounts**) and click the desired account to verify that the new holder was added.

![{"base64":"  ","img":{"width":1486,"height":492,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":86194,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_2.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_2.png)

### Removing an account holder

To remove a holder from a customer credit account and prevent them from using the available credit, you can use the VTEX Admin or the [Delete an account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23delete-/api/creditcontrol/accounts/-creditAccountId-/holders/-holderId-) endpoint. In this request, you must send the account identification (`id`) and the holder identification (`id` obtained in the VTEX Admin or in the response body of the [Add an account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts/-creditAccountId-/holders) endpoint as path parameters.

See an example below using the account `fe60ff40-d1cb-11ee-a0ed-87f4fcc03446` and the holder `78d22849ad844ae5a57ef1715de73467`:

**DEL - Delete an account holder**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/fe60ff40-d1cb-11ee-a0ed-87f4fcc03446/holders/78d22849ad844ae5a57ef1715de73467`

The endpoint will return the holder's identification, confirming that it was deleted from the account.

Response body

`1

{

2

 "id": "78d22849ad844ae5a57ef1715de73467"

3

}

`

You can also access your VTEX Admin (**Apps > Customer Credit > Accounts**) and click on the desired account to verify that the new holder was removed.

![{"base64":"  ","img":{"width":1504,"height":422,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":59058,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_3.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_3.png)

## Checking all customer credit accounts of a store

To check information about all customer credit accounts registered in your store, you can use the VTEX Admin or the [Search all accounts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts) endpoint.

**GET - Search all accounts**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/`

Response body

`1

{

2

 "data": [

3

 {

4

 "id": "07D0F8272B6D77F1E68B",

5

 "balance": 0.0,

6

 "status": "Open",

7

 "creditLimit": 1000.0,

8

 "updatedAt": "2021-06-28T21:33:46.70945Z",

9

 "createdAt": "2020-04-15T01:23:54.4690229Z",

10

 "description": "",

11

 "availableCredit": 1000.0,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "isadora.bombonatti@vtex.com.br",

14

 "tolerance": 0.0,

15

 "availableBalance": 1000.0

16

 },

17

 {

18

 "id": "E93480BCE84892A336F3",

19

 "balance": 0.0,

20

 "status": "Open",

21

 "creditLimit": 2000.0,

22

 "updatedAt": "2021-06-28T21:33:46.8344386Z",

23

 "createdAt": "2020-05-21T22:42:37.8764106Z",

24

 "description": "",

25

 "availableCredit": 2000.0,

26

 "preAuthorizedCredit": 0.0,

27

 "email": "contato@diasbruno.com",

28

 "tolerance": 0.0,

29

 "availableBalance": 2000.0

30

 },

31

 {

32

 "id": "B07403D8311D642477F4",

33

 "balance": 0.0,

34

 "status": "Open",

35

 "creditLimit": 2000.0,

36

 "updatedAt": "2021-06-28T21:33:47.1156945Z",

37

 "createdAt": "2020-07-23T20:26:33.894492Z",

38

 "description": "",

39

 "availableCredit": 2000.0,

40

 "preAuthorizedCredit": 0.0,

41

 "email": "joao.rios@vtex.com.br",

42

 "tolerance": 0.0,

43

 "availableBalance": 2000.0

44

 },

45

…

46

 ],

47

 "summary": {

48

 "count": 35

49

 }

50

}

`

> The `count` field displays the number of customer credit accounts registered in the store.

## Closing a customer credit account

If you wish to stop offering credit to a specific customer, you must close the account through VTEX Admin or the [Close an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23delete-/api/creditcontrol/accounts/-creditAccountId-) endpoint. In this request, you must send the account identification (`id`) as a path parameter.

Additionally, you can use the queries below (individually or combined) in the URL to refine your account search:

* By the location of the accounts in the list (quantity of accounts): `?from={int}&to={int}`
* By status: `?status={Open, Closed or Cancelled}`
* By email: `?email={string}`

> 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.

See an example below using the account `fe60ff40-d1cb-11ee-a0ed-87f4fcc03446`:

**DEL - Close an account**

`https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/c5886660-d598-11ee-ac7f-a50b38956bb7`

The endpoint will return the information for the account that was deleted, displaying the `status` field as `Closed`.

Response body

`1

{

2

 "id": "c5886660-d598-11ee-ac7f-a50b38956bb7",

3

 "balance": 0.0,

4

 "document": "98765432101",

5

 "status": "Closed",

6

 "documentType": "CPF",

7

 "creditLimit": 3000.0,

8

 "updatedAt": "2024-02-27T17:52:52.842757Z",

9

 "createdAt": "2024-02-27T17:51:03.5303894Z",

10

 "description": "",

11

 "availableCredit": 3000.0,

12

 "preAuthorizedCredit": 0.0,

13

 "email": "customerclosed@test.com",

14

 "tolerance": 0.0,

15

 "availableBalance": 3000.0

16

}

`

You can also access your VTEX Admin (**Apps > Customer Credit > Accounts**) to verify that the account was deleted.

![{"base64":"  ","img":{"width":1497,"height":632,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":71142,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_4.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_4.png)

> Once closed, a Customer Credit account cannot be reopened again and all invoices, statements, and additional dependents data will be deleted. However, after completing the account closure, if you wish, you can [open a new account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts) for the customer using the same email as the closed account.

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/customer-credit-integration-guide/managing-a-customer-credit-account.md)

[Customer Credit« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account//docs/guides/customer-credit-integration-guide)[Managing a Customer Credit invoiceNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account//docs/guides/managing-a-customer-credit-invoice)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

ON THIS PAGE

[Creating a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23creating-a-customer-credit-account)

[Checking Customer Credit account details](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-customer-credit-account-details)

[Changing Customer Credit account information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-customer-credit-account-information)

[Updating account information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23updating-account-information)[Changing the credit limit of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-the-credit-limit-of-an-account)[Changing a credit account tolerance](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-a-credit-account-tolerance)

[Checking operations in a customer credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-operations-in-a-customer-credit-account)

[Tracking a credit limit change operation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-limit-change-operation)[Tracking a tolerance value change transaction](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-tolerance-value-change-transaction)[Tracking a credit invoice creation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-invoice-creation)[Tracking a credit invoice payment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-invoice-payment)

[Sharing credit with dependents](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23sharing-credit-with-dependents)

[Adding a new account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23adding-a-new-account-holder)[Removing an account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23removing-an-account-holder)

[Checking all customer credit accounts of a store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-all-customer-credit-accounts-of-a-store)

[Closing a customer credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23closing-a-customer-credit-account)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/customer-credit-integration-guide/managing-a-customer-credit-account.md)

Copy page

On this page

ON THIS PAGE

[Creating a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23creating-a-customer-credit-account)

[Checking Customer Credit account details](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-customer-credit-account-details)

[Changing Customer Credit account information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-customer-credit-account-information)

[Updating account information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23updating-account-information)[Changing the credit limit of an account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-the-credit-limit-of-an-account)[Changing a credit account tolerance](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23changing-a-credit-account-tolerance)

[Checking operations in a customer credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-operations-in-a-customer-credit-account)

[Tracking a credit limit change operation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-limit-change-operation)[Tracking a tolerance value change transaction](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-tolerance-value-change-transaction)[Tracking a credit invoice creation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-invoice-creation)[Tracking a credit invoice payment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23tracking-a-credit-invoice-payment)

[Sharing credit with dependents](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23sharing-credit-with-dependents)

[Adding a new account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23adding-a-new-account-holder)[Removing an account holder](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23removing-an-account-holder)

[Checking all customer credit accounts of a store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23checking-all-customer-credit-accounts-of-a-store)

[Closing a customer credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account/docs/guides/managing-a-customer-credit-account%23closing-a-customer-credit-account)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides managing a customer credit invoice in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-account)

[Managing a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-account)

[Managing a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/external-marketplace-integration-guide)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides)

Integration Guides

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/customer-credit-integration-guide)

[Managing a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice)

Managing a Customer Credit invoice

Customer Credit invoice is a document automatically generated by VTEX after the customer makes a purchase using Customer Credit as a payment method and the order is billed.

In cases of installment purchases, invoices are generated according to the number of installments. For example, a purchase made with payment in 10 installments on Customer Credit will generate 10 invoices related to the same order number.

> The Order invoice and the Customer Credit invoice are different documents. The Order invoice is issued for all purchases made in a store, regardless of the payment method selected. The Customer Credit invoice is additionally issued only for purchases made using the Customer Credit payment method. Learn more about invoiced orders in [How to invoice an order](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/how-to-manually-invoice-an-order--7p1h852V5t54KyscpgxE2v).

![{"base64":"  ","img":{"width":1073,"height":1154,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":147910,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_5.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_5.png)

This guide describes how to manage [Customer Credit](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0) invoices in your store by performing the following actions through the endpoints of the [Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api):

* Check information:
   * [About a specific Customer Credit invoice](#checking-customer-credit-invoice-details)
   * [Of all invoices issued to a Customer Credit account](#checking-invoice-details-on-a-customer-credit-account)
   * [Regarding Customer Credit invoices created for all users in a VTEX store](#checking-details-of-all-customer-credit-invoices-in-a-vtex-store)
* [Update invoice details](#updating-invoice-details-on-a-customer-credit-account)
* [Postpone the due date of an invoice](#postponing-the-due-date-of-a-customer-credit-invoice)
* [Record payment of an invoice](#confirming-payment-of-a-customer-credit-invoice)
* [Cancel an invoice](#cancelling-a-customer-credit-invoice)

> For more information about Customer Credit functionalities, access [Customer Credit - Overview](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0) and [Customer Credit - Getting Started](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/21ok0GBwmcIeaY2IukYMOg).

## Checking Customer Credit invoice details

When you want to check details about a specific Customer Credit invoice, you can use the [Retrieve invoice by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint. In this request, you must send the [Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-account) and invoice identification (`creditAccountId` and `invoiceId`) as path parameters.

See an example below using the account `11111111111_CPF` and invoice `7583E36F101C461094AB6CA68FA8EE2C-01`.

**GET - Retrieve invoice by ID**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01

`

Response body example

`1

{

2

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

3

 "friendlyId": "IBjuAsrJ-1",

4

 "status": "Opened",

5

 "value": 9.63,

6

 "accountId": "11111111111_CPF",

7

 "creditValue": 0.0,

8

 "createdAt": "2024-03-03T06:52:53.1314379Z",

9

 "updatedAt": "2024-04-05T06:52:56.2329924Z",

10

 "originalDueDate": "2024-04-02T06:52:53.1314379Z",

11

 "dueDate": "2024-04-02T06:52:53.1314379Z",

12

 "installment": 1,

13

 "orderId": "1413870513134-01",

14

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

15

 "numberOfInstallments": 1,

16

 "creditAccountId": "11111111111_CPF"

17

}

`

> You can also check some details of a Customer Credit invoice details using the VTEX Admin. To do that, go to **Apps > Customer Credit > Invoices**, and click on the desired invoice.

## Checking invoice details on a Customer Credit account

To check details of all invoices issued on a Customer Credit account, you can use the [Retrieve invoices by Customer Credit account ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/invoices) endpoint. In this request, you must send the account identification (`creditAccountId`) as a path parameter.

See an example below using the account `111111111_CPF`:

**GET - Retrieve invoices by Customer Credit account ID**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/

`

Response body example

`1

{

2

 "data": [

3

 {

4

 "id": "ED01C38CD4C949C2BCDFDB2C461C80F1-01",

5

 "friendlyId": "MWKd4GUB-1",

6

 "status": "Paid",

7

 "value": 8.01,

8

 "accountId": "11111111111_CPF",

9

 "creditValue": 0.0,

10

 "createdAt": "2024-02-26T14:39:54.6205024Z",

11

 "resolvedAt": "2024-02-26T14:47:15.8495716Z",

12

 "updatedAt": "2024-02-26T14:47:15.8964469Z",

13

 "originalDueDate": "2024-03-27T14:39:54.6205024Z",

14

 "dueDate": "2024-03-27T14:39:54.6205024Z",

15

 "installment": 1,

16

 "orderId": "1413590513132-01",

17

 "transactionId": "ED01C38CD4C949C2BCDFDB2C461C80F1",

18

 "numberOfInstallments": 1,

19

 "creditAccountId": "11111111111_CPF"

20

 },

21

 {

22

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

23

 "friendlyId": "IBjuAsrJ-1",

24

 "status": "Opened",

25

 "value": 9.63,

26

 "accountId": "11111111111_CPF",

27

 "creditValue": 0.0,

28

 "createdAt": "2024-03-03T06:52:53.1314379Z",

29

 "updatedAt": "2024-04-05T06:52:56.2329924Z",

30

 "originalDueDate": "2024-04-02T06:52:53.1314379Z",

31

 "dueDate": "2024-04-02T06:52:53.1314379Z",

32

 "installment": 1,

33

 "orderId": "1413870513134-01",

34

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

35

 "numberOfInstallments": 1,

36

 "creditAccountId": "11111111111_CPF"

37

 }

38

 ],

39

 "summary": {

40

 "total": 9.63,

41

 "count": 2,

42

 "totalPaid": 8.01,

43

 "totalCancelled": 0.0

44

 }

45

}

`

> You can also use VTEX Admin to check the list of all invoices issued to a Customer Credit account. To do that, go to **Apps > Customer Credit > Accounts**, and click on the desired invoice.

## Checking details of all Customer Credit invoices in a VTEX store

To list all invoices created in Customer Credit accounts of a VTEX store, you can use the [Search all invoices](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/invoices) endpoint.

**GET - Search all invoices**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/invoices/

`

Response body example

`1

{

2

 "data": [

3

 {

4

 "id": "8C7A5F6F57AE4464B3D1F15A0E47C536-01",

5

 "status": "Opened",

6

 "value": 15.0,

7

 "accountId": "09173503401_CPF",

8

 "creditValue": 0.0,

9

 "createdAt": "2018-10-24T15:34:14.5879054Z",

10

 "updatedAt": "2018-10-24T15:34:14.6503743Z",

11

 "originalDueDate": "2018-11-23T15:34:14.5879054Z",

12

 "dueDate": "2018-11-23T15:34:14.5879054Z",

13

 "installment": 1,

14

 "orderId": "500001",

15

 "transactionId": "8C7A5F6F57AE4464B3D1F15A0E47C536",

16

 "creditAccountId": "09173503401_CPF"

17

 },

18

 {

19

 "id": "8C7A5F6F57AE4464B3D1F15A0E47C536-01",

20

 "status": "Paid",

21

 "value": 15.0,

22

 "accountId": "09173503401_CPF",

23

 "creditValue": 0.0,

24

 "createdAt": "2018-10-24T15:34:14.5879054Z",

25

 "resolvedAt": "2021-03-05T15:01:23.0768211Z",

26

 "updatedAt": "2021-03-05T15:01:23.1236966Z",

27

 "originalDueDate": "2018-11-23T15:34:14.5879054Z",

28

 "dueDate": "2018-11-23T15:34:14.5879054Z",

29

 "installment": 1,

30

 "orderId": "500001",

31

 "transactionId": "8C7A5F6F57AE4464B3D1F15A0E47C536",

32

 "creditAccountId": "09173503401_CPF"

33

 },

34

 {

35

 "id": "A69BD96CDA1F402B939913B81C6346B2-01",

36

 "status": "Opened",

37

 "value": 35.0,

38

 "accountId": "09173503401_CPF",

39

 "creditValue": 0.0,

40

 "createdAt": "2018-10-25T01:01:07.3570738Z",

41

 "updatedAt": "2018-10-25T01:01:07.5133444Z",

42

 "originalDueDate": "2018-11-24T01:01:07.3570738Z",

43

 "dueDate": "2018-11-24T01:01:07.3570738Z",

44

 "installment": 1,

45

 "orderId": "500004",

46

 "transactionId": "A69BD96CDA1F402B939913B81C6346B2",

47

 "creditAccountId": "09173503401_CPF"

48

 }

49

………

50

 ],

51

 "summary": {

52

 "total": 2388.95,

53

 "count": 121,

54

 "totalPaid": 1379.11,

55

 "totalCancelled": 1.24

56

 }

57

}

`

## Updating invoice details on a Customer Credit account

Through the [Change invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint, you can update an invoice status, create an observation note, or add a link to assist your customer in the payment process.

See the example below, modifying the status, creating a observation note and adding the payment link to the invoice `7583E36F101C461094AB6CA68FA8EE2C-01` of account `111111111_CPF`:

**PUT - Change invoice**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01

`

Request body example

`1

{

2

 "status": "Paid",

3

 "observation": "BF 2024 customer invoice.",

4

 "paymentLink": "https://paymentlink.com"

5

}

`

> The success of this call is confirmed by the **200 OK** status and the empty response body.

To confirm the information was updated, use the [Retrieve invoice by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint.

Response body example

`1

{

2

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

3

 "friendlyId": "IBjuAsrJ-1",

4

 "status": "Paid",

5

 "value": 9.63,

6

 "accountId": "11111111111_CPF",

7

 "creditValue": 0.0,

8

 "createdAt": "2024-03-03T06:52:53.1314379Z",

9

 "resolvedAt": "2024-05-08T18:43:14.7046593Z",

10

 "updatedAt": "2024-05-08T18:43:14.8765325Z",

11

 "paymentLink": "https://www.paymentlink.com",

12

 "originalDueDate": "2024-04-02T06:52:53.1314379Z",

13

 "dueDate": "2024-04-02T06:52:53.1314379Z",

14

 "installment": 1,

15

 "orderId": "1413870513134-01",

16

 "observation": "BF 2024 customer invoice.",

17

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

18

 "numberOfInstallments": 1,

19

 "creditAccountId": "11111111111_CPF"

20

}

`

You can also access your store Admin (**Apps > Customer Credit > Account Details**), select the desired account and invoice to confirm that the information was updated.

![{"base64":"  ","img":{"width":1208,"height":613,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":72179,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_6.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_6.png)

## Postponing the due date of a Customer Credit invoice

To change the original due date of an invoice in Customer Credit, allowing the customer more time to complete the payment, you can use the endpoint [Postpone an invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/postponement).

However, before defining how many additional days of payment you will provide to the customer, you need to enable the option to postpone payment in your store's settings. To do this, you must use the endpoint [Create or change store configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/storeconfig).

The following parameters of this endpoint are responsible for enabling the option to postpone payment of invoices in the store:

* `invoicePostponementLimit`: The maximum number of times allowed to extend an invoice.
* `maxPostponementDays`: The maximum number of days an invoice can be extended.
* `postponementEnabled`: Allow extension of invoices in the store.

> The settings available in the [Create or change store configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/storeconfig) endpoint apply to all Customer Credit accounts registered in a VTEX store. It is not possible to customize these settings for each specific Customer Credit account of a given store.

See the example below, where a store is configured to allow invoice expiration dates to be extended up to 3 times and for a maximum period of 30 days in total.

**PUT - Create or change store configuration**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/storeconfig

`

Request body example

`1

{

2

 "invoicePostponementLimit": 3,

3

 "maxPostponementDays": 30,

4

 "postponementEnabled": true

5

}

`

The response to this request provides updated information about postponing invoices and other settings already applied in the store.

Response body example

`1

{

2

 "dailyInterestRate": 0.01,

3

 "invoicePostponementLimit": 3,

4

 "taxRate": 0.4,

5

 "maxPostponementDays": 30,

6

 "defaultCreditValue": 150,

7

 "maxPreAuthorizationGrowthRate": 0.1,

8

 "myCreditsEnabled": true,

9

 "toleranceEnabled": true,

10

 "automaticCheckingAccountCreationEnabled": true,

11

 "postponementEnabled": true,

12

 "notificationsSettings": {

13

 "daysPrior": [

14

 {

15

 "days": 1,

16

 "timeOfDay": "16:00:00"

17

 }

18

 ],

19

 "daysAfter": [

20

 {

21

 "days": 0,

22

 "timeOfDay": "12:00:00"

23

 }

24

 ]

25

 }

26

}

`

> For more information about other configuration fields available for Customer Credit in a store, access the [Create or change store configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23put-/api/creditcontrol/storeconfig) endpoint reference.

Once invoice postponement is enabled, you can postpone a specific invoice. See the example below in which 5 additional days will be granted to pay an invoice with an original due date of May 20, 2024.

**PUT - Postpone an invoice**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01/postponement

`

Request body example

`1

{

2

 "dueDays": 5

3

}

`

> The success of this call is confirmed by the **200 OK** status and the empty response body.

To confirm that the new invoice due date has been modified, use the [Retrieve invoice by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint and check the updated information in the `dueDate` field.

**GET - Retrieve invoice by ID**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01

`

Response body example

`1

{

2

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

3

 "friendlyId": "IBjuAsrJ-1",

4

 "status": "Opened",

5

 "value": 9.63,

6

 "accountId": "11111111111_CPF",

7

 "creditValue": 0.0,

8

 "createdAt": "2024-03-03T06:52:53.1314379Z",

9

 "updatedAt": "2024-04-05T06:52:56.2329924Z",

10

 "originalDueDate": "2024-05-20T06:52:53.1314379Z",

11

 "dueDate": "2024-05-25T06:52:53.1314379Z",

12

 "installment": 1,

13

 "orderId": "1413870513134-01",

14

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

15

 "numberOfInstallments": 1,

16

 "creditAccountId": "11111111111_CPF"

17

}

`

You can also verify the new invoice due date through your store Admin (**Apps > Customer Credit > Account Details**).

![{"base64":"  ","img":{"width":1208,"height":648,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":74193,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_7.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_7.png)

## Confirming payment of a Customer Credit invoice

To confirm payment of a Customer Credit invoice, you can use the [Mark an invoice as paid](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23post-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/payments) endpoint.

See example of payment of invoice `7583E36F101C461094AB6CA68FA8EE2C-01` in account `111111111_CPF`:

**POST - Mark an invoice as paid**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01/payments

`

Response body example

`1

{

2

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

3

 "friendlyId": "IBjuAsrJ-1",

4

 "status": "Paid",

5

 "value": 9.63,

6

 "accountId": "11111111111_CPF",

7

 "creditValue": 0.0,

8

 "createdAt": "2024-03-03T06:52:53.1314379Z",

9

 "resolvedAt": "2024-05-08T18:43:14.7046593Z",

10

 "updatedAt": "2024-05-08T18:43:14.8765325Z",

11

 "paymentLink": "https://www.paymentlink.com",

12

 "originalDueDate": "2024-04-02T06:52:53.1314379Z",

13

 "dueDate": "2024-04-02T06:52:53.1314379Z",

14

 "installment": 1,

15

 "orderId": "1413870513134-01",

16

 "observation": "BF 2024 customer invoice.",

17

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

18

 "numberOfInstallments": 1,

19

 "creditAccountId": "11111111111_CPF"

20

}

`

You can also confirm the invoice payment through your store Admin (**Apps > Customer Credit > Account Details**).

![{"base64":"  ","img":{"width":1212,"height":661,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":73610,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_8.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_8.png)

## Cancelling a Customer Credit invoice

If you wish to cancel a Customer Credit invoice that has been issued but no longer needs to be paid, for example when an order is cancelled, you can use the [Cancel invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23delete-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint.

> An invoice that already has a paid status can no longer be canceled.

See an example of canceling the invoice `7583E36F101C461094AB6CA68FA8EE2C-01` on account `111111111_CPF`:

**DEL - Cancel invoice**

`1

https://{accountName}.{environment}.com.br/api/creditcontrol/accounts/11111111111_CPF/invoices/7583E36F101C461094AB6CA68FA8EE2C-01

`

> The success of this call is confirmed by the **200 OK** status and the empty response body.

To confirm the invoice was canceled, use the [Retrieve invoice by ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/customer-credit-api%23get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-) endpoint.

Response body example

`1

{

2

 "id": "7583E36F101C461094AB6CA68FA8EE2C-01",

3

 "friendlyId": "IBjuAsrJ-1",

4

 "status": "Cancelled",

5

 "value": 9.63,

6

 "accountId": "11111111111_CPF",

7

 "creditValue": 0.0,

8

 "createdAt": "2024-03-03T06:52:53.1314379Z",

9

 "resolvedAt": "2024-05-08T18:43:14.7046593Z",

10

 "updatedAt": "2024-05-08T18:43:14.8765325Z",

11

 "paymentLink": "https://www.paymentlink.com",

12

 "originalDueDate": "2024-04-02T06:52:53.1314379Z",

13

 "dueDate": "2024-04-02T06:52:53.1314379Z",

14

 "installment": 1,

15

 "orderId": "1413870513134-01",

16

 "observation": "BF 2024 customer invoice.",

17

 "transactionId": "7583E36F101C461094AB6CA68FA8EE2C",

18

 "numberOfInstallments": 1,

19

 "creditAccountId": "11111111111_CPF"

20

}

`

You can also confirm the invoice cancellation through your store Admin (**Apps > Customer Credit > Account Details**).

![{"base64":"  ","img":{"width":1212,"height":661,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":74836,"url":"https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_9.png"}}](https://read.calvincode.net/reader?url=https://raw.githubusercontent.com/vtexdocs/dev-portal-content/main/docs/guides/Integration-Guides/customer-credit-integration-guide/customer-credit-account_9.png)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/customer-credit-integration-guide/managing-a-customer-credit-invoice.md)

[Managing a Customer Credit account« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice//docs/guides/managing-a-customer-credit-account)[External MarketplaceNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice//docs/guides/external-marketplace-integration-guide)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F87548049%3Fv%3D4%26w=64%26q=75)](https://github.com/ricardoaerobr)

ON THIS PAGE

[Checking Customer Credit invoice details](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-customer-credit-invoice-details)

[Checking invoice details on a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-invoice-details-on-a-customer-credit-account)

[Checking details of all Customer Credit invoices in a VTEX store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-details-of-all-customer-credit-invoices-in-a-vtex-store)

[Updating invoice details on a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23updating-invoice-details-on-a-customer-credit-account)

[Postponing the due date of a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23postponing-the-due-date-of-a-customer-credit-invoice)

[Confirming payment of a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23confirming-payment-of-a-customer-credit-invoice)

[Cancelling a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23cancelling-a-customer-credit-invoice)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/customer-credit-integration-guide/managing-a-customer-credit-invoice.md)

Copy page

On this page

ON THIS PAGE

[Checking Customer Credit invoice details](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-customer-credit-invoice-details)

[Checking invoice details on a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-invoice-details-on-a-customer-credit-account)

[Checking details of all Customer Credit invoices in a VTEX store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23checking-details-of-all-customer-credit-invoices-in-a-vtex-store)

[Updating invoice details on a Customer Credit account](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23updating-invoice-details-on-a-customer-credit-account)

[Postponing the due date of a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23postponing-the-due-date-of-a-customer-credit-invoice)

[Confirming payment of a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23confirming-payment-of-a-customer-credit-invoice)

[Cancelling a Customer Credit invoice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-a-customer-credit-invoice/docs/guides/managing-a-customer-credit-invoice%23cancelling-a-customer-credit-invoice)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)