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

# Create a request-money operation



## OpenAPI

````yaml /request-api/openapi.yaml post /v1/request-money
openapi: 3.0.0
info:
  title: Request API
  description: >-
    HTTP request-money API. OpenAPI specification generated from NestJS
    controllers and DTOs.
  version: 0.2.0
  contact: {}
servers:
  - url: https://{raas-backend-sandbox}
    description: >-
      RaaS Widgets backend (sandbox) — versioned routes live under /v1 (e.g.
      POST /v1/request-money)
    variables:
      raas-backend-sandbox:
        default: raas-backend-sandbox.example.com
        description: Concrete sandbox host provided by your integration contact
  - url: https://{raas-backend-production}
    description: RaaS Widgets backend (production) — versioned routes live under /v1
    variables:
      raas-backend-production:
        default: raas-backend-production.example.com
        description: Concrete production host provided by your integration contact
security: []
tags: []
paths:
  /v1/request-money:
    post:
      tags:
        - request-money
      summary: Create a request-money operation
      operationId: createRequest
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRequestMoneyDto'
            examples:
              bank_account:
                summary: Bank account payout
                value:
                  referenceId: OpBnK001
                  expiresInMinutes: 120
                  amount: 150.5
                  currency: GTQ
                  requestData:
                    userReferenceId: user-8842
                    name:
                      firstName: Maria
                      lastName: Lopez
                    address:
                      country: GT
                      stateCode: GT-01
                      city: Guatemala City
                      line1: 12 Av. Reforma
                    dob: '1990-05-15T00:00:00.000Z'
                    payoutMethod:
                      type: bank_account
                      bankAccount:
                        country: GT
                        stateCode: GT-01
                        accountNumber: '0123456789012'
                        accountType: checking
                        bankCode: BIND
                        bankName: BANCO INDUSTRIAL
              card:
                summary: Card payout
                value:
                  referenceId: ReqCrd01
                  expiresInMinutes: 60
                  amount: 75
                  currency: GTQ
                  requestData:
                    userReferenceId: user-5510
                    name:
                      firstName: Carlos
                      lastName: Mejia
                    address:
                      country: GT
                      line1: Zona 4
                    dob: '1988-11-03T00:00:00.000Z'
                    payoutMethod:
                      type: card
                      card:
                        number: tok_visa_4242
                        expiryMonth: '12'
                        expiryYear: '2028'
                        cardholderName: Carlos Mejia
                        last4: '4242'
                        brand: visa
                        country: GT
                        stateCode: GT-01
              cash:
                summary: Cash payout
                value:
                  referenceId: ReqCs001
                  expiresInMinutes: 30
                  amount: 200
                  currency: GTQ
                  requestData:
                    userReferenceId: user-2201
                    name:
                      firstName: Ana
                      lastName: Ruiz
                    address:
                      country: GT
                      line1: Chimaltenango
                    dob: '1995-01-20T00:00:00.000Z'
                    payoutMethod:
                      type: cash
                      cash:
                        provider: provider_x
                        reference: REF-998877
                        country: GT
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestMoneyResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyUnauthorizedDto'
        '403':
          description: OFAC Hit
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationFailedDto'
      security:
        - api_key: []
components:
  schemas:
    CreateRequestMoneyDto:
      type: object
      properties:
        requestData:
          description: End-user profile and payout method embedded in the request.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyRequestDataDto'
        referenceId:
          type: string
          description: >-
            Partner-provided operation code: exactly 8 characters from `a-z`,
            `A-Z`, and `0-9`.
          example: Ab3xY9mK
          pattern: ^[a-zA-Z0-9]{8}$
        expiresInMinutes:
          type: number
          description: Number of minutes the request-money operation will be valid.
          example: 120
        amount:
          type: number
          description: Amount of money to request.
          example: 100
        currency:
          type: string
          description: Currency code — **ISO 4217** (three letters).
          example: GTQ
      required:
        - requestData
        - referenceId
        - expiresInMinutes
        - amount
        - currency
    RequestMoneyResponseDto:
      type: object
      properties:
        status:
          type: string
          description: >-
            Public lifecycle status for the operation.


            | API value | Display label | Stage / party | Meaning |

            | --- | --- | --- | --- |

            | `pending` | Pending | System / requester | Awaiting payer action.
            |

            | `processing` | Processing | Payer / gateway | Payment in progress;
            not yet final. |

            | `completed` | Completed | Payment gateway | Successfully settled.
            |

            | `rejected` | Rejected | Payer | Payer declined the payment. |

            | `cancelled` | Cancelled | Requester | Issuer cancelled the
            operation or it expired. |
          example: pending
          enum:
            - pending
            - processing
            - completed
            - rejected
            - cancelled
        referenceId:
          type: string
          description: >-
            Partner-provided operation code echoed from the create request (8
            alphanumeric characters).
          example: Ab3xY9mK
        id:
          type: string
        statusDetails:
          type: string
          description: Details about the status of the operation.
          example: >-
            The operation is pending because the sender has not yet started the
            process.
        waLink:
          type: string
          description: Absolute WhatsApp link for the operation.
          example: >-
            https://wa.me/502123456789?text=Hola%20Juan,%20te%20enviamos%20una%20solicitud%20de%20dinero%20para%20pagar%20tu%20factura%20de%20agua#QWERTY
        landingLink:
          type: string
          description: Absolute landing page URL for the operation.
          example: https://landing.com/request-money/qwer-12345
      required:
        - status
        - referenceId
        - id
        - statusDetails
        - waLink
        - landingLink
    ApiKeyUnauthorizedDto:
      type: object
      properties:
        message:
          type: string
          description: Human-readable reason.
      required:
        - message
    ValidationFailedDto:
      type: object
      properties:
        message:
          type: string
          example: Validation failed
        details:
          type: object
          description: Validation error tree; for JSON bodies errors are under `body`.
          additionalProperties: true
      required:
        - message
        - details
    RequestMoneyRequestDataDto:
      type: object
      properties:
        name:
          description: End-user name.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyNameDto'
        address:
          description: >-
            End-user address. Although the endpoint does not require every
            field, sending country, state, and city is recommended to
            disambiguate blacklist checks.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyAddressDto'
        payoutMethod:
          description: >-
            Payout method discriminator: use `bank_account`, `card`, or `cash`
            with the matching nested object.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyPayoutMethodDto'
        userReferenceId:
          type: string
          description: Partner provided reference ID for the end-user.
          example: user-1234567890
        dob:
          type: string
          description: Date of birth — **ISO 8601** calendar date (`YYYY-MM-DD`).
          example: '1990-05-15T00:00:00.000Z'
      required:
        - name
        - address
        - payoutMethod
        - userReferenceId
        - dob
    RequestMoneyNameDto:
      type: object
      properties:
        firstName:
          type: string
          description: Given name.
          example: Maria
        secondName:
          type: string
          description: Optional second given name.
        lastName:
          type: string
          description: Family name.
          example: Lopez
        secondLastName:
          type: string
          description: Optional second family name.
      required:
        - firstName
        - lastName
    RequestMoneyAddressDto:
      type: object
      properties:
        country:
          type: string
          description: Country code — **ISO 3166-1 alpha-2**.
          example: GT
        stateCode:
          type: string
          description: >-
            Subdivision: preferably **ISO 3166-2**. When the downstream system
            validates ISO catalogs, send the **code** here.
          example: GT-01
        city:
          type: string
          description: City or locality.
        zipCode:
          type: string
          description: >-
            Postal code in the format required by the destination country (no
            single global ISO applies to postal formats).
        line1:
          type: string
          description: Primary street line.
        line2:
          type: string
          description: Secondary street line.
      required:
        - country
        - stateCode
        - line1
    RequestMoneyPayoutMethodDto:
      type: object
      properties:
        bankAccount:
          description: Bank account payout details.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyBankAccountDto'
        card:
          description: Card payout details.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyCardDto'
        cash:
          description: Cash payout details.
          allOf:
            - $ref: '#/components/schemas/RequestMoneyCashDto'
        type:
          type: string
          description: Logical discriminator.
          example: bank_account
          enum:
            - bank_account
            - card
            - cash
      required:
        - type
    RequestMoneyBankAccountDto:
      type: object
      properties:
        country:
          type: string
          description: '**ISO 3166-1 alpha-2** country code.'
          example: GT
        stateCode:
          type: string
          description: 'Subdivision: preferably **ISO 3166-2**.'
          example: GT-01
        accountNumber:
          type: string
          description: Account number.
          example: '012345678901234567'
        accountType:
          type: string
        bankCode:
          type: string
        bankName:
          type: string
          description: Bank name. Must be on uppercase.
          example: BANCO INDUSTRIAL
        number:
          type: string
      required:
        - bankName
        - number
    RequestMoneyCardDto:
      type: object
      properties:
        number:
          type: string
          description: PAN token or identifier as issued by the payment provider.
        expiryMonth:
          type: string
          description: >-
            Expiration month, typically `"01"`–`"12"`. By itself this is not a
            full **ISO 8601** datetime literal.
          example: '12'
        expiryYear:
          type: string
          description: Expiration year in the Gregorian calendar (e.g. `"2028"`).
          example: '2028'
        cardholderName:
          type: string
        last4:
          type: string
        brand:
          type: string
        country:
          type: string
          description: >-
            **ISO 3166-1 alpha-2** for the country associated with issuance or
            billing for the card.
          example: GT
        stateCode:
          type: string
          description: 'Subdivision: preferably **ISO 3166-2**.'
          example: GT-01
      required:
        - number
        - expiryMonth
        - expiryYear
        - cardholderName
    RequestMoneyCashDto:
      type: object
      properties:
        provider:
          type: string
        reference:
          type: string
          description: Provider-specific pickup or payout reference.
        country:
          type: string
          description: '**ISO 3166-1 alpha-2** country code.'
          example: GT
      required:
        - provider
        - reference
        - country
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-API-Key
      description: Integrator API key.

````