Skip to main content
POST
/
stores
/
{storeId}
/
affiliates
/
{customerId}
/
payouts
Record a new payout (external or store-credit) for an affiliate (by customerId).
curl --request POST \
  --url https://api.komerza.com/stores/{storeId}/affiliates/{customerId}/payouts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 8.988465674311579e+307,
  "convertedToStoreCredit": true,
  "comment": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "code": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "dateCreated": "2023-11-07T05:31:56Z",
    "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "affiliateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "amount": 123,
    "convertedToStoreCredit": true,
    "initiatedByIp": "<string>",
    "isVoided": true,
    "comment": "<string>",
    "initiatedByUserId": "<string>",
    "voidDate": "2023-11-07T05:31:56Z",
    "voidedByUserId": "<string>",
    "voidReason": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required
customerId
string<uuid>
required

Body

application/json

Form used by an admin to record a manual affiliate payout.

amount
number<double>
required

The amount to pay out or convert.

Required range: 0.01 <= x <= 1.7976931348623157e+308
convertedToStoreCredit
boolean
required

True = convert into store credit; false = external payout.

comment
string | null

Optional note for auditing.

Maximum string length: 256

Response

The object was successfully created.

Represents a default generic response for API endpoints.

success
boolean
required

Indicates whether the operation or response was successful.

message
string | null

A descriptive message providing additional context or information about the response.

code
string | null

The error code (if there was an error) to use when referencing the error

data
object

A record of an affiliate’s earnings being paid out (e.g., converted into store credit).