> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paylead.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger a payout of the consumer's pool.

> Pays out the consumer's `PAID_IN` rewards: reserves the funds in the ledger, moves the money on the PSP (working capital to the program's UPM wallet, then a bank wire to the consumer's recipient), and marks the rewards `PAID_OUT`. Returns `202 Accepted`: the payout is initiated synchronously but the bank wire is settled asynchronously by the PSP.



## OpenAPI

````yaml /program/api/openapi/2.0.0/perks/openapi.json post /perks/consumers/{consumer_id}/pools/me/payouts
openapi: 3.1.0
info:
  description: |
    Paylead Program API.
    You can find complete documentation in https://docs.paylead.com/
  license:
    name: Proprietary
    url: https://docs.paylead.com/
  title: Perks
  version: 2.0.0
servers:
  - description: Sandbox
    url: https://api-{programRef}.sandbox.paylead.tech
    variables:
      programRef:
        default: changeme
        description: Program reference provided by Paylead
security:
  - oauth2: []
tags:
  - description: Routes used to query consumers resources
    name: Consumers
    x-displayName: Consumers
  - name: UPM
    x-displayName: UPM
  - name: KYC
    x-displayName: KYC
  - name: Rewards
    x-displayName: Rewards
  - name: Segments
    x-displayName: Segments
  - name: Voucher Orders
    x-displayName: Voucher Orders
paths:
  /perks/consumers/{consumer_id}/pools/me/payouts:
    post:
      tags:
        - UPM
      summary: Trigger a payout of the consumer's pool.
      description: >-
        Pays out the consumer's `PAID_IN` rewards: reserves the funds in the
        ledger, moves the money on the PSP (working capital to the program's UPM
        wallet, then a bank wire to the consumer's recipient), and marks the
        rewards `PAID_OUT`. Returns `202 Accepted`: the payout is initiated
        synchronously but the bank wire is settled asynchronously by the PSP.
      operationId: perks__consumers__consumer_id__pools__me__payouts__post
      parameters:
        - in: path
          name: consumer_id
          required: true
          schema:
            maxLength: 100
            minLength: 2
            pattern: ^[a-zA-Z0-9_.-]*$
            title: Consumer Id
            type: string
        - examples:
            default:
              value: 2.0.0
          in: header
          name: x-api-version
          required: false
          schema:
            default: 2.0.0
            title: X-Api-Version
            type: string
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Perks_PayoutAcceptedSchema'
          description: Successful Response
        '400':
          content:
            application/json:
              examples:
                PL-400-07:
                  summary: Payout Rejected
                  value:
                    code: PL-400-07
                    status: 400
                    title: Payout Rejected
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              examples:
                PL-401-00:
                  summary: Unauthorized
                  value:
                    code: PL-401-00
                    status: 401
                    title: Unauthorized
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              examples:
                PL-403-01:
                  summary: Consumer Pool Not Enabled
                  value:
                    code: PL-403-01
                    status: 403
                    title: Consumer Pool Not Enabled
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              examples:
                PL-404-02:
                  summary: Consumer Not Enrolled
                  value:
                    code: PL-404-02
                    status: 404
                    title: Consumer Not Enrolled
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              examples:
                PL-409-05:
                  summary: Consumer KYC Not Ready
                  value:
                    code: PL-409-05
                    status: 409
                    title: Consumer KYC Not Ready
                PL-409-06:
                  summary: Consumer Outflow Blocked
                  value:
                    code: PL-409-06
                    status: 409
                    title: Consumer Outflow Blocked
                PL-409-07:
                  summary: Pool Below Threshold
                  value:
                    code: PL-409-07
                    status: 409
                    title: Pool Below Threshold
                PL-409-08:
                  summary: Payment Account Missing
                  value:
                    code: PL-409-08
                    status: 409
                    title: Payment Account Missing
                PL-409-999:
                  summary: Contact Admin User
                  value:
                    code: PL-409-999
                    status: 409
                    title: Contact Admin User
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '502':
          content:
            application/json:
              examples:
                PL-502-03:
                  summary: PSP Service Unavailable
                  value:
                    code: PL-502-03
                    status: 502
                    title: PSP Service Unavailable
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
components:
  schemas:
    Perks_PayoutAcceptedSchema:
      properties:
        amount:
          description: Total amount paid out (sum of the settled rewards).
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          type: string
        payout_id:
          description: Identifier of the payout created on PayLead's side.
          format: uuid
          title: Payout Id
          type: string
        psp_payout_id:
          description: >-
            Identifier of the bank wire payout created on the PSP (Mangopay)
            side.
          title: Psp Payout Id
          type: string
        reward_count:
          description: Number of rewards settled by this payout.
          title: Reward Count
          type: integer
        status:
          default: PENDING
          description: >-
            Settlement status. The payout is initiated synchronously but the
            bank wire is settled asynchronously by the PSP, so it starts as
            `PENDING`.
          title: Status
          type: string
      required:
        - payout_id
        - psp_payout_id
        - amount
        - reward_count
      title: PayoutAcceptedSchema
      type: object
    ErrorResponse:
      additionalProperties: false
      description: >-
        An error response object (PayLead profile).


        Extension members (e.g. ``errors`` for validation) are allowed and
        serialised as

        top-level keys.
      properties:
        code:
          title: Code
          type: string
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Instance
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
      required:
        - code
        - title
        - status
      title: ErrorResponse
      type: object
  securitySchemes:
    oauth2:
      flows:
        clientCredentials:
          scopes:
            ALL: Full access to all resources (wildcard).
            LOYALTIES: Access to loyalties features.
            PERKS: Access to perks features.
            TX_INJECTION: Access to transaction sharing.
          tokenUrl: /tokens
      type: oauth2

````