---
title: "Add AutoPayout rule"
method: POST
path: "/payout/wallet/{user_token}/{wallet_token}/autopayout"
tags: ["Wallet"]
---

# Add AutoPayout rule

`POST /payout/wallet/{user_token}/{wallet_token}/autopayout`

This **POST** endpoint is used to add an autopayout rule that will initiate a payout whenever the provided wallet token is loaded. <br> You can use this endpoint to create an autopayout rule that automatically sends a percentage of incoming load to a specific destination. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path, and the `destination_token` and percentage of incoming load that should be autopaid to the `destination_token` in the request Body. <br> The response will include a JSON object containing the details of the created autopayout rule, including the token, `destination_token` and percentage.

## Request body

- AutopayRule
  - `destination_token` string, required — The destination_token to autopay (send payout to)
  - `percentage` number, float, required — The percent of incoming load that should be autopaid to the destination_token
  - `attr_set_token` string — The token that represents a set of attributes for a specific payer. Optional, specify the value if you''re trying to update a value of a specific attributes set.

## Response `201`

Succesfully created.

- AutopayoutResp
  - `token` string, required — Autopayout token
  - `destination_token` string, required — The destination_token to autopayout (send payout to)
  - `percentage` number, float, required — The percent of incoming load that should be autopaid to the destination_token
  - `attr_set_token` string — The token that represents a set of attributes for a specific payer. Optional, specify the value if you''re trying to update a value of a specific attributes set.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not found.
- `405` — Method Not Allowed.
- `500` — Internal server error.
- `504` — Gateway Time-out.

---

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