> ## 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.

# Request money (atomic flow)

> **Request money (atomic / full)**: validates input, ensures a **trusted requester** (`UserServices.ensureTrustedUser`),
then enqueues the **RequestMoneyFull** queue job (worker: CIP → contact → payment method → `requestMoneyV2`).

**HTTP** responds immediately with `RequestMoneyFullResponse` (`status: "Accepted"`, `operationId` = `correlationId`, tenant attribution `link`).
Synchronous 4xx/5xx: tenant/country, corridor, currency alignment, correlation id uniqueness, name/DOB/phone, and basic payout-method rules.

**Webhook** (`operationStatusHook` + `sharedSecret`): async outcome as `RequestMoneyFullOutcomePayload`
(`eventType: "request_money_full_outcome"`; `status` `"Accepted"` or `"Failed"` with `errorCode`, `reason`, `phase`).
Header `x-raas-signature` = Base64(HMAC-SHA256(raw JSON body, tenant `sharedSecret`)).

See also:
[Webhooks reference](/raas/api-reference/partner-webhooks).



## OpenAPI

````yaml /raas/swagger-partner.json post /user/operations/request-money-full
openapi: 3.0.0
info:
  title: ''
  version: 0.0.1
servers:
  - url: https://raas-partner-cv.nomas.cash/v1
security: []
paths:
  /user/operations/request-money-full:
    post:
      tags:
        - Operations
      summary: Request money (atomic flow)
      description: >-
        **Request money (atomic / full)**: validates input, ensures a **trusted
        requester** (`UserServices.ensureTrustedUser`),

        then enqueues the **RequestMoneyFull** queue job (worker: CIP → contact
        → payment method → `requestMoneyV2`).


        **HTTP** responds immediately with `RequestMoneyFullResponse` (`status:
        "Accepted"`, `operationId` = `correlationId`, tenant attribution
        `link`).

        Synchronous 4xx/5xx: tenant/country, corridor, currency alignment,
        correlation id uniqueness, name/DOB/phone, and basic payout-method
        rules.


        **Webhook** (`operationStatusHook` + `sharedSecret`): async outcome as
        `RequestMoneyFullOutcomePayload`

        (`eventType: "request_money_full_outcome"`; `status` `"Accepted"` or
        `"Failed"` with `errorCode`, `reason`, `phase`).

        Header `x-raas-signature` = Base64(HMAC-SHA256(raw JSON body, tenant
        `sharedSecret`)).


        See also:

        [Webhooks reference](/raas/api-reference/partner-webhooks).
      operationId: requestMoneyFull
      parameters: []
      requestBody:
        description: '`RequestMoneyFullParams` body'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestMoneyFullParams'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestMoneyFullResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestMoneyFullErrorResponse'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestMoneyFullErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  reason:
                    type: string
                required:
                  - reason
                type: object
      security:
        - api_key:
            - partner
            - partner_full
components:
  schemas:
    RequestMoneyFullParams:
      description: >-
        POST `/request-money-full` body: register-or-link the **requester**,
        then async money request to **requestTo**

        with **destinationPaymentMethod** (see `RaaSPartnerPaymentMethod`).


        Controller validates partner vs `requester.countryCode`, phone prefix,
        names, DOB, amounts/currency vs partner country, corridor
        (`DestinationCountry` / `DestinationPaymentMethodType` from destination
        PM), and idempotent `correlationId`.
      properties:
        requester:
          $ref: '#/components/schemas/RegisterUserParams'
          description: >-
            End-user profile and address. Same shape as partner registration;
            becomes the trusted sender after `ensureTrustedUser`.

            Field-level docs: `RegisterUserParams` (`model/partner/auth`).
        request:
          properties:
            recipientCurrency:
              type: string
              description: >-
                Must match tenant default currency and
                `destinationPaymentMethod.currency` in controller validation.
            recipientAmount:
              type: number
              format: double
            reason:
              type: string
              description: Optional reason for the request
            destinationPaymentMethod:
              $ref: '#/components/schemas/RaaSPartnerPaymentMethod'
              description: Destination rail (card, UBN, etc.); discriminated by `type`.
            correlationId:
              type: string
              description: >-
                Partner-supplied idempotency key; must be unused and is returned
                as `operationId` on success.
            requestTo:
              $ref: '#/components/schemas/RequestToParams'
          required:
            - recipientCurrency
            - recipientAmount
            - destinationPaymentMethod
            - correlationId
            - requestTo
          type: object
          description: >-
            Correlation id, beneficiary, amounts, optional reason, and payout
            method. Processed asynchronously after HTTP 200.
      required:
        - requester
        - request
      type: object
      additionalProperties: false
    RequestMoneyFullResponse:
      description: >-
        Immediate HTTP 200 payload after the job is enqueued (not final
        operation state).

        Final async outcome is delivered only via
        `RequestMoneyFullOutcomePayload` webhook when configured.
      properties:
        userId:
          type: string
          description: Trusted user id created or resolved during the call.
        operationId:
          type: string
          description: Same value as `request.correlationId`.
        status:
          type: string
          enum:
            - Accepted
          nullable: false
          description: >-
            Always `"Accepted"` here meaning “accepted for processing”, not
            platform operation completed.
        link:
          type: string
          description: Tenant attribution / tracking URL for this correlation id.
      required:
        - userId
        - operationId
        - status
        - link
      type: object
      additionalProperties: false
    RequestMoneyFullErrorResponse:
      description: >-
        Respuesta de error 4xx/5xx de POST /request-money-full. OpenAPI expone
        el enum en code.
      properties:
        reason:
          type: string
        code:
          $ref: '#/components/schemas/RequestMoneyFullErrorCode'
      required:
        - reason
        - code
      type: object
      additionalProperties: false
    RegisterUserParams:
      description: >-
        Core body for partner user registration (`register-user-v2` and
        related). At least one of `phoneNumber` or `email` is typically required
        by the route.

        Reused as `requester` on POST `/request-money-full` (see
        `RequestMoneyFullParams` in `model/operation`).
      properties:
        phoneNumber:
          type: string
          description: >-
            <span style="color:red">required</span>


            Mobile phone number with country code. Must be a valid mobile phone
            number.

            Example: `+5215521206703` for MX.


            It doesn't allow duplicates.
        lastName:
          type: string
          description: |-
            Primary legal last name (e.g. paternal surname).
            Example: `Hernández`.
        lastName2:
          type: string
          description: |-
            Optional second last name when used (e.g. maternal surname).
            Example: `Gómez`.

            **Strongly recommended** to avoid OFAC matches.
        gender:
          type: string
          enum:
            - Male
            - Female
            - Other
            - None
          description: |-
            Self-reported gender when the product collects it.
            Example: `Female`.
        dob:
          type: string
          format: date-time
          description: >-
            Date of birth in ISO 8601 format (`YYYY-MM-DD` or full date-time).

            DOB must be a real calendar date and the person must be at least 18
            and under 100 years old.


            **Strongly recommended** to avoid OFAC matches.
        email:
          type: string
          description: |-
            Email address.
            It doesn't allow duplicates.

            **Strongly recommended**.
        firstName:
          type: string
          description: |-
            Legal first name(s).
            Example: `Ana`.
        middleName:
          type: string
          description: |-
            Middle name when collected. Example: `María`. 
            Strongly recommended to avoid OFAC matches.
        address1:
          type: string
          description: |-
            User legal address, Street and number.
            Example: `Blvd. Kukulcan Km. 4.5`.

            **Strongly recommended** to avoid OFAC matches.
        address2:
          type: string
        address3:
          type: string
        streetNumber:
          type: string
        countryCode:
          type: string
          description: |-
            Country code.
            ISO 3166-1 alpha-2.
        city:
          type: string
        zipCode:
          type: string
        state:
          type: string
          description: |-
            Address state/province/department.
            ISO 3166-2:CC (CC: country code).
            Or the state short name.
            Example: `DF` for Distrito Federal, `JA` for Jalisco.
        birthState:
          type: string
          description: |-
            Address state/province/department.
            ISO 3166-2:CC (CC: country code).
            Or the state short name.
            Example: `DF` for Distrito Federal, `JA` for Jalisco.
        lang:
          $ref: '#/components/schemas/Language'
          description: |-
            User Language.
            ISO 639-1.
            Example: `es` for Spanish, `en` for English.
        placeDetail:
          type: string
          description: |-
            Place detail from address if available.
            **Must be a valid place detail json from google maps**.
        latitude:
          type: number
          format: double
          description: Latitude from address if available.
        longitude:
          type: number
          format: double
          description: Longitude from address if available.
        callLocationLatitude:
          type: number
          format: double
          description: Latitude from user location if available.
        callLocationLongitude:
          type: number
          format: double
          description: Longitude from user location if available.
      required:
        - lastName
        - firstName
        - address1
        - countryCode
        - city
        - state
      type: object
      additionalProperties: false
    RaaSPartnerPaymentMethod:
      anyOf:
        - $ref: '#/components/schemas/RaaSPaymentMethodDebitCard'
        - $ref: '#/components/schemas/RaaSPaymentMethodCreditCard'
        - $ref: '#/components/schemas/RaaSPaymentMethodUBN'
        - $ref: '#/components/schemas/RaaSPaymentMethodOther'
      description: >-
        Payment method object used by API clients. Discriminated union by `type`
        for better DX and compile-time checks.

        - DebitCard / CreditCard: number, nameOnCard, expirationDate (MMYY),
        country, currency required.

        - UBN: number, currency, country required.

        - Other types: type + country required.
    RequestToParams:
      description: >-
        Beneficiary (“request to”) embedded in `RequestMoneyFullParams.request`.

        Worker normalizes `phoneNumber` and registers the contact for the
        trusted requester.
      properties:
        phoneNumber:
          type: string
          description: >-
            E.164 or national form accepted by `libphonenumber-js`; must match
            tenant dial code rules in the controller.
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        countryCode:
          type: string
          description: >-
            ISO 3166-1 alpha-2 for the beneficiary; used for attribution link
            and contact metadata.
      required:
        - phoneNumber
        - firstName
        - lastName
        - countryCode
      type: object
      additionalProperties: false
    RequestMoneyFullErrorCode:
      description: >-
        Códigos de error posibles en respuestas 4xx/5xx de POST
        /request-money-full

        y en el webhook request_money_full_outcome (campo errorCode).

        Incluido en OpenAPI para que los clientes generen tipos/enums.
      enum:
        - ERROR_TENANT_NOT_FOUND
        - ERROR_CIP_NOT_FOUND
        - ERROR_CIP_NOT_COMPLETED
        - ERROR_MUST_PERFORM_LEVEL_ONE_FIRST
        - ERROR_SUBSCRIBER_NOT_FOUND
        - CARD_VERIFICATION_ERROR
        - ERROR_CARD_VERIFICATION
        - ERROR_PAYMENT_METHOD_NOT_FOUND
        - ERROR_ERROR_ADD_SOURCE_UBN_ERROR
        - ERROR_CONTACT_NOT_FOUND
        - ERROR_COUNTRY_NOT_SUPPORTED
        - ERROR_INVALID_COUNTRY_CODE
        - ERROR_PHONE_NUMBER_NOT_SUPPORTED
        - ERROR_INVALID_OPERATION
        - ERROR_OPERATION_NOT_FOUND
        - ERROR_OPERATION_ALREADY_COMPLETED
        - ERROR_INTERNAL_SERVER_ERROR
        - ERROR_REQUEST_MONEY_FULL
        - ERROR_INVALID_PARTNER_TOKEN
        - ERROR_INVALID_AMOUNT_ERROR
        - ERROR_INVALID_CURRENCY_CODE
        - ERROR_CORRELATION_ID_REQUIRED
        - ERROR_CORRELATION_ID_ALREADY_USED
        - ERROR_DESTINATION_COUNTRY_NOT_SUPPORTED
        - INVALID_PHONE_NUMBER
        - INVALID_NAME
        - ERROR_UBN_NUMBER_REQUIRED
        - ERROR_INVALID_DATE_OF_BIRTH
      type: string
    Language:
      enum:
        - en
        - es
      type: string
    RaaSPaymentMethodDebitCard:
      description: >-
        Card payment method (request-money-full, add card, etc.). Required
        fields enforced at compile time.
      properties:
        currency:
          type: string
          description: |-
            Currency code.

            ISO 4217 format.
            Example: `USD` for United States Dollar, `MXN` for Mexican Peso.
        bankAccountType:
          type: string
          enum:
            - CheckingAccount
            - SavingsAccount
            - OtherAccount
          description: |-
            Bank account type

            Example: `CheckingAccount`, `SavingsAccount`, `OtherAccount`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: |-
            Credit/Debit card type

            Example: `DebitCard`, `CreditCard`.
        number:
          type: string
          description: |-
            Credit/Debit/UBN/VNA/CLABE number

            Example: `1234567890`.
        accountNumber:
          type: string
          description: |-

            Account number of the payment method. Example `1234567890`.
        bankEntityNumber:
          type: string
        bankName:
          type: string
          description: Name of the bank. Example `BCP`.
        isPrimary:
          type: boolean
          description: >-
            Is primary payment method?


            Example: `true` for primary payment method, `false` for secondary
            payment method.
        name:
          type: string
          description: |-
            Payment method name

            Name of the payment method. Example `VISA-1234`.
        id:
          type: string
          description: Payment method ID
        type:
          type: string
          enum:
            - DebitCard
          nullable: false
        nameOnCard:
          type: string
        expirationDate:
          type: string
        country:
          type: string
        cardType:
          type: string
          enum:
            - DebitCard
          nullable: false
      required:
        - type
        - number
        - nameOnCard
        - expirationDate
        - country
        - currency
      type: object
      additionalProperties: false
    RaaSPaymentMethodCreditCard:
      description: Credit card payment method. Required fields enforced at compile time.
      properties:
        currency:
          type: string
          description: |-
            Currency code.

            ISO 4217 format.
            Example: `USD` for United States Dollar, `MXN` for Mexican Peso.
        bankAccountType:
          type: string
          enum:
            - CheckingAccount
            - SavingsAccount
            - OtherAccount
          description: |-
            Bank account type

            Example: `CheckingAccount`, `SavingsAccount`, `OtherAccount`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: |-
            Credit/Debit card type

            Example: `DebitCard`, `CreditCard`.
        number:
          type: string
          description: |-
            Credit/Debit/UBN/VNA/CLABE number

            Example: `1234567890`.
        accountNumber:
          type: string
          description: |-

            Account number of the payment method. Example `1234567890`.
        bankEntityNumber:
          type: string
        bankName:
          type: string
          description: Name of the bank. Example `BCP`.
        isPrimary:
          type: boolean
          description: >-
            Is primary payment method?


            Example: `true` for primary payment method, `false` for secondary
            payment method.
        name:
          type: string
          description: |-
            Payment method name

            Name of the payment method. Example `VISA-1234`.
        id:
          type: string
          description: Payment method ID
        type:
          type: string
          enum:
            - CreditCard
          nullable: false
        nameOnCard:
          type: string
        expirationDate:
          type: string
        country:
          type: string
        cardType:
          type: string
          enum:
            - CreditCard
          nullable: false
      required:
        - type
        - number
        - nameOnCard
        - expirationDate
      type: object
      additionalProperties: false
    RaaSPaymentMethodUBN:
      description: >-
        UBN payment method. Required: number, currency, country (ISO 3166-1
        alpha-2).
      properties:
        currency:
          type: string
          description: |-
            Currency code.

            ISO 4217 format.
            Example: `USD` for United States Dollar, `MXN` for Mexican Peso.
        bankAccountType:
          type: string
          enum:
            - CheckingAccount
            - SavingsAccount
            - OtherAccount
          description: |-
            Bank account type

            Example: `CheckingAccount`, `SavingsAccount`, `OtherAccount`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: |-
            Credit/Debit card type

            Example: `DebitCard`, `CreditCard`.
        number:
          type: string
          description: |-
            Credit/Debit/UBN/VNA/CLABE number

            Example: `1234567890`.
        accountNumber:
          type: string
          description: |-

            Account number of the payment method. Example `1234567890`.
        bankEntityNumber:
          type: string
        bankName:
          type: string
          description: Name of the bank. Example `BCP`.
        isPrimary:
          type: boolean
          description: >-
            Is primary payment method?


            Example: `true` for primary payment method, `false` for secondary
            payment method.
        name:
          type: string
          description: |-
            Payment method name

            Name of the payment method. Example `VISA-1234`.
        id:
          type: string
          description: Payment method ID
        type:
          type: string
          enum:
            - UBN
          nullable: false
        country:
          type: string
      required:
        - type
        - number
        - currency
        - country
      type: object
      additionalProperties: false
    RaaSPaymentMethodOther:
      properties:
        currency:
          type: string
          description: |-
            Currency code.

            ISO 4217 format.
            Example: `USD` for United States Dollar, `MXN` for Mexican Peso.
        bankAccountType:
          type: string
          enum:
            - CheckingAccount
            - SavingsAccount
            - OtherAccount
          description: |-
            Bank account type

            Example: `CheckingAccount`, `SavingsAccount`, `OtherAccount`.
        cardtype:
          type: string
          enum:
            - DebitCard
            - CreditCard
          description: |-
            Credit/Debit card type

            Example: `DebitCard`, `CreditCard`.
        number:
          type: string
          description: |-
            Credit/Debit/UBN/VNA/CLABE number

            Example: `1234567890`.
        accountNumber:
          type: string
          description: |-

            Account number of the payment method. Example `1234567890`.
        bankEntityNumber:
          type: string
        bankName:
          type: string
          description: Name of the bank. Example `BCP`.
        isPrimary:
          type: boolean
          description: >-
            Is primary payment method?


            Example: `true` for primary payment method, `false` for secondary
            payment method.
        name:
          type: string
          description: |-
            Payment method name

            Name of the payment method. Example `VISA-1234`.
        id:
          type: string
          description: Payment method ID
        type:
          $ref: '#/components/schemas/RaaSPaymentMethodOtherType'
        country:
          type: string
        nameOnCard:
          type: string
        expirationDate:
          type: string
      required:
        - type
        - country
      type: object
      additionalProperties: false
    RaaSPaymentMethodOtherType:
      type: string
      enum:
        - MobileWallet
        - BankAccount
        - CashLoadLocation
        - AppleDigitalWallet
        - GoogleDigitalWallet
        - CLABE
        - VirtualNetworkAccount
      description: >-
        Other payment method types. Only type + country required; bank account
        not fully supported yet.
  securitySchemes:
    api_key:
      type: apiKey
      name: api_key
      in: header

````