---
title: "Creates account receivables for automated collection"
method: POST
path: "/account_receivables"
tags: ["Account receivables"]
---

# Creates account receivables for automated collection

`POST /account_receivables`

Creates new account receivables that are automatically managed by the Treasury system. These represent amounts owed to the customer by their debtors. The system will track and manage the collection process according to predefined organizational rules. If purge_before_load is true in the header options, existing account receivables will be purged before creating new ones.

## Request body

- AccountReceivablesMessage — Account receivables message that instructs the Treasury system to create and manage account receivables for automated collection. These represent amounts owed to the customer by their debtors. The system will track and manage the collection process according to predefined organizational rules. If purge_before_load is true in the header options, existing account receivables will be purged before creating new ones.
  - `document` object, required — Envelops the message content
    - `header` OriginalMessageHeader, required — Header with meta-data
      - `message_id` string, uuid, required — UUID Unique identifier of the message. Generated by the participant initiating the transactions (or sending the responses) inside this message. UUID format is required, otherwise the message will be rejected.
      - `creation_date` string, date-time, required — Creation date of the message in ISO 8601 format. Generated by the participant initiating the transactions (or sending the responses) inside to this message.
      - `sender` object, required — The identifier for a financial institution
        - `fin_id_schema` string, required — Identification schema for financial institution, namely, any participant in Shinkansen Network. Use `"SHINKANSEN"` for Shinkansen's native network ids and full support on any participant and service of the Shinkansen network. Other schemas might be used when interfacing with other networks but they are *not* recommended unless you *really* know what you are doing or have been explicitly instructed to do so by Shinkansen.
        - `fin_id` string, required — Identification according to schema. When the `"SHINKANSEN"` schema is used (as recommended), this is the ID assigned by Shinkansen to the participant in the network. In the context of the `header`, it refers to the Shinkansen network participant that sends (Sender) or receives (Receiver) the message. In the context of the `transactions`, it refers to the financial institution from which the resources leave or where the resources arrive. The ID assigned by Shinkansen to the financial institution can be found in https://docs.shinkansen.tech/docs/instituciones-financieras. When sending a transaction to Shinkansen, this value must always be SHINKANSEN. When sending a payout order to Shinkansen Treasury, this value must be SHINKANSEN_TREASURY
      - `receiver` object, required — The identifier for a financial institution
        - `fin_id_schema` string, required — Identification schema for financial institution, namely, any participant in Shinkansen Network. Use `"SHINKANSEN"` for Shinkansen's native network ids and full support on any participant and service of the Shinkansen network. Other schemas might be used when interfacing with other networks but they are *not* recommended unless you *really* know what you are doing or have been explicitly instructed to do so by Shinkansen.
        - `fin_id` string, required — Identification according to schema. When the `"SHINKANSEN"` schema is used (as recommended), this is the ID assigned by Shinkansen to the participant in the network. In the context of the `header`, it refers to the Shinkansen network participant that sends (Sender) or receives (Receiver) the message. In the context of the `transactions`, it refers to the financial institution from which the resources leave or where the resources arrive. The ID assigned by Shinkansen to the financial institution can be found in https://docs.shinkansen.tech/docs/instituciones-financieras. When sending a transaction to Shinkansen, this value must always be SHINKANSEN. When sending a payout order to Shinkansen Treasury, this value must be SHINKANSEN_TREASURY
      - `options` object — Optional configuration parameters for the message
    - `account_receivables` AccountReceivable[], required — One or more account receivables to create.
      - `external_id` string — External identifier for the account receivable (defined by customer)
      - `payee_id` string, required — Identifier for the payee (debtor)
      - `payee_id_schema` 'CLID' | 'MXRFC' | 'MXCURP' | 'PEDNI' | 'PERUC' | 'PECEX', required — Schema used for the payee identification
      - `payee_name` string — Name of the payee (debtor)
      - `amount` string, required — Amount owed by the payee
      - `currency` 'CLP' | 'MXN' | 'USD' | 'PEN', required — Currency code for the amount
      - `description` string — Description of the account receivable
      - `lowerbound_due_date` string, date, required — Lower bound of the due date range (YYYY-MM-DD format)
      - `upperbound_due_date` string, date, required — Upper bound of the due date range (YYYY-MM-DD format)
      - `tags` string[] — Tags associated with this account receivable
      - `custom_fields` object — Custom fields for additional metadata

## Response `200`

Account receivables successfully created. The response includes the created account receivables with their assigned IDs and current status.

- object — Response containing the created account receivables
  - `account_receivables` object[], required — List of created account receivables
    - `id` string, uuid, required — System-assigned unique identifier for the account receivable
    - `external_id` string — External identifier provided by the customer
    - `payee_id` string, required — Identifier for the payee (debtor)
    - `payee_id_schema` string, required — Schema used for the payee identification
    - `payee_name` string — Name of the payee (debtor)
    - `amount` string, required — Amount owed by the payee
    - `currency` string, required — Currency code for the amount
    - `description` string — Description of the account receivable
    - `lowerbound_due_date` string, date — Lower bound of the due date range
    - `upperbound_due_date` string, date — Upper bound of the due date range
    - `state` 'pending' | 'collected' | 'cancelled' | 'purged', required — Current state of the account receivable
    - `tags` string[] — Tags associated with this account receivable
    - `custom_fields` object — Custom fields for any client-specific data they want to associate with the account receivable. This allows clients to store additional metadata that is relevant to their business processes and reporting needs.
    - `created_at` string, date-time — Timestamp when the account receivable was created
    - `updated_at` string, date-time — Timestamp when the account receivable was last updated

## Other responses

- `400` — Invalid message (e.g: invalid signature)
- `403` — Forbidden (e.g: wrong API Key)
- `404` — Invalid message (e.g: invalid signature)
- `409` — Message ignored, because it was already seen and processed before by the receiver. Typically happens when a message is re-sent because the sender isn't sure if it was correctly received (e.g: network failure when the 2xx response was in flight)'

---

[API](https://skmtc.net/shinkansen/apis/payouts-shinkansen-endpoints.md) · [All operations](https://skmtc.net/shinkansen/apis/payouts-shinkansen-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shinkansen/payouts-shinkansen-endpoints/versions/1e4a6760b7e8/schema)
