> For the complete documentation index, see [llms.txt](https://docs-vnext.kiflo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-vnext.kiflo.com/developers/api-reference/payouts/create-payouts.md).

# Create payouts

It creates payouts from rewards matching the specified criteria. If no rewards match the given criteria no payout is created.

**Examples:** To create payouts for all partners from all pending rewards within a specific date range: `{ "fromDate": "2022-01-01T00:00:00Z", "toDate": "2022-04-01T00:00:00Z" }`

To create payouts for two specific partners: `{ "partnerIds": [21, 42] }` Where `21` and `42` are the partner IDs.

```json
{"openapi":"3.0.1","info":{"title":"Kiflo Public API v3","version":"v3"},"security":[{"oauth2":["Payout.Create","Api"]}],"components":{"securitySchemes":{},"schemas":{"PayoutCreateRequestDto":{"type":"object","properties":{"partnerIds":{"type":"array","items":{"type":"integer","format":"int32"},"nullable":true},"currency":{"type":"string","nullable":true},"rewardType":{"$ref":"#/components/schemas/RewardType"},"rewardStatus":{"$ref":"#/components/schemas/RewardStatus"},"fromDate":{"type":"string","format":"date-time","nullable":true},"toDate":{"type":"string","format":"date-time","nullable":true},"threshold":{"type":"number","format":"double","nullable":true},"properties":{"type":"object","additionalProperties":{"nullable":true},"nullable":true}},"additionalProperties":false},"RewardType":{"enum":["Unknown","Cash","Coupon","Credit","GiftCard"],"type":"string"},"RewardStatus":{"enum":["Unknown","Pending","Accepted","Paid","Declined"],"type":"string"},"PayoutListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutDto"},"nullable":true},"paginationSkipCount":{"type":"integer","format":"int32"},"totalCount":{"type":"integer","description":"Gets or sets the total number of items that could be returned by this command (without pagination).","format":"int32"}},"additionalProperties":false},"PayoutDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"partnerId":{"type":"integer","format":"int32"},"partnerName":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"uniqueId":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true},"rewardType":{"$ref":"#/components/schemas/RewardType"},"fromDate":{"type":"string","format":"date-time","nullable":true},"toDate":{"type":"string","format":"date-time","nullable":true},"amount":{"$ref":"#/components/schemas/AmountDto"},"taxAmount":{"$ref":"#/components/schemas/AmountDto"},"grossAmount":{"$ref":"#/components/schemas/AmountDto"},"rewardCount":{"type":"integer","format":"int32"},"creationDate":{"type":"string","format":"date-time"},"paidDate":{"type":"string","format":"date-time","nullable":true},"acceptedDate":{"type":"string","format":"date-time","nullable":true},"validatedDate":{"type":"string","format":"date-time","nullable":true},"paidByUserId":{"type":"integer","format":"int32","nullable":true},"acceptedByUserId":{"type":"integer","format":"int32","nullable":true},"validatedByUserId":{"type":"integer","format":"int32","nullable":true},"invalidatedDate":{"type":"string","format":"date-time","nullable":true},"invalidatedByUserId":{"type":"integer","format":"int32","nullable":true},"status":{"$ref":"#/components/schemas/PayoutStatus"},"source":{"$ref":"#/components/schemas/PayoutSource"},"shouldValidateRewards":{"type":"boolean"},"shouldAttachInvoice":{"type":"boolean"},"isSelfInvoice":{"type":"boolean"},"properties":{"type":"object","additionalProperties":{"nullable":true},"nullable":true},"rewards":{"type":"array","items":{"$ref":"#/components/schemas/RewardDto"},"nullable":true}},"additionalProperties":false},"AmountDto":{"type":"object","properties":{"value":{"type":"number","format":"double"},"currency":{"type":"string","nullable":true}},"additionalProperties":false},"PayoutStatus":{"enum":["Unknown","Draft","Pending","Ready","Paid"],"type":"string"},"PayoutSource":{"enum":["Unknown","Manual","Automatic"],"type":"string"},"RewardDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"uniqueId":{"type":"string","nullable":true},"partnerId":{"type":"integer","format":"int32"},"dealId":{"type":"integer","format":"int32","nullable":true},"status":{"$ref":"#/components/schemas/RewardStatus"},"creationDate":{"type":"string","format":"date-time"},"amount":{"$ref":"#/components/schemas/AmountDto"},"payoutId":{"type":"integer","format":"int32","nullable":true},"comment":{"type":"string","nullable":true},"rewardType":{"$ref":"#/components/schemas/RewardType"},"properties":{"type":"object","additionalProperties":{"nullable":true},"nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true},"nullable":true}},"additionalProperties":false}}},"paths":{"/v3/payouts":{"post":{"tags":["Payouts"],"summary":"Create payouts","description":"It creates payouts from rewards matching the specified criteria.\r\nIf no rewards match the given criteria no payout is created.\r\n            \r\n**Examples:**\r\nTo create payouts for all partners from all pending rewards within a specific date range:\r\n`{\r\n    \"fromDate\": \"2022-01-01T00:00:00Z\",\r\n    \"toDate\": \"2022-04-01T00:00:00Z\"\r\n}`\r\n            \r\nTo create payouts for two specific partners:\r\n`{\r\n    \"partnerIds\": [21, 42]\r\n}`\r\nWhere `21` and `42` are the partner IDs.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/PayoutCreateRequestDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/PayoutCreateRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/PayoutCreateRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/PayoutCreateRequestDto"}}}},"responses":{"200":{"description":"Payouts created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutListResponseDto"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-vnext.kiflo.com/developers/api-reference/payouts/create-payouts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
