Customer Credit API
With Customer Credit your store can enable credit payments through the checkout. You can also control invoices and the credit limits of your clients.
Learn more about Customer Credit in our Help Center article.
Additionally, you can find more information on installment payments for an order in the customData field found in the Get Order endpoint of the Orders API. This includes the number of installments, amount and due dates.
All requests need an authorization header. This API allows two kinds of authorization:
- Authorization header containing the VTEX ID authentication token.
- VTEX Appkey and Apptoken headers.
Read Authentication for more information about authentication options.
Endpoints
Invoices
| Summary | Method | Path |
|---|---|---|
| Search all invoices | GET | /api/creditcontrol/invoices |
| Retrieve invoice by ID | GET | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} |
| Change invoice | PUT | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} |
| Cancel invoice | DELETE | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId} |
| Retrieve invoices by Customer Credit account ID | GET | /api/creditcontrol/accounts/{creditAccountId}/invoices |
| Mark an invoice as paid | POST | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/payments |
| Postpone an invoice | PUT | /api/creditcontrol/accounts/{creditAccountId}/invoices/{invoiceId}/postponement |
Account
| Summary | Method | Path |
|---|---|---|
| Search all accounts | GET | /api/creditcontrol/accounts |
| Open an account | POST | /api/creditcontrol/accounts |
| Retrieve an account by ID | GET | /api/creditcontrol/accounts/{creditAccountId} |
| Close an account | DELETE | /api/creditcontrol/accounts/{creditAccountId} |
| Update account information | PUT | /api/creditcontrol/accounts/{creditAccountId} |
| Get account statements | GET | /api/creditcontrol/accounts/{creditAccountId}/statements |
| Change credit limit of an account | PUT | /api/creditcontrol/accounts/{creditAccountId}/creditlimit |
| Decrease balance of an account | PUT | /api/creditcontrol/accounts/{creditAccountId}/statements/{statementId} |
| Create or update settlement | PUT | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/settlement |
| Create a pre-authorization | POST | /api/creditcontrol/accounts/{creditAccountId}/transactions |
| Update a pre-authorization | PUT | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId} |
| Cancel a pre-authorization | DELETE | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId} |
| Add an account holder | POST | /api/creditcontrol/accounts/{creditAccountId}/holders |
| Delete an account holder | DELETE | /api/creditcontrol/accounts/{creditAccountId}/holders/{holderId} |
| Change tolerance of an account | PUT | /api/creditcontrol/accounts/{creditAccountId}/tolerance |
| Partially or totally refund a settlement | POST | /api/creditcontrol/accounts/{creditAccountId}/transactions/{transactionId}/refunds |
Store Configuration
| Summary | Method | Path |
|---|---|---|
| Retrieve store configuration | GET | /api/creditcontrol/storeconfig |
| Create or change store configuration | PUT | /api/creditcontrol/storeconfig |