> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/api-reference/cashouts-api/manage-cashouts/create-a-cashout.md).

# Create a cashout

## Generate cashout request

> This endpoint allows generating withdrawal requests (cashouts)

```json
{"openapi":"3.0.0","info":{"title":"Cashout API","version":"3.0.0"},"servers":[{"url":"https://api-stg.onekeypayments.com/v3","description":"Staging server"}],"paths":{"/cashout":{"post":{"summary":"Generate cashout request","description":"This endpoint allows generating withdrawal requests (cashouts)","tags":["Cashout"],"parameters":[{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","default":"application/json"},"description":"Request content type"},{"in":"header","name":"Payload-Signature","required":true,"schema":{"type":"string"},"description":"Control signature to verify the authenticity of the request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequest"}}}},"responses":{"200":{"description":"Cashout request successfully created","content":{"application/json":{"schema":{"type":"object","properties":{"cashout_id":{"type":"string","description":"Unique identifier for the generated cashout"}}}}}},"400":{"description":"Request error (KYC error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"412":{"description":"Data validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CashoutRequest":{"type":"object","required":["login","pass","external_id","country","amount","document_id","beneficiary_name","notification_url"],"properties":{"login":{"type":"string","description":"Your access key for the onekeypayments CASHOUTS API"},"pass":{"type":"string","description":"Your password key for the onekeypayments CASHOUTS API"},"external_id":{"type":"string","description":"Unique cashout ID on the merchant side"},"country":{"type":"string","description":"Country of the cashout"},"amount":{"type":"number","description":"Cashout amount"},"currency":{"type":"string","description":"Currency in which the amount is specified"},"document_id":{"type":"string","description":"Beneficiary's document ID"},"document_type":{"type":"string","description":"Specified identity document type"},"beneficiary_id":{"type":"string","description":"Beneficiary ID (for anonymous)"},"beneficiary_name":{"type":"string","description":"Beneficiary's name"},"beneficiary_lastname":{"type":"string","description":"Beneficiary's last name"},"email":{"type":"string","description":"Beneficiary's email address"},"phone":{"type":"string","description":"Beneficiary's phone number"},"bank_code":{"type":"number","description":"Beneficiary's bank code"},"bank_account":{"type":"string","description":"Beneficiary's bank account"},"bank_branch":{"type":"string","description":"Bank branch of the beneficiary's account"},"account_type":{"type":"string","description":"Beneficiary's account type"},"address":{"type":"string","description":"Beneficiary's address"},"city":{"type":"string","description":"Beneficiary's city"},"postal_code":{"type":"string","description":"Beneficiary's postal code"},"beneficiary_birthdate":{"type":"string","description":"Beneficiary's date of birth"},"notification_url":{"type":"string","description":"URL where notifications will be sent"},"comments":{"type":"string","description":"Comments about the cashout"},"on_hold":{"type":"boolean","description":"Marks a cashout as on hold and does not process it until manually changed to pending"},"type":{"type":"string","description":"Response format type"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"message":{"type":"string","description":"Descriptive error message"},"reason":{"type":"string","description":"Detailed reason for the error"},"reason_code":{"type":"integer","description":"Specific code for the error reason"}}}}}}
```


---

# 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://apidocs.onekeypayments.com/api-reference/cashouts-api/manage-cashouts/create-a-cashout.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.
