> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maesn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts receivable

> Technical walkthrough for accounts receivable workflows using the Maesn Unified API.

## 5 steps to implement accounts receivable

<Steps>
  <Step title="Realize the 'sync contacts' use case" titleSize="h3">
    Start by implementing the [synchronize contacts](/use-cases/sync-contacts) use case to ensure that the customers across your database and your user’s accounting platform are in sync.
  </Step>

  <Step title="Retrieve chart of accounts" titleSize="h3">
    You will usually need to specify a general ledger account for invoices and payments. Fetch it from the user's accounting platform by calling the GET [/accounts](/api-reference/accounting-endpoints/accounts/get-accounts) endpoint.
  </Step>

  <Step title="Retrieve tax rates" titleSize="h3">
    Retrieve available tax rates from the accounting platform with GET [/taxRates](/api-reference/accounting-endpoints/taxrates/get-tax-rates).
  </Step>

  <Step title="Retrieve dimensions (optional)" titleSize="h3">
    If your users use classes, locations, departments or other dimensions configured, you can retrieve them from the accounting platform with GET [/dimensions](/api-reference/accounting-endpoints/dimensions/get-dimensions).
  </Step>

  <Step title="Setup categorization rules (optional)" titleSize="h3">
    Presenting the data retrieved in the previous steps in your frontend, enable your user to configure rules for categorizing the invoices and payments that will be synchronized to the accounting platform. The business logic will depend on your application, but bear in mind that:

    * If your user only wants to synchronize their invoices and payments against one single GL account respectively, a simple dropdown menu to select the account may be sufficient.
    * Users may want to categorize expenses based on conditional logic, such as "if Department = IT, use Account A". This will require more from your UI!
    * You may want to give your users the possibility to categorize the transaction at the time when they synchronize it to their accounting service, which would imply that no pre-categorization is required in the configuration or that it is possible to override the configuration.
    * Depending on your use case, the accounting platform you are integrating to and the legislation of the country you operate in, you may want to automatically configure certain tax rates for certain categories or allow your users to manually select the tax rate for each individual expense.
    * Likewise, dimensions may follow categories or be presented for selection for the respective expense.
  </Step>

  <Step title="Create an invoice" titleSize="h3">
    Create an invoice in your user's accounting platform by calling POST [/invoices](/api-reference/accounting-endpoints/invoices/create-invoice) or, if the original customer invoice was already created on another platform, use POST [/bookingProposals](/api-reference/accounting-endpoints/bookingproposals/create-booking-proposal) to upload it.
    It is up to your application whether invoices should be synchronized automatically or require an end user to manually export the invoice from within your application.
  </Step>

  <Step title="Create a payment" titleSize="h3">
    Create a payment in your user's accounting platform by calling POST [/payments](/api-reference/accounting-endpoints/payments/create-payment).
    It is up to your application whether payments should be synchronized automatically or require an end user to manually export the payment from within your application.
  </Step>

  <Step title="Keep your data fresh" titleSize="h3">
    After fetching data initially, you should make sure to keep your user's data up to date by regularly retrieving data from the maesn API and looking for changes. The `lastModified` query parameter can be utilized on all our GET endpoints to save you the hassle of creating deltas to detect change. See our [guide to keeping data fresh](/guides/keep-data-fresh) for more information!
  </Step>
</Steps>

<Tip>You can utilize Webhooks to make this process more efficient.</Tip>
