VTEX

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…

Other#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

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.

All requests need the authorization header.

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.

This API allows two kinds of authorization:

  1. Authorization header containing the VTEX ID authentication token.
  2. VTEX Appkey and Apptoken headers.

Endpoints 26

Invoices

  • GETRetrieve invoice by creditAccountId/api/creditcontrol/accounts/:creditAccountId/invoicesReturns associated invoices by specified creditAccountId, the param that identifies a client in VTEX's system.
  • GETRetrieve Invoice by Id/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceIdReturns associated data for the specified Invoice Id, like status and value, for example.
  • PUTChange Invoice/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId?friendlyId=insert identifier hereUpdates invoice's attributes status, paymentLink and observation.
  • DELETECancel Invoice/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceIdChanges invoice's status from ancells invoice by specified Id.
  • POSTMark an invoice as Paid/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/paymentsPay an invoice.
  • PUTPostpone an invoice/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/postponementPostpone an invoice.
  • GETSearch all invoices/api/creditcontrol/invoices?from=&to=&createdDateFrom=&createdDateTo=&value=101.22&status=Paid&friendlyId=insert identifier here&creditAccountId=B75F0Returns all invoices according to the informed query params in the request.

Account

  • GETSearch all accounts/api/creditcontrol/accounts
  • POSTOpen an Account/api/creditcontrol/accountsOpen an account.
  • PUTOpen or Change Account/api/creditcontrol/accounts/:accountIdOpen or Change an account.
  • GETRetrieve an Account by Id/api/creditcontrol/accounts/:creditAccountIdRetrieve an account by id.
  • PUTUpdate email and description of a account/api/creditcontrol/accounts/:creditAccountIdUpdate a checking account.
  • DELETEClose an Account/api/creditcontrol/accounts/:creditAccountIdCloses an account.
  • PUTChange credit limit of an Account/api/creditcontrol/accounts/:creditAccountId/creditlimitIncrease the credit limit of an account.
  • POSTAdd an account Holder/api/creditcontrol/accounts/:creditAccountId/holders
  • DELETEDelete an account holder/api/creditcontrol/accounts/:creditAccountId/holders/:holderId
  • GETAccount statements/api/creditcontrol/accounts/:creditAccountId/statementsGet the account statements.
  • PUTDecrease balance of an account/api/creditcontrol/accounts/:creditAccountId/statements/:statementIdCreate a debit value updating the account BALANCE.
  • PUTChange tolerance of an account/api/creditcontrol/accounts/:creditAccountId/toleranceIncrease the credit limit of a checking account.
  • POSTCreate a Pre Authorization/api/creditcontrol/accounts/:creditAccountId/transaction
  • PUTCreate a Pre Authorization (using id)/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId
  • DELETECancel a Pre Authorization/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId
  • POSTPartial or Total Refund a Settlement/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId/refundsRefund a value from a already settled transaction.
  • PUTCreate or Update Settlement/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId/settlementDebit a value from checking account.

Store Configuration

  • GETRetrieve store configuration/api/creditcontrol/storeconfigGet store configuration data.
  • PUTCreate or change store configuration/api/creditcontrol/storeconfigCreate or change store configuration data.

API details

Base URL
https://vtex.local
https://{accountName}.{environment}.com.br
Authentication
An API key in the X-VTEX-API-AppKey header
An API key in the X-VTEX-API-AppToken header
Operations
26 operations on 19 pathsPUT 10GET 7POST 5DELETE 4
Main resources
Account 17Invoices 7Store Configuration 2
Response formats
application/json; charset=utf-8 text/plain application/json
Description format
OpenAPI 3.0.0, API version 1.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Customer Credit API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Customer Credit API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the X-VTEX-API-AppKey header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Retrieve invoice by creditAccountId” (GET /api/creditcontrol/accounts/:creditAccountId/invoices), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the 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… It is listed under Other and has 26 endpoints.

Who publishes the Customer Credit API?

It is listed from VTEX's public API description (an OpenAPI document), not published by VTEX on Swastik Codes. Anyone who controls vtex.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Customer Credit API?

Its description lists 2 base URLs: https://vtex.local, https://{accountName}.{environment}.com.br. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Customer Credit API?

It accepts 2 methods: an API key in the X-VTEX-API-AppKey header; an API key in the X-VTEX-API-AppToken header.

How many endpoints does the Customer Credit API have?

26 operations on 19 paths (10 PUT, 7 GET, 5 POST, 4 DELETE). The largest groups are Account, Invoices, Store Configuration.

Is forking the Customer Credit API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.