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

# Create bank payout

> Create a new bank payout. The order is created in "Created" state and may require OTP validation before being dispatched.
Only one of amounts.debitedAmount.amount or amounts.receivedAmount.amount can be provided (set the other to 0).
For PERSON recipients: document.documentType must be one of NATIONAL_ID, RESIDENCE_CARD, PASSPORT, DRIVING_LICENSE, CIF. Fields name, surname and relation are required.
For BUSINESS recipients: document.documentType must be TAX_ID. Field companyName is required instead of name/surname. Field relation is ignored (defaults to COMERCIAL).



## OpenAPI

````yaml post /api/v1/account/users/{uid}/accounts/{aid}/bank-payouts
openapi: 3.0.0
info:
  contact:
    email: support@tropipay.com
    name: Tropipay Support
    url: https://help.tropipay.com/contacto/
  description: Banking as a service API.
  title: RALIO API
  version: '1.0'
servers:
  - url: https://sandbox-revo-api.raliopay.com
security: []
paths:
  /api/v1/account/users/{uid}/accounts/{aid}/bank-payouts:
    post:
      tags:
        - payouts
      summary: Create bank payout
      description: >-
        Create a new bank payout. The order is created in "Created" state and
        may require OTP validation before being dispatched.

        Only one of amounts.debitedAmount.amount or
        amounts.receivedAmount.amount can be provided (set the other to 0).

        For PERSON recipients: document.documentType must be one of NATIONAL_ID,
        RESIDENCE_CARD, PASSPORT, DRIVING_LICENSE, CIF. Fields name, surname and
        relation are required.

        For BUSINESS recipients: document.documentType must be TAX_ID. Field
        companyName is required instead of name/surname. Field relation is
        ignored (defaults to COMERCIAL).
      parameters:
        - description: User ID
          in: path
          name: uid
          required: true
          schema:
            type: string
        - description: Account ID
          in: path
          name: aid
          required: true
          schema:
            type: string
        - description: Idempotency key for safely retrying requests
          in: header
          name: Idempotency-Key
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/dto.CreateBankPayoutRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreatePayoutResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
      security:
        - ApiKeyAuth: []
components:
  requestBodies:
    dto.CreateBankPayoutRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/dto.CreateBankPayoutRequest'
      description: Payout details
      required: true
  schemas:
    dto.CreatePayoutResponse:
      properties:
        canceledAt:
          example: '2025-01-15T10:35:00Z'
          type: string
        counterparty:
          description: >-
            Counterparty is the party on the other side of the order, resolved
            per

            operation type: sender/cardholder for incomes, recipient/destination
            for

            expenses. May be empty when not available.
          example: John Doe
          type: string
        createdAt:
          example: '2025-01-15T10:30:00Z'
          type: string
        destination:
          $ref: '#/components/schemas/domain.Money'
        detailUrl:
          example: /api/v1/account/orders/e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b
          type: string
        displayType:
          example: Transaction Type
          type: string
        failedAt:
          example: '2025-01-15T10:35:00Z'
          type: string
        fee:
          $ref: '#/components/schemas/domain.Money'
        fx:
          $ref: '#/components/schemas/dto.FXResponse'
        id:
          example: e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b
          type: string
        isOTPRequired:
          example: true
          type: boolean
        origin:
          $ref: '#/components/schemas/domain.Money'
        reference:
          example: PAY-2025-001234
          type: string
        reversedAt:
          example: '2025-01-15T10:35:00Z'
          type: string
        settledAt:
          example: '2025-01-15T10:35:00Z'
          type: string
        state:
          example: PENDING
          type: string
        type:
          example: TRANSACTION_TYPE
          type: string
        updatedAt:
          example: '2025-01-15T10:30:05Z'
          type: string
      type: object
    httperror.ErrResponse:
      properties:
        error:
          $ref: '#/components/schemas/httperror.ErrorData'
      type: object
    dto.CreateBankPayoutRequest:
      properties:
        amounts:
          $ref: '#/components/schemas/dto.BankPayoutAmounts'
        description:
          example: Payment for services rendered
          minLength: 3
          type: string
        ownReference:
          example: PAY-2025-001234
          type: string
        recipient:
          $ref: '#/components/schemas/dto.BankPayoutRecipient'
      required:
        - amounts
        - recipient
      type: object
    domain.Money:
      properties:
        amount:
          description: 'Amount in cents. Ex: 12345 = 123.45€'
          example: 1000
          type: integer
        currency:
          description: USD, EUR, etc.
          enum:
            - EUR
            - USD
            - MXN
            - CAD
            - BRL
            - COP
            - PEN
            - BOB
            - CLP
            - ARS
            - UYU
            - PYG
            - CNY
            - HKD
            - MYR
            - USDT
            - USDC
            - EURC
            - BTC
            - ETH
          example: CURRENCY
          type: string
      required:
        - currency
      type: object
    dto.FXResponse:
      properties:
        pair:
          example: CURRENCY/CURRENCY
          type: string
        rate:
          example: 1.08
          type: number
        timestamp:
          example: '2025-01-15T10:30:00Z'
          type: string
      type: object
    httperror.ErrorData:
      properties:
        code:
          $ref: '#/components/schemas/httperror.ErrorCode'
        details:
          items:
            $ref: '#/components/schemas/httperror.ErrorDetails'
          type: array
        message:
          type: string
        type:
          $ref: '#/components/schemas/httperror.ErrorType'
      type: object
    dto.BankPayoutAmounts:
      properties:
        debitedAmount:
          $ref: '#/components/schemas/domain.Money'
        receivedAmount:
          $ref: '#/components/schemas/domain.Money'
      required:
        - debitedAmount
        - receivedAmount
      type: object
    dto.BankPayoutRecipient:
      properties:
        abaRoutingCode:
          description: >-
            Destination bank's 9-digit ABA routing number, sent alongside swift
            for SWIFT payouts. Required when the destination bank is in the US
            or a US-linked territory (US, PR, AS, GU, MP, VI); optional
            otherwise.
          example: '021000021'
          type: string
        accountNumber:
          example: ES9121000418450200051332
          type: string
        address:
          $ref: '#/components/schemas/dto.BankPayoutRecipientAddress'
        bankCountry:
          description: >-
            Destination bank's ISO country, used for rail/currency resolution.
            Distinct from address.country (the beneficiary's residence).
          example: ES
          type: string
        beneficiaryType:
          enum:
            - PERSON
            - BUSINESS
          example: PERSON
          type: string
        companyName:
          example: Acme Corp S.L.
          type: string
        contact:
          $ref: '#/components/schemas/dto.BankPayoutRecipientContact'
        document:
          $ref: '#/components/schemas/dto.BankPayoutRecipientDocument'
        institutionNumber:
          example: '003'
          type: string
        name:
          example: Maria
          type: string
        relation:
          description: Required for PERSON recipients. Optional for BUSINESS.
          example: FRIEND
          type: string
        routingData:
          description: >-
            How the destination bank account is identified: IBAN (SEPA), SWIFT
            (international wire) or WIRE (US domestic Fedwire, abaRoutingCode
            required).
          enum:
            - SEPA
            - IBAN
            - SWIFT
            - WIRE
          example: SEPA
          type: string
        surname:
          example: Garcia
          type: string
        swift:
          example: BANKES
          type: string
        transitNumber:
          example: '00011'
          type: string
      required:
        - accountNumber
        - address
        - bankCountry
        - beneficiaryType
        - document
        - routingData
      type: object
    httperror.ErrorCode:
      enum:
        - INVALID_REQUEST
        - UNAUTHORIZED
        - FORBIDDEN
        - NOT_FOUND
        - INTERNAL_SERVER_ERROR
        - UNKNOWN_ERROR
        - NOT_IMPLEMENTED
        - TOO_MANY_REQUESTS
        - QUOTE_EXPIRED
        - BAD_GATEWAY
      type: string
      x-enum-varnames:
        - InvalidRequestCode
        - UnauthorizedCode
        - ForbiddenCode
        - NotFoundCode
        - InternalServerCode
        - UnknownErrorCode
        - NotImplementedCode
        - TooManyRequestsCode
        - QuoteExpiredCode
        - BadGatewayCode
    httperror.ErrorDetails:
      properties:
        field:
          type: string
        message:
          type: string
      type: object
    httperror.ErrorType:
      enum:
        - VALIDATION_ERROR
        - CONFLICT_ERROR
        - UNPROCESSABLE_ERROR
        - AUTHENTICATION_ERROR
        - AUTHORIZATION_ERROR
        - NOT_FOUND_ERROR
        - INTERNAL_ERROR
        - NOT_IMPLEMENTED_ERROR
        - UNKNOWN_ERROR
        - RATE_LIMIT_ERROR
        - BAD_GATEWAY_ERROR
      type: string
      x-enum-varnames:
        - ValidationError
        - ConflictError
        - UnprocessableError
        - AuthenticationError
        - AuthorizationError
        - NotFoundError
        - InternalError
        - NotImplementedError
        - UnknownError
        - RateLimitError
        - BadGatewayError
    dto.BankPayoutRecipientAddress:
      properties:
        city:
          example: Barcelona
          type: string
        country:
          example: ES
          type: string
        line1:
          example: Calle Gran Via 123
          type: string
        postalCode:
          example: '08001'
          type: string
        province:
          example: Barcelona
          type: string
      required:
        - city
        - country
        - line1
        - postalCode
        - province
      type: object
    dto.BankPayoutRecipientContact:
      properties:
        phone:
          example: '+34612345678'
          type: string
      type: object
    dto.BankPayoutRecipientDocument:
      properties:
        documentType:
          description: >-
            Document type. For PERSON: NATIONAL_ID, RESIDENCE_CARD, PASSPORT,
            DRIVING_LICENSE, CIF. For BUSINESS: TAX_ID only.
          enum:
            - NATIONAL_ID
            - RESIDENCE_CARD
            - PASSPORT
            - DRIVING_LICENSE
            - CIF
            - TAX_ID
          example: NATIONAL_ID
          type: string
        number:
          example: 87654321B
          type: string
      required:
        - documentType
        - number
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Key for accessing management endpoints
      x-mint-auth-type: bearer

````