Send a payout message to be processed as a payout order

​

Accepts a payout message written in the Payouts document.transactions format and processes it as a payout order, so senders already integrated with the Payouts API can reach Treasury without reshaping their payload.

The body must carry document.transactions; a body without it is rejected with 400. Once accepted, the request follows exactly the same validation and signing as POST /payout_orders.

The response, however, stays in the Payouts vocabulary: the id mapping comes back under transactions, with transaction_id and shinkansen_transaction_id, and not under payout_orders.

Body

application/json

A Payouts message, as sent originally by the participant instructing the payout, plus the optional batch metadata the Treasury endpoint accepts.

The receiver must be SHINKANSEN_TREASURY. A message addressed to any other receiver is rejected with 404.

Responses

  • application/json
  • application/json
  • Forbidden (e.g: wrong API Key)

  • application/json
  • application/json
Request Example for post/messages/payouts/as_payout_order
curl https://api.treasury.shinkansen.finance/v1/messages/payouts/as_payout_order \
  --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": "2022-04-08T18:25:43-04:00",
      "sender": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "EMPRESA_A"
      },
      "receiver": {
        "fin_id_schema": "SHINKANSEN",
        "fin_id": "SHINKANSEN_TREASURY"
      }
    },
    "transactions": [
      {
        "transaction_type": "payout",
        "transaction_id": "8af773eb-761d-44a5-86a9-1435189d215c",
        "currency": "CLP",
        "amount": "30000",
        "execution_date": "2022-04-11T10:30:00-03:00",
        "description": "Salary payment",
        "reference_number": "1234567",
        "tracking_key": "AAA1234567",
        "debtor": {
          "name": "Empresa A SpA",
          "identification": {
            "id_schema": "CLID",
            "id": "11111111-1"
          },
          "financial_institution": {
            "fin_id_schema": "SHINKANSEN",
            "fin_id": "BANCO_BICE_CL"
          },
          "account": "123451",
          "account_type": "current_account",
          "email": "pagos@empresa-a.example.com"
        },
        "creditor": {
          "name": "Romulo Gallegos",
          "identification": {
            "id_schema": "CLID",
            "id": "11111111-1"
          },
          "financial_institution": {
            "fin_id_schema": "SHINKANSEN",
            "fin_id": "SCOTIABANK_CL"
          },
          "account": "1513523451",
          "account_type": "current_account",
          "email": "romulo.gallegos@shinkasen.finance"
        }
      }
    ]
  }
}'
{
  "transactions": [
    {
      "transaction_id": "ee19538c-3a23-47c9-ba8e-472a7599de7c",
      "shinkansen_transaction_id": "a517a741-e84f-4ac1-8d9d-922162fc703b"
    }
  ]
}