# Create payout

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /payouts/:
    post:
      summary: Create payout
      deprecated: false
      description: >-

        Processes a Merchant-to-Peer payout from a business payout account to an
        individual's vrtx wallet.


        Required headers:

        - idempotency-key: Unique key to guarantee idempotent payout execution


        Request body must include payoutAmount (positive numeric string, up to 2
        decimals) and exactly one receiver identifier (customerId,
        walletAccountNumber, or mobileNumber).


        Successful responses return transactionId, payoutId, status, and
        createdAt metadata to track processing.


        Error responses align with the payout service contract for validation,
        missing customer/account, and payout limit checks.
                    
      operationId: createPayout
      tags:
        - Vrtx APIs/Payouts
        - Payouts
      parameters:
        - name: idempotency-key
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
            minLength: 1
            maxLength: 127
            examples:
              - payout_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payout_amount:
                  type: string
                  pattern: ^(?!0(?:\.0{1,2})?$)\d+(?:\.\d{1,2})?$
                  maxLength: 17
                  examples:
                    - '250.00'
                payout_purpose:
                  type: string
                  maxLength: 140
                  examples:
                    - Salary payment for November 2024
                external_reference:
                  type: string
                  maxLength: 140
                  examples:
                    - PAY-2024-001234
                customer_id:
                  type: string
                  minLength: 1
                  examples:
                    - CUST-5a8f9c2e-b3d4-4a1f-9e7c-8d6f5a4b3c2d
                wallet_account_number:
                  type: string
                  minLength: 1
                  examples:
                    - SA9280000000608010167519
                mobile_number:
                  type: string
                  pattern: ^(\+966|966|0)?5\d{8}$
                  description: >-
                    The user's Saudi mobile number. Accepts multiple formats:
                    5XXXXXXXX, 05XXXXXXXX, 9665XXXXXXXX, or +9665XXXXXXXX. The
                    number will be stored as provided.
                  examples:
                    - '+966501234567'
              required:
                - payout_amount
              x-apidog-orders:
                - payout_amount
                - payout_purpose
                - external_reference
                - customer_id
                - wallet_account_number
                - mobile_number
            examples:
              example1:
                value:
                  payout_amount: '250.00'
                  payout_purpose: Salary payment for November 2024
                  external_reference: PAY-2024-001234
                  customer_id: CUST-5a8f9c2e-b3d4-4a1f-9e7c-8d6f5a4b3c2d
                summary: example1
              example2:
                value:
                  payout_amount: '1500.50'
                  payout_purpose: Vendor payment
                  external_reference: INV-2024-987654
                  wallet_account_number: SA9280000000608010167519
                summary: example2
              example3:
                value:
                  payout_amount: '75.25'
                  payout_purpose: Refund
                  external_reference: REF-2024-ABCD
                  mobile_number: '+966501234567'
                summary: example3
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_id:
                    type: string
                    description: Unique identifier of the payout transaction
                  payout_id:
                    type: string
                    format: uuid
                    description: System payout identifier (UUID)
                    examples:
                      - 7c5a3d04-3c0e-4fd4-9c5d-4b4f5d6f98b2
                  status:
                    type: string
                    enum:
                      - PENDING
                      - PROCESSING
                      - FAILED
                      - COMPLETED
                    description: Current payout processing status
                    examples:
                      - PENDING
                  created_at:
                    type: string
                    format: date-time
                    description: Timestamp when the payout was created (ISO 8601)
                    examples:
                      - '2025-09-21T13:48:42.608Z'
                required:
                  - transaction_id
                  - payout_id
                  - status
                x-apidog-orders:
                  - transaction_id
                  - payout_id
                  - status
                  - created_at
              examples:
                example1:
                  summary: example1
                  value:
                    transaction_id: TXN-2024-11-19-A1B2C3D4
                    payout_id: 7c5a3d04-3c0e-4fd4-9c5d-4b4f5d6f98b2
                    status: PENDING
                    created_at: '2024-11-19T10:30:00.000Z'
                example2:
                  summary: example2
                  value:
                    transaction_id: TXN-2024-11-19-E5F6G7H8
                    payout_id: 9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a
                    status: PROCESSING
                    created_at: '2024-11-19T14:45:30.000Z'
          headers: {}
          x-apidog-name: OK
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                      - PAYOUT_AMOUNT_BELOW_MIN
                      - PAYOUT_AMOUNT_EXCEEDS_MAX
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: INVALID_INPUT
                    error_message: Invalid payout request data provided.
                    details: []
                    status_code: 400
                example2:
                  summary: example2
                  value:
                    error_code: PAYOUT_AMOUNT_BELOW_MIN
                    error_message: Payout amount is below the configured minimum.
                    details:
                      - field_name: payoutAmount
                        description: Amount must be at least 10.00 SAR
                        code: AMOUNT_TOO_LOW
                    status_code: 400
                example3:
                  summary: example3
                  value:
                    error_code: PAYOUT_AMOUNT_EXCEEDS_MAX
                    error_message: Payout amount exceeds the configured maximum.
                    details:
                      - field_name: payoutAmount
                        description: Amount must not exceed 50000.00 SAR
                        code: AMOUNT_TOO_HIGH
                    status_code: 400
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - UNAUTHORIZED
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: UNAUTHORIZED
                error_message: Unauthorized access
                details: []
                status_code: 401
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - FORBIDDEN
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: FORBIDDEN
                error_message: Access forbidden
                details: []
                status_code: 403
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - NOT_FOUND
                      - CUSTOMER_NOT_FOUND
                      - ACCOUNT_NOT_FOUND
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: NOT_FOUND
                    error_message: Resource not found
                    details: []
                    status_code: 404
                example2:
                  summary: example2
                  value:
                    error_code: CUSTOMER_NOT_FOUND
                    error_message: Receiver not found in vrtx system.
                    details: []
                    status_code: 404
                example3:
                  summary: example3
                  value:
                    error_code: ACCOUNT_NOT_FOUND
                    error_message: Account not found.
                    details: []
                    status_code: 404
          headers: {}
          x-apidog-name: Not Found
        '405':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INVALID_INPUT
                error_message: Input validation failed
                details: []
                status_code: 405
          headers: {}
          x-apidog-name: Method Not Allowed
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - CONFLICT
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: CONFLICT
                error_message: Resource conflict
                details: []
                status_code: 409
          headers: {}
          x-apidog-name: Conflict
        '410':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - NOT_FOUND
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: NOT_FOUND
                error_message: Resource not found
                details: []
                status_code: 410
          headers: {}
          x-apidog-name: Gone
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INVALID_INPUT
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INVALID_INPUT
                error_message: Input validation failed
                details:
                  - field_name: amount
                    description: Amount must be greater than zero
                    code: VALIDATION_ERROR
                status_code: 422
          headers: {}
          x-apidog-name: Unprocessable Entity
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - RATE_LIMITED
                      - PAYOUT_DAILY_COUNT_LIMIT_EXCEEDED
                      - PAYOUT_MONTHLY_COUNT_LIMIT_EXCEEDED
                      - PAYOUT_MONTHLY_AMOUNT_LIMIT_EXCEEDED
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: RATE_LIMITED
                    error_message: Too many requests
                    details: []
                    status_code: 429
                example2:
                  summary: example2
                  value:
                    error_code: PAYOUT_DAILY_COUNT_LIMIT_EXCEEDED
                    error_message: Daily transaction limit reached.
                    details: []
                    status_code: 429
                example3:
                  summary: example3
                  value:
                    error_code: PAYOUT_MONTHLY_COUNT_LIMIT_EXCEEDED
                    error_message: Monthly transaction limit would be exceeded.
                    details: []
                    status_code: 429
                example4:
                  summary: example4
                  value:
                    error_code: PAYOUT_MONTHLY_AMOUNT_LIMIT_EXCEEDED
                    error_message: Monthly amount limit would be exceeded.
                    details: []
                    status_code: 429
          headers: {}
          x-apidog-name: Too Many Requests
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: INTERNAL_ERROR
                    error_message: An internal server error occurred
                    details: []
                    status_code: 500
                example2:
                  summary: example2
                  value:
                    error_code: EXTERNAL_SERVICE_ERROR
                    error_message: An external service error occurred
                    details: []
                    status_code: 500
          headers: {}
          x-apidog-name: Internal Server Error
        '501':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: INTERNAL_ERROR
                error_message: An internal server error occurred
                details: []
                status_code: 501
          headers: {}
          x-apidog-name: Not Implemented
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - SERVICE_UNAVAILABLE
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              examples:
                example1:
                  summary: example1
                  value:
                    error_code: SERVICE_UNAVAILABLE
                    error_message: >-
                      Service is currently not available. Please try again
                      later.
                    details: []
                    status_code: 503
                example2:
                  summary: example2
                  value:
                    error_code: EXTERNAL_SERVICE_ERROR
                    error_message: An external service error occurred
                    details: []
                    status_code: 503
          headers: {}
          x-apidog-name: Service Unavailable
        '504':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - EXTERNAL_SERVICE_ERROR
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: EXTERNAL_SERVICE_ERROR
                error_message: An external service error occurred
                details: []
                status_code: 504
          headers: {}
          x-apidog-name: Gateway Timeout
        '505':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - UNSUPPORTED_VERSION
                  error_message:
                    type: string
                    description: Human-readable description of the error
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field_name:
                          type: string
                          description: >-
                            Field that triggered the validation error or
                            additional error context
                        description:
                          type: string
                          description: Detailed explanation of the error
                        code:
                          type: string
                          description: Optional field-level error code
                      required:
                        - field_name
                        - description
                      x-apidog-orders:
                        - field_name
                        - description
                        - code
                    description: List of structured error details
                  status_code:
                    type: number
                    description: HTTP status code associated with the error
                required:
                  - error_code
                  - error_message
                  - details
                  - status_code
                x-apidog-orders:
                  - error_code
                  - error_message
                  - details
                  - status_code
              example:
                error_code: UNSUPPORTED_VERSION
                error_message: An internal server error occurred
                details: []
                status_code: 500
          headers: {}
          x-apidog-name: HTTP Version Not Supported
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: ygCwLHacZ05b39mmc40P_
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: ygCwLHacZ05b39mmc40P_
            scopes:
              ygCwLHacZ05b39mmc40P_:
                bearerAuth: []
      x-apidog-folder: Vrtx APIs/Payouts
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-24712061-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
