---
title: "Record a new payout (external or store-credit) for an affiliate (by customerId)."
method: POST
path: "/stores/{storeId}/affiliates/{customerId}/payouts"
tags: ["Affiliate"]
---

# Record a new payout (external or store-credit) for an affiliate (by customerId).

`POST /stores/{storeId}/affiliates/{customerId}/payouts`

Requires the `stores.affiliates.update` permission.

## Path parameters

- `storeId` string, uuid, required
- `customerId` string, uuid, required

## Request body

- CreateAffiliatePayoutForm — Form used by an admin to record a manual affiliate payout.
  - `amount` number, double, required — The amount to pay out or convert.
  - `convertedToStoreCredit` boolean, required — True = convert into store credit; false = external payout.
  - `comment` string, nullable — Optional note for auditing.

## Response `200`

The object was successfully created.

- AffiliatePayoutResponse — Represents a default generic response for API endpoints.
  - `success` boolean, required — Indicates whether the operation or response was successful.
  - `message` string, nullable — A descriptive message providing additional context or information about the response.
  - `code` string, nullable — The error code (if there was an error) to use when referencing the error
  - `data` AffiliatePayout — A record of an affiliate’s earnings being paid out (e.g., converted into store credit).
    - `id` string, uuid, required — The unique identifier of the entity
    - `dateCreated` string, date-time, required — The date the entity was created in the database
    - `customerId` string, uuid, required — The affiliate customer who earned the payout.
    - `storeId` string, uuid, required — The store in which the affiliate earned these commissions.
    - `affiliateId` string, uuid, required — The ID of the affiliate who paid out
    - `amount` number, double, required — The amount paid out to the affiliate (or converted to store credit).
    - `convertedToStoreCredit` boolean, required — Whether this payout was converted into store‐credit (true) or represents an external payout (false).
    - `comment` string, nullable — (Optional) A note or reason for this payout, for auditing.
    - `initiatedByUserId` string, nullable — The user who initiated the payout, if this is null then it was initiated by the customer
    - `initiatedByIp` string, required — The IP address who initiated the payout
    - `isVoided` boolean, required — Indicates whether the affiliate payout has been voided.
    - `voidDate` string, date-time, nullable — The date and time when the payout was voided, if applicable.
    - `voidedByUserId` string, nullable — The user who voided the affiliate payout.
    - `voidReason` string, nullable — The reason provided when an affiliate payout is voided.

## Other responses

- `400` — The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.

---

[API](https://skmtc.net/komerza/apis/komerza-api.md) · [All operations](https://skmtc.net/komerza/apis/komerza-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/komerza/komerza-api/revisions/060e78bc7f80/schema)
