---
name: customer-credit-api
description: "Customer Credit API skill. Use when working with Customer Credit for api. Covers 25 endpoints."
version: 1.0.0
generator: lapsh
---

# Customer Credit API
API version: 1.0

## Auth
ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header

## Base URL
https://apiexamples.vtexcommercestable.com.br

## Setup
1. Set your API key in the appropriate header
2. GET /api/creditcontrol/invoices -- verify access
3. POST /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments -- create first payments

## Endpoints

25 endpoints across 1 groups. See references/api-spec.lap for full details.

### api
| Method | Path | Description |
|--------|------|-------------|
| GET | /api/creditcontrol/invoices | Search all invoices |
| GET | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} | Retrieve invoice by ID |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} | Change invoice |
| DELETE | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} | Cancel invoice |
| GET | /api/creditcontrol/accounts/{creditAccountId}/invoices | Retrieve invoices by Customer Credit account ID |
| POST | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments | Mark an invoice as paid |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/postponement | Postpone an invoice |
| GET | /api/creditcontrol/accounts | Search all accounts |
| POST | /api/creditcontrol/accounts | Open an account |
| GET | /api/creditcontrol/accounts/{creditAccountId} | Retrieve an account by ID |
| DELETE | /api/creditcontrol/accounts/{creditAccountId} | Close an account |
| PUT | /api/creditcontrol/accounts/{creditAccountId} | Update account information |
| GET | /api/creditcontrol/accounts/{creditAccountId}/statements | Get account statements |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/creditlimit | Change credit limit of an account |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/statements/{statementId} | Decrease balance of an account |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/settlement | Create or update settlement |
| POST | /api/creditcontrol/accounts/{creditAccountId}/transactions | Create a pre-authorization |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId} | Update a pre-authorization |
| DELETE | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId} | Cancel a pre-authorization |
| POST | /api/creditcontrol/accounts/{creditAccountId}/holders | Add an account holder |
| DELETE | /api/creditcontrol/accounts/{creditAccountId}/holders/{holderId} | Delete an account holder |
| PUT | /api/creditcontrol/accounts/{creditAccountId}/tolerance | Change tolerance of an account |
| POST | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/refunds | Partially or totally refund a settlement |
| GET | /api/creditcontrol/storeconfig | Retrieve store configuration |
| PUT | /api/creditcontrol/storeconfig | Create or change store configuration |

## Common Questions

Match user requests to endpoints in references/api-spec.lap. Key patterns:
- "List all invoices?" -> GET /api/creditcontrol/invoices
- "Get invoice details?" -> GET /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}
- "Update a invoice?" -> PUT /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}
- "Delete a invoice?" -> DELETE /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}
- "List all invoices?" -> GET /api/creditcontrol/accounts/{creditAccountId}/invoices
- "Create a payment?" -> POST /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments
- "List all accounts?" -> GET /api/creditcontrol/accounts
- "Create a account?" -> POST /api/creditcontrol/accounts
- "Get account details?" -> GET /api/creditcontrol/accounts/{creditAccountId}
- "Delete a account?" -> DELETE /api/creditcontrol/accounts/{creditAccountId}
- "Update a account?" -> PUT /api/creditcontrol/accounts/{creditAccountId}
- "List all statements?" -> GET /api/creditcontrol/accounts/{creditAccountId}/statements
- "Update a statement?" -> PUT /api/creditcontrol/accounts/{creditAccountId}/statements/{statementId}
- "Create a transaction?" -> POST /api/creditcontrol/accounts/{creditAccountId}/transactions
- "Update a transaction?" -> PUT /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}
- "Delete a transaction?" -> DELETE /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}
- "Create a holder?" -> POST /api/creditcontrol/accounts/{creditAccountId}/holders
- "Delete a holder?" -> DELETE /api/creditcontrol/accounts/{creditAccountId}/holders/{holderId}
- "Create a refund?" -> POST /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/refunds
- "List all storeconfig?" -> GET /api/creditcontrol/storeconfig
- "How to authenticate?" -> See Auth section

## Response Tips
- Check response schemas in references/api-spec.lap for field details
- Create/update endpoints typically return the created/updated object

## CLI

```bash
# Update this spec to the latest version
npx @lap-platform/lapsh get customer-credit-api -o references/api-spec.lap

# Search for related APIs
npx @lap-platform/lapsh search customer-credit-api
```

## References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas

> Generated from the official API spec by [LAP](https://lap.sh)
