---
title: "Admin Prepare Payout Batch"
method: POST
path: "/v1/admin/payouts/{period}/prepare"
---

# Admin Prepare Payout Batch

`POST /v1/admin/payouts/{period}/prepare`

## Request

- Base URL: `https://api.storyflo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.storyflo.com/v1/admin/payouts/{period}/prepare`
- Auth: none declared

Generate one PayoutBatch per publisher for the given YYYY-MM
period from the existing ledger rollup. Uses the same window logic
as ``/v1/admin/payouts/{period}`` so the numbers match.

Idempotent on (period, publisher_id):
- Rows that don't exist yet → created in ``prepared`` state.
- Rows in ``prepared`` state → ``net_payout_micros`` and
  ``destination_address`` recomputed (in case the publisher updated
  their wallet between runs).
- Rows in any other state (signed/confirmed/failed) → left alone.

## Path parameters

- `period` string, required

## Headers

- `x-storyflo-email-token` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/storyflo/apis/storyflo-inference-router.md) · [All operations](https://skmtc.dev/storyflo/apis/storyflo-inference-router/llms.txt) · [OpenAPI document](https://skmtc.dev/storyflo/apis/storyflo-inference-router/revisions/c3a1a735ac7a?raw)
