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

> Creates a new magic link that can be sent to an end user. The request body is discriminated by the `flow` field: each flow defines its own `config` payload (e.g. `m2m` accepts pre-filled user data; `smart` is minimal). The shared envelope (referenceId, expiration, theme, language) is common to all flows. Returns the full widget URL and authentication token.



## OpenAPI

````yaml /raas-widgets/openapi.json post /partner/links
openapi: 3.0.0
info:
  title: RaaS Widgets Partner API
  description: >
    REST API for RaaS Widgets partner integrations. Create magic links for
    embeddable flows, manage end users, track transfer operations, handle CIP
    verification, and configure webhooks for real-time event notifications.


    This specification covers the **Partner-accessible API** only (`X-API-Key`
    against `/partner/*`). Widget and Superadmin APIs are out of scope.


    ## Authentication


    All endpoints require an API key passed in the `X-API-Key` header. Use
    `raas_sandbox_*` keys for the sandbox environment and `raas_live_*` keys for
    production.


    ## Environments


    | Environment | Base URL |

    |---|---|

    | Sandbox | `https://raas-widgets-backend-sandbox.up.railway.app` |
  version: 1.18.0
  contact: {}
servers:
  - url: https://raas-widgets-backend-sandbox.up.railway.app
    description: Sandbox
security: []
tags:
  - name: Partner - Magic Links
    description: Create, list, and manage magic links for flows
  - name: Partner - Flows
    description: List enabled flows and the full flow catalog
  - name: Partner - Users
    description: View and manage end users associated with your partner account
  - name: Partner - Operations
    description: Track money transfer operations and their statuses
  - name: Partner - Requests
    description: List and inspect money-request records
  - name: Partner - Deferred Payouts
    description: List, inspect, and cancel deferred payout remittances
  - name: Partner - CIP
    description: Customer Identification Program (CIP) verification management
  - name: Partner - Data Requests
    description: Fulfill data requests for additional user information
  - name: Partner - Settings
    description: Configure partner-level settings (redirect URLs, logo, etc.)
  - name: Partner - Webhooks
    description: Configure webhook endpoints and inspect delivery history
  - name: Partner - Pricing
    description: >-
      Indicative pre-quote summaries (best / worst / averages) for partner
      integrations
paths:
  /partner/links:
    post:
      tags:
        - Partner - Magic Links
      summary: Create a magic link
      description: >-
        Creates a new magic link that can be sent to an end user. The request
        body is discriminated by the `flow` field: each flow defines its own
        `config` payload (e.g. `m2m` accepts pre-filled user data; `smart` is
        minimal). The shared envelope (referenceId, expiration, theme, language)
        is common to all flows. Returns the full widget URL and authentication
        token.
      operationId: LinksController_createLink
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateM2mLinkDto'
                - $ref: '#/components/schemas/CreateSmartLinkDto'
                - $ref: '#/components/schemas/CreateFundRequestLinkDto'
                - $ref: '#/components/schemas/CreateCashDepositLinkDto'
                - $ref: '#/components/schemas/CreateRequestLinkDto'
                - $ref: '#/components/schemas/CreateSendLinkDto'
                - $ref: '#/components/schemas/CreatePayoutClaimLinkDto'
                - $ref: '#/components/schemas/CreateDeferredPayoutOriginationLinkDto'
              discriminator:
                propertyName: flow
                mapping:
                  m2m:
                    $ref: '#/components/schemas/CreateM2mLinkDto'
                  smart:
                    $ref: '#/components/schemas/CreateSmartLinkDto'
                  fund-request:
                    $ref: '#/components/schemas/CreateFundRequestLinkDto'
                  cash-deposit:
                    $ref: '#/components/schemas/CreateCashDepositLinkDto'
                  request:
                    $ref: '#/components/schemas/CreateRequestLinkDto'
                  send:
                    $ref: '#/components/schemas/CreateSendLinkDto'
                  payout-claim:
                    $ref: '#/components/schemas/CreatePayoutClaimLinkDto'
                  deferred-payout-origination:
                    $ref: >-
                      #/components/schemas/CreateDeferredPayoutOriginationLinkDto
      responses:
        '201':
          description: Magic link created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateLinkResponseDto'
        '400':
          description: Validation failed or unknown flow
        '401':
          description: Unauthorized — invalid or missing API key / bearer token
        '403':
          description: Forbidden — flow not enabled or user is blocked
      security:
        - api-key: []
components:
  schemas:
    CreateM2mLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "m2m" for this variant.
          enum:
            - m2m
          example: m2m
        config:
          description: >-
            M2M-specific configuration: pre-filled user data, transfer flavor,
            theme mode.
          allOf:
            - $ref: '#/components/schemas/M2mLinkConfigDto'
      required:
        - referenceId
        - flow
    CreateSmartLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "smart" for this variant.
          enum:
            - smart
          example: smart
        config:
          description: Smart-specific configuration (minimal).
          allOf:
            - $ref: '#/components/schemas/SmartLinkConfigDto'
      required:
        - referenceId
        - flow
    CreateFundRequestLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "fund-request" for this variant.
          enum:
            - fund-request
          example: fund-request
        config:
          description: >-
            Fund-request configuration imitating the Request API
            CreateRequestMoneyDto: amount, currency and the embedded requestData
            (end-user profile + payout method).
          allOf:
            - $ref: '#/components/schemas/FundRequestLinkConfigDto'
      required:
        - referenceId
        - flow
        - config
    CreateCashDepositLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "cash-deposit" for this variant.
          enum:
            - cash-deposit
          example: cash-deposit
        config:
          description: >-
            Cash-deposit configuration: redirect callbackUrl, optional
            allowedMerchants, and a type discriminator (operation_payment with
            operationId, or standalone with sender/recipient context).
          allOf:
            - $ref: '#/components/schemas/CashDepositLinkConfigDto'
      required:
        - referenceId
        - flow
        - config
    CreateRequestLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "request" for this variant.
          enum:
            - request
          example: request
        config:
          description: Request-specific configuration (minimal).
          allOf:
            - $ref: '#/components/schemas/RequestLinkConfigDto'
      required:
        - referenceId
        - flow
    CreateSendLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "send" for this variant.
          enum:
            - send
          example: send
        config:
          description: Send-specific configuration (optional).
          allOf:
            - $ref: '#/components/schemas/SendLinkConfigDto'
      required:
        - referenceId
        - flow
    CreatePayoutClaimLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: Flow discriminator. Must be "payout-claim" for this variant.
          enum:
            - payout-claim
          example: payout-claim
        config:
          $ref: '#/components/schemas/PayoutClaimLinkConfigDto'
      required:
        - referenceId
        - flow
        - config
    CreateDeferredPayoutOriginationLinkDto:
      type: object
      properties:
        referenceId:
          type: string
          description: >-
            Your unique identifier for the end user in your system. Used to
            correlate users with your records and to detect returning users.
          example: user-12345
        externalId:
          type: string
          description: >-
            Your tracing ID for this link/intent (order id, ticket, invoice,
            etc.). Copied onto the operation when the transfer is created so you
            can search operations by this value. Distinct from referenceId
            (which identifies the user).
          example: ORD-2026-001
          maxLength: 128
        expiresInMinutes:
          type: number
          description: >-
            Link time-to-live in minutes. The link becomes inaccessible after
            expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days).
            Defaults to the partner-level configuration (usually 60 minutes).
          default: 60
          minimum: 5
          maximum: 10080
          example: 120
        metadata:
          type: object
          description: >-
            Arbitrary key-value metadata to attach to the link. Useful for
            storing internal references, campaign IDs, etc. Returned in link
            detail and webhook payloads.
          example:
            orderId: ORD-2026-001
            campaign: february-promo
        theme:
          type: object
          description: >-
            Theme configuration object for the widget. The schema is owned by
            the flow frontend and is stored as-is. Overrides the partner-level
            theme.
          example:
            name: lola-default-dark
            tokens:
              color-accent: '#1dafa1'
        language:
          type: string
          description: >-
            Language code for the widget UI (ISO 639-1). Overrides browser
            detection.
          example: es
          enum:
            - en
            - es
        callbackUrl:
          type: string
          description: >-
            URL to receive callback notifications for this specific link.
            Overrides the partner-level webhook URL for link-specific events.
          example: https://api.example.com/callbacks/m2m
        headerName:
          type: string
          description: >-
            Brand name shown in the widget header for this link. When omitted,
            the widget falls back to the partner display name.
          example: Lola Send
          maxLength: 80
        cipTemplateId:
          type: string
          description: >-
            Kentucky CIP template ID to use when provisioning the CIP ticket for
            this link. Overrides the partner-level setting and the global
            default.
          example: raas-v1
          maxLength: 120
        presentation:
          description: >-
            Link-scoped presentation flags (splash / agreement) common to every
            flow. Returned to the widget inside the claim `config` block.
          allOf:
            - $ref: '#/components/schemas/LinkPresentationDto'
        flow:
          type: string
          description: >-
            Flow discriminator. Must be "deferred-payout-origination" for this
            variant.
          enum:
            - deferred-payout-origination
          example: deferred-payout-origination
        config:
          description: >-
            Optional pre-filled user data and full corridor pins (source +
            destination), same shape as send.
          allOf:
            - $ref: '#/components/schemas/DeferredPayoutOriginationLinkConfigDto'
      required:
        - referenceId
        - flow
    CreateLinkResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/CreateLinkDataDto'
      required:
        - success
        - data
    LinkPresentationDto:
      type: object
      properties:
        showSplash:
          type: boolean
          description: >-
            Whether the widget shows the intro splash screen at the start of the
            flow. Disable it when embedding the flow inside another experience
            so the user is dropped straight in (the partner theme still loads).
            Defaults to true.
          default: true
          example: true
        showAgreement:
          type: boolean
          description: >-
            Whether the widget shows the E-Sign / Terms agreement screen before
            the first flow screen. Defaults to false.
          default: false
          example: false
    M2mLinkConfigDto:
      type: object
      properties:
        userData:
          description: >-
            Pre-filled user data. Any fields provided here are pre-populated in
            the widget, allowing the user to skip those steps.
          allOf:
            - $ref: '#/components/schemas/M2mUserDataDto'
        flavor:
          type: string
          description: >-
            Transfer UI flavor for this link. Controls the widget transfer page
            layout. If not provided, the widget uses its deployment default.
          example: C
          enum:
            - A
            - B
            - C
        themeMode:
          type: string
          description: >-
            Theme mode for this link. Controls the widget color scheme. If not
            provided, the widget uses the browser/device preference.
          example: dark
          enum:
            - dark
            - light
        sourceCountry:
          type: string
          description: >-
            Source country (where the funds originate) — ISO 3166-1 alpha-2.
            Pre-selects the corridor origin for this link.
          example: US
        destinationCountry:
          type: string
          description: >-
            Destination country (where the funds are paid out) — ISO 3166-1
            alpha-2. Pre-selects the corridor destination for this link.
          example: MX
        sourceCurrency:
          type: string
          description: Source currency — ISO 4217 (three letters).
          example: USD
        destinationCurrency:
          type: string
          description: Destination currency — ISO 4217 (three letters).
          example: MXN
    SmartLinkConfigDto:
      type: object
      properties:
        userData:
          description: >-
            Pre-filled user data. Any fields provided here are pre-populated in
            the widget, allowing the user to skip those steps.
          allOf:
            - $ref: '#/components/schemas/M2mUserDataDto'
        themeMode:
          type: string
          description: >-
            Theme mode for this link. Controls the widget color scheme. If not
            provided, the widget uses the browser/device preference.
          example: dark
          enum:
            - dark
            - light
    FundRequestLinkConfigDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount of money to request.
          example: 150.5
        sourceCountry:
          type: string
          description: >-
            Source country code (where the funds originate) — ISO 3166-1
            alpha-2.
          example: US
        destinationCountry:
          type: string
          description: >-
            Destination country code (where the funds are paid out) — ISO 3166-1
            alpha-2.
          example: GT
        sourceCurrency:
          type: string
          description: Source currency code — ISO 4217 (three letters).
          example: USD
        destinationCurrency:
          type: string
          description: Destination currency code — ISO 4217 (three letters).
          example: GTQ
        requestData:
          description: End-user profile and payout method embedded in the request.
          allOf:
            - $ref: '#/components/schemas/FundRequestRequestDataDto'
        amountAnchor:
          type: string
          description: >-
            Which leg `amount` is pinned to. Defaults to `send` (source
            currency) for partner-created links. Minted from request/smart flows
            use `receive`.
          enum:
            - send
            - receive
          example: send
      required:
        - amount
        - sourceCountry
        - destinationCountry
        - sourceCurrency
        - destinationCurrency
        - requestData
    CashDepositLinkConfigDto:
      type: object
      properties:
        callbackUrl:
          type: string
          description: >-
            URL the widget redirects to at the end of the flow to return the
            user to the host app.
          example: https://app.example.com/cash-deposit/done
        allowedMerchants:
          description: >-
            Allow-list of merchant IDs where the cash deposit can be made. When
            omitted or empty, all merchants are allowed.
          example:
            - INCOMM
            - OXXO
          type: array
          items:
            type: string
        type:
          type: string
          description: >-
            Whether the cash deposit funds an existing operation
            (operation_payment) or runs standalone (standalone).
          enum:
            - operation_payment
            - standalone
          example: operation_payment
        operationId:
          type: string
          description: >-
            ID of the cash-deposit operation this payment funds. Required when
            `type` is `operation_payment`. The operation must exist and be a
            cash-deposit payment.
          example: op_acme_a1b2c3d4e5f6
        referenceId:
          type: string
          description: >-
            Partner-provided reference ID for the cash-deposit transaction (for
            tracing). Required when `type` is `standalone`.
          example: cd-tx-12345
        amount:
          type: number
          description: >-
            Cash amount the user must deposit, denominated in `currency`.
            Required when `type` is `standalone` (operation_payment pins the
            amount via the funded operation instead).
          example: 100
          minimum: 0
        currency:
          type: string
          description: >-
            ISO 4217 currency of the deposit amount. Currently always "USD".
            Defaults to "USD" when omitted on a `standalone` link.
          default: USD
          example: USD
        senderReferenceId:
          type: string
          description: >-
            External identifier of the sender. Required when `type` is
            `standalone`.
          example: sender-9981
        sender:
          description: Sender profile. Required when `type` is `standalone`.
          allOf:
            - $ref: '#/components/schemas/CashDepositPartyDto'
        recipientReferenceId:
          type: string
          description: >-
            External identifier of the recipient. Required when `type` is
            `standalone`.
          example: recipient-7742
        recipient:
          description: Recipient profile. Required when `type` is `standalone`.
          allOf:
            - $ref: '#/components/schemas/CashDepositPartyDto'
      required:
        - callbackUrl
        - type
    RequestLinkConfigDto:
      type: object
      properties:
        userData:
          description: >-
            Pre-filled user data. Any fields provided here are pre-populated in
            the widget, allowing the user to skip those steps.
          allOf:
            - $ref: '#/components/schemas/M2mUserDataDto'
        themeMode:
          type: string
          description: >-
            Theme mode for this link. Controls the widget color scheme. If not
            provided, the widget uses the browser/device preference.
          example: dark
          enum:
            - dark
            - light
        destinationCountry:
          type: string
          description: >-
            Destination country (where the funds are paid out) — ISO 3166-1
            alpha-2. Pre-selects the corridor destination for this link.
          example: MX
        destinationCurrency:
          type: string
          description: Destination currency — ISO 4217 (three letters).
          example: MXN
    SendLinkConfigDto:
      type: object
      properties:
        userData:
          description: >-
            Pre-filled sender data. Any fields provided here are pre-populated
            in the widget, allowing the user to skip those steps.
          allOf:
            - $ref: '#/components/schemas/M2mUserDataDto'
        themeMode:
          type: string
          description: >-
            Theme mode for this link. Controls the widget color scheme. If not
            provided, the widget uses the browser/device preference.
          example: dark
          enum:
            - dark
            - light
        sourceCountry:
          type: string
          description: >-
            Source country (where the funds originate) — ISO 3166-1 alpha-2.
            Optional: pre-selects the corridor origin. When both source and
            destination are set, the widget starts pinned to that exact
            corridor.
          example: US
        destinationCountry:
          type: string
          description: >-
            Destination country (where the funds are paid out) — ISO 3166-1
            alpha-2. Optional: pre-selects the corridor destination; the sender
            can still change it in the widget.
          example: MX
        sourceCurrency:
          type: string
          description: Source currency — ISO 4217 (three letters).
          example: USD
        destinationCurrency:
          type: string
          description: Destination currency — ISO 4217 (three letters).
          example: MXN
    PayoutClaimLinkConfigDto:
      type: object
      properties:
        originationId:
          type: string
          example: dpr_a1b2c3d4e5f6
          description: >-
            Existing unclaimed deferred remittance id. When set, commitment
            fields are optional (hydrated server-side).
        sendCommitment:
          $ref: '#/components/schemas/PayoutClaimSendCommitmentDto'
        recipientHint:
          $ref: '#/components/schemas/PayoutClaimRecipientHintDto'
        amountAnchor:
          type: string
          enum:
            - send
          default: send
        sourceCountry:
          type: string
          example: US
        destinationCountry:
          type: string
          example: MX
        sourceCurrency:
          type: string
          example: USD
        destinationCurrency:
          type: string
          example: MXN
        senderName:
          type: string
          description: Sender display name for the claim UI.
        senderReferenceId:
          type: string
          example: user-12345
          description: >-
            Sender referenceId in the partner system. Required when
            originationId is omitted or unknown — used to mint the
            DeferredRemittance.
    DeferredPayoutOriginationLinkConfigDto:
      type: object
      properties:
        userData:
          description: >-
            Pre-filled sender data. Any fields provided here are pre-populated
            in the widget, allowing the user to skip those steps.
          allOf:
            - $ref: '#/components/schemas/M2mUserDataDto'
        themeMode:
          type: string
          description: >-
            Theme mode for this link. Controls the widget color scheme. If not
            provided, the widget uses the browser/device preference.
          example: dark
          enum:
            - dark
            - light
        sourceCountry:
          type: string
          description: >-
            Source country (where the funds originate) — ISO 3166-1 alpha-2.
            Optional: pre-selects the corridor origin. When both source and
            destination are set, the widget starts pinned to that exact
            corridor.
          example: US
        destinationCountry:
          type: string
          description: >-
            Destination country (where the funds are paid out) — ISO 3166-1
            alpha-2. Optional: pre-selects the corridor destination; the sender
            can still change it in the widget.
          example: MX
        sourceCurrency:
          type: string
          description: Source currency — ISO 4217 (three letters).
          example: USD
        destinationCurrency:
          type: string
          description: Destination currency — ISO 4217 (three letters).
          example: MXN
    CreateLinkDataDto:
      type: object
      properties:
        linkId:
          type: string
          description: Unique link identifier
          example: link_acme_m2m_a1b2c3d4e5f6
        referenceId:
          type: string
          description: Reference ID of the user in your system
          example: user-12345
        externalId:
          type: string
          description: Partner tracing ID for this link/intent
          example: ORD-2026-001
        status:
          type: string
          description: Current link status
          example: created
          enum:
            - created
        url:
          type: string
          description: Full widget URL to send to the end user
          example: >-
            https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6
        token:
          type: string
          description: Authentication token for the link (include in link delivery to user)
          example: 550e8400-e29b-41d4-a716-446655440000
        expiresAt:
          type: string
          description: Link expiration timestamp (ISO 8601)
          example: '2026-02-11T12:00:00.000Z'
        createdAt:
          type: string
          description: Link creation timestamp (ISO 8601)
          example: '2026-02-10T12:00:00.000Z'
      required:
        - linkId
        - referenceId
        - status
        - url
        - token
        - expiresAt
        - createdAt
    M2mUserDataDto:
      type: object
      properties:
        name:
          description: User full name. firstName and lastName are required.
          allOf:
            - $ref: '#/components/schemas/NameDto'
        idNumber:
          type: string
          description: >-
            Government-issued ID number (e.g., CURP, INE, SSN). Stored securely
            and masked in responses.
          example: GAPA900515HDFRRL09
        idType:
          type: string
          description: Type of ID document provided
          example: CURP
          enum:
            - CURP
            - INE
            - PASSPORT
            - SSN
            - OTHER
        dob:
          type: string
          description: Date of birth in ISO 8601 format (YYYY-MM-DD)
          example: '1990-05-15'
        paymentMethod:
          description: >-
            Payment instrument pre-fill. For send flows (m2m, smart, request)
            this is the recipient payout method (`payoutMethod`). For
            deferred-payout-origination it is the sender funding method
            (`fundingMethod`).
          allOf:
            - $ref: '#/components/schemas/PaymentMethodDto'
        idImage:
          type: string
          description: >-
            ID document image encoded in base64 (data URI or raw base64).
            Supported formats: JPEG, PNG, GIF, WebP. Max size: ~7MB (base64
            encoded). Stored securely and served via temporary signed URLs.
          example: data:image/jpeg;base64,/9j/4AAQSkZJRg...
      required:
        - name
        - paymentMethod
    FundRequestRequestDataDto:
      type: object
      properties:
        userReferenceId:
          type: string
          description: Partner-provided reference ID for the end-user.
          example: user-1234567890
        name:
          description: End-user name.
          allOf:
            - $ref: '#/components/schemas/NameDto'
        address:
          description: End-user address.
          allOf:
            - $ref: '#/components/schemas/FundRequestAddressDto'
        dob:
          type: string
          description: Date of birth — ISO 8601 calendar date.
          example: '1990-05-15T00:00:00.000Z'
        payoutMethod:
          description: >-
            Payout method discriminator: use bank_account, card, or cash with
            the matching nested object.
          allOf:
            - $ref: '#/components/schemas/FundRequestPayoutMethodDto'
      required:
        - userReferenceId
        - name
        - address
        - dob
        - payoutMethod
    CashDepositPartyDto:
      type: object
      properties:
        firstName:
          type: string
          description: First name.
          example: Juan
        secondName:
          type: string
          description: Second / middle name.
          example: Carlos
        lastName:
          type: string
          description: Last name.
          example: Pérez
        dob:
          type: string
          description: Date of birth — ISO 8601 calendar date.
          example: '1990-05-15'
      required:
        - firstName
        - lastName
        - dob
    PayoutClaimSendCommitmentDto:
      type: object
      properties:
        sendAmount:
          type: number
          example: 100
        totalDebit:
          type: number
          example: 103.5
          description: Send + funding fees — hard cap
        sendCurrency:
          type: string
          example: USD
        sourceCountry:
          type: string
          example: US
        destinationCountry:
          type: string
          example: MX
        destinationCurrency:
          type: string
          example: MXN
        fundingMethod:
          type: string
          example: DEBIT_CARD
        fundingPaymentMethodId:
          type: string
      required:
        - sendAmount
        - totalDebit
        - sendCurrency
        - sourceCountry
        - destinationCountry
        - destinationCurrency
        - fundingMethod
    PayoutClaimRecipientHintDto:
      type: object
      properties:
        firstName:
          type: string
          example: Maria
        lastName:
          type: string
          example: Lopez
        fullName:
          type: string
          example: Maria Lopez
      required:
        - firstName
        - lastName
    NameDto:
      type: object
      properties:
        firstName:
          type: string
          description: First name (required)
          example: Juan
        secondName:
          type: string
          description: Second / middle name
          example: Carlos
        lastName:
          type: string
          description: Last name / paternal surname (required)
          example: Pérez
        secondLastName:
          type: string
          description: Second last name / maternal surname
          example: García
      required:
        - firstName
        - lastName
    PaymentMethodDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - bank_account
            - card
            - cash
          description: Shape of the payment instrument payload (bank_account | card | cash)
          example: bank_account
        payoutMethod:
          type: string
          enum:
            - CASH_PICKUP
            - BANK_ACCOUNT
            - PUSH_TO_CARD
            - MOBILE_WALLET
            - HOME_DELIVERY
          description: >-
            Canonical catalog payout method this instrument fulfils (e.g.
            BANK_ACCOUNT, PUSH_TO_CARD, CASH_PICKUP, MOBILE_WALLET,
            HOME_DELIVERY). The payload `type` (shape) is derived from this via
            methodToShape() and must stay consistent with it.
          example: BANK_ACCOUNT
        fundingMethod:
          type: string
          enum:
            - DEBIT_CARD
            - CREDIT_CARD
            - ACH
            - RTP
            - WALLET
            - CASH_DEPOSIT
            - BANK_BALANCE
          description: >-
            Canonical catalog funding method this instrument fulfils (e.g.
            DEBIT_CARD, ACH, CASH_DEPOSIT). Used when pre-filling the sender
            funding step (deferred-payout-origination). The payload `type`
            (shape) must stay consistent via methodToShape().
          example: DEBIT_CARD
        bankAccount:
          description: Bank account details (required when type is bank_account)
          allOf:
            - $ref: '#/components/schemas/BankAccountDto'
        card:
          description: Card details (required when type is card)
          allOf:
            - $ref: '#/components/schemas/CardDto'
        cash:
          description: Cash payment details (required when type is cash)
          allOf:
            - $ref: '#/components/schemas/CashDto'
      required:
        - type
    FundRequestAddressDto:
      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.
          example: Guatemala City
        zipCode:
          type: string
          description: Postal code in the format required by the destination country.
        line1:
          type: string
          description: Primary street line.
          example: 12 Av. Reforma
        line2:
          type: string
          description: Secondary street line.
      required:
        - country
        - stateCode
        - line1
    FundRequestPayoutMethodDto:
      type: object
      properties:
        type:
          type: string
          description: Logical discriminator.
          example: bank_account
          enum:
            - bank_account
            - card
            - cash
            - mobile_wallet
            - home_delivery
        bankAccount:
          description: Bank account payout details (required when type is bank_account).
          allOf:
            - $ref: '#/components/schemas/FundRequestBankAccountDto'
        card:
          description: Card payout details (required when type is card).
          allOf:
            - $ref: '#/components/schemas/FundRequestCardDto'
        cash:
          description: Cash payout details (required when type is cash).
          allOf:
            - $ref: '#/components/schemas/FundRequestCashDto'
        mobileWallet:
          description: Mobile-wallet payout details (required when type is mobile_wallet).
          allOf:
            - $ref: '#/components/schemas/FundRequestMobileWalletDto'
        homeDelivery:
          description: Home-delivery payout details (required when type is home_delivery).
          allOf:
            - $ref: '#/components/schemas/FundRequestHomeDeliveryDto'
      required:
        - type
    BankAccountDto:
      type: object
      properties:
        country:
          type: string
          description: Country code (ISO 3166-1 alpha-2)
          example: MX
        accountNumber:
          type: string
          description: Bank account number or identifier (CLABE, CBU, IBAN, etc.)
          example: '012345678901234567'
        accountType:
          type: string
          description: Account type (e.g., savings, checking)
        bankCode:
          type: string
          description: Bank code or routing number
        bankName:
          type: string
          description: Bank name
      required:
        - country
        - accountNumber
    CardDto:
      type: object
      properties:
        number:
          type: string
          description: >-
            Card number - Partners send raw PAN through VGS proxy, backend
            receives tokenized value (tok_xxx)
          example: tok_sandbox_4fKq8H2xLmNpRtYw
        expiryMonth:
          type: string
          description: Card expiry month (01-12)
          example: '12'
        expiryYear:
          type: string
          description: Card expiry year (YYYY)
          example: '2028'
        cardholderName:
          type: string
          description: Cardholder name as it appears on the card
          example: Juan Pérez
        last4:
          type: string
          description: >-
            Last 4 digits of the card (can be extracted by VGS or sent by
            partner)
          example: '4242'
        brand:
          type: string
          description: Card brand (can be detected by VGS from BIN or sent by partner)
          example: visa
          enum:
            - visa
            - mastercard
            - amex
            - discover
            - diners
            - jcb
            - unionpay
            - other
      required:
        - number
        - expiryMonth
        - expiryYear
    CashDto:
      type: object
      properties:
        payer:
          type: string
          description: >-
            Canonical catalog payer code that fulfils the cash payout (e.g.,
            ELEKTRA, OXXO).
          example: ELEKTRA
        reference:
          type: string
          description: Payment reference number
        country:
          type: string
          description: Country code — ISO 3166-1 alpha-2 (e.g., MX, GT).
          example: MX
        state:
          type: string
          description: Canonical catalog state code for the pickup location.
          example: CMX
        city:
          type: string
          description: Canonical catalog city code for the pickup location.
          example: MEX
      required:
        - payer
    FundRequestBankAccountDto:
      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
          description: Account type (e.g. savings, checking).
        bankCode:
          type: string
          description: Bank code or routing number.
        bankName:
          type: string
          description: Bank name. Must be uppercase.
          example: BANCO INDUSTRIAL
        number:
          type: string
          description: Account number or identifier.
          example: '012345678901234567'
      required:
        - bankName
        - number
    FundRequestCardDto:
      type: object
      properties:
        number:
          type: string
          description: >-
            PAN token or identifier as issued by the payment provider. Required
            when `paymentMethodId` is omitted.
          example: tok_visa_4242
        expiryMonth:
          type: string
          description: Expiration month (01-12).
          example: '12'
        expiryYear:
          type: string
          description: Expiration year (YYYY).
          example: '2028'
        cardholderName:
          type: string
          description: Cardholder name.
          example: Carlos Mejia
        last4:
          type: string
          description: Last 4 digits of the card.
          example: '4242'
        paymentMethodId:
          type: string
          description: >-
            CVS / vault destination payment-method id (PUSH_TO_CARD). When set,
            create-operation on the fund-request link resolves payout from this
            id without requiring the payer to own the instrument.
          example: stub_pm_abc123
        brand:
          type: string
          description: Card brand.
          example: visa
        country:
          type: string
          description: ISO 3166-1 alpha-2 country associated with the card.
          example: GT
        stateCode:
          type: string
          description: 'Subdivision: preferably ISO 3166-2.'
          example: GT-01
    FundRequestCashDto:
      type: object
      properties:
        payer:
          type: string
          description: Canonical catalog payer code that fulfils the cash payout.
          example: ELEKTRA
        reference:
          type: string
          description: Payer-specific pickup or payout reference.
          example: REF-998877
        country:
          type: string
          description: Country code — ISO 3166-1 alpha-2.
          example: GT
        state:
          type: string
          description: Canonical catalog state code for the pickup location.
          example: GT-01
        city:
          type: string
          description: Canonical catalog city code for the pickup location.
          example: GUA
      required:
        - payer
        - country
    FundRequestMobileWalletDto:
      type: object
      properties:
        carrier:
          type: string
          description: >-
            Canonical catalog carrier/provider code that fulfils the wallet
            payout.
          example: NEQUI
        phone:
          type: string
          description: Destination mobile-wallet phone number (MSISDN).
          example: '+573001234567'
        country:
          type: string
          description: Country code — ISO 3166-1 alpha-2.
          example: CO
        state:
          type: string
          description: Canonical catalog state code for the payout location.
          example: CO-DC
        city:
          type: string
          description: Canonical catalog city code for the payout location.
          example: BOG
      required:
        - carrier
        - phone
        - country
    FundRequestHomeDeliveryDto:
      type: object
      properties:
        address:
          type: string
          description: Delivery street address.
          example: 12 Av. Reforma
        country:
          type: string
          description: Country code — ISO 3166-1 alpha-2.
          example: GT
        stateCode:
          type: string
          description: 'Subdivision: preferably ISO 3166-2.'
          example: GT-01
        city:
          type: string
          description: City or locality.
          example: Guatemala City
        reference:
          type: string
          description: Delivery reference or instructions.
          example: Ring twice; ask for Maria
      required:
        - address
        - country
        - stateCode
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your partner API key. Use `raas_sandbox_*` keys for the sandbox
        environment and `raas_live_*` keys for production.

````