Create payables

​

Creates one or more payables, atomically, for the signed sender's entity. Each payable may carry its full payment instruction (debtor, creditor, routing/policy hints) or be completed later with a PATCH. The pair (entity, external_id) is unique, so a retry cannot duplicate a commitment: a repeated external_id is a 409 and rolls the whole batch back.

The request body is a signed envelope; the Shinkansen-JWS-Signature header must carry a JWS detached signature over the raw body, validated against the customer's certificates.

Body

application/json

Signed envelope to create one or more payables, atomically, for the sender's entity. Mirrors the payout order message: a document with a header wrapping a payables array. The whole body is signed with a JWS detached signature (Shinkansen-JWS-Signature header). The entity is derived from the signed document.header.sender.fin_id and authorized against the authenticated customer — never from an unsigned field. If any payable in the batch fails validation the whole request is rolled back.

  • Envelops the message content.

    Properties: 2

Responses

  • application/json
  • The Shinkansen-Treasury-Api-Key header is missing or does not match a Treasury customer. The body is the plain text Unauthorized.

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/payables
curl https://api.treasury.shinkansen.finance/v1/payables \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Shinkansen-Treasury-Api-Key: YOUR_SECRET_TOKEN' \
  --header 'Shinkansen-JWS-Signature: YOUR_SECRET_TOKEN' \
  --data '{
  "document": {
    "header": {
      "message_id": "014a74cb-597c-46a1-8217-63e58a336b0d",
      "creation_date": "2026-07-15T18:25:43-04:00",
      "sender": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "EMPRESA_A"
      },
      "receiver": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "SHINKANSEN_TREASURY"
      }
    },
    "payables": [
      {
        "external_id": "RD-2026-000123",
        "payable_type": "redemption",
        "amount": "150000",
        "currency": "CLP",
        "state": "waiting_order",
        "due_date": "2026-07-20",
        "description": "Redemption settlement - fund A",
        "dispatch_policy": "automatic",
        "execution_hint": "internal",
        "debtor": {
          "financial_institution": {
            "fin_id_schema": "SHINKANSEN",
            "fin_id": "BANCO_BICE_CL"
          },
          "account": "123451",
          "account_type": "current_account"
        },
        "creditor": {
          "name": "Romulo Gallegos",
          "email": "romulo.gallegos@example.com",
          "account": "1513523451",
          "account_type": "current_account",
          "identification": {
            "id_schema": "CLID",
            "id": "11111111-1"
          },
          "financial_institution": {
            "fin_id_schema": "SHINKANSEN",
            "fin_id": "SCOTIABANK_CL"
          }
        }
      }
    ]
  }
}'
{
  "payables": [
    {
      "id": 41,
      "external_id": "RD-2026-000123",
      "local_entity_id": 7,
      "payable_type": "redemption",
      "amount": "150000.00000",
      "currency": "CLP",
      "state": "waiting_order",
      "due_date": "2026-07-20",
      "description": "Redemption settlement - fund A",
      "metadata": {
        "core_operation_id": "SP-99812"
      },
      "debtor": {
        "financial_institution": {
          "fin_id_schema": "SHINKANSEN",
          "fin_id": "BANCO_BICE_CL"
        },
        "account": "123451",
        "account_type": "current_account"
      },
      "creditor": {
        "name": "Romulo Gallegos",
        "email": "romulo.gallegos@example.com",
        "account": "1513523451",
        "account_type": "current_account",
        "identification": {
          "id": "11111111-1",
          "id_schema": "CLID"
        },
        "financial_institution": {
          "fin_id": "SCOTIABANK_CL",
          "fin_id_schema": "SHINKANSEN"
        }
      },
      "payment_rail": "default",
      "execution_mode": "default",
      "dispatch_policy": "automatic",
      "execution_hint": "internal",
      "inserted_at": "2026-07-15T18:25:43Z",
      "updated_at": "2026-07-15T18:25:43Z"
    }
  ]
}