Validate a signature without persisting

​

Verifies the JWS signature of a signed envelope against the sender's certificates without persisting anything — useful to test the signing setup before sending real payables. Mirrors POST /payout_orders/validate_signature.

Responds 200 when the signature is valid, and 404 when it is not (or when the sender fin_id is unknown or not owned by the caller — no existence leak). A malformed envelope — one that carries no document.header.sender.fin_id — is a 422 instead: there is nothing to resolve the sender against.

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.

  • The API key is valid but lacks the payables:all scope. The body is the plain text Forbidden.

  • application/json
  • application/json
Request Example for post/payables/validate_signature
curl https://api.treasury.shinkansen.finance/v1/payables/validate_signature \
  --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"
          }
        }
      }
    ]
  }
}'
{
  "message": "valid signature"
}