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

# Generate metadata for Crosschain Transfer application

> Creates metadata configuration for transferring native tokens across different blockchain networks. Converts native currency from source chain to native currency on destination chain (e.g., AVAX -> ETH, AVAX -> MATIC).



## OpenAPI

````yaml /api-reference/openapi.json post /action/builders/crosschain-transfer
openapi: 3.0.0
info:
  title: Relayer
  description: >-
    Relayer API — Kit-based crypto infrastructure for OTC exchange, wallet
    signing, payouts, and widget actions.
  version: '1.0'
  contact: {}
servers:
  - url: https://testnet.relayer.fi/v1
    description: Sandbox (testnet wallets, no real fiat)
  - url: https://api.relayer.fi/v1
    description: Production (mainnet wallets, regulated fiat rails)
security:
  - api-key: []
tags:
  - name: 'Action: Builders'
    description: Transaction metadata builders
  - name: 'Action: Directory'
    description: Widget directory
  - name: 'Action: Execute'
  - name: 'Action: Tokens'
    description: Token lists per chain/protocol
  - name: Addresses
  - name: Agents
  - name: App
    description: Application endpoints
  - name: 'Payout: Accounts'
    description: Payment execution
  - name: 'Payout: Off-ramp'
  - name: 'Payout: On-ramp'
  - name: 'Payout: Orders'
  - name: 'Payout: Recipients'
    description: Beneficiary management
  - name: Signing - Passkeys
  - name: Signing - Recovery
  - name: Signing Approvals
    description: Transaction signing approvals
  - name: Signing Policies
    description: Signing policy management
  - name: Transactions
    description: Transaction signing and broadcasting
  - name: Wallets
    description: Wallet and address management
paths:
  /action/builders/crosschain-transfer:
    post:
      tags:
        - 'Action: Builders'
      summary: Generate metadata for Crosschain Transfer application
      description: >-
        Creates metadata configuration for transferring native tokens across
        different blockchain networks. Converts native currency from source
        chain to native currency on destination chain (e.g., AVAX -> ETH, AVAX
        -> MATIC).
      operationId: WidgetMetadataController_generateCrosschainTransferMetadata
      parameters: []
      requestBody:
        required: true
        description: Parameters for generating crosschain native token transfer metadata
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossChainAppDto'
            examples:
              Transfer AVAX to Ethereum (receive ETH):
                value:
                  title: Transfer AVAX to ETH
                  description: Transfer AVAX from Avalanche and receive ETH on Ethereum
                  icon: https://example.com/transfer-icon.png
                  url: https://example.com/transfer
                  sourceChainId: 43114
                  destinationChainId: 1
                  address: '0xb00D916688FEE4aB6646994104E1441446947fc9'
                description: >-
                  Send AVAX from Avalanche (43114) and receive ETH on Ethereum
                  (1)
              Transfer AVAX to Polygon (receive MATIC):
                value:
                  title: Transfer AVAX to MATIC
                  description: Transfer AVAX from Avalanche and receive MATIC on Polygon
                  icon: https://example.com/transfer-icon.png
                  url: https://example.com/transfer-avax
                  sourceChainId: 43114
                  destinationChainId: 137
                  address: '0xb00D916688FEE4aB6646994104E1441446947fc9'
                description: >-
                  Send AVAX from Avalanche (43114) and receive MATIC on Polygon
                  (137)
      responses:
        '200':
          description: Crosschain transfer metadata generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  metadata:
                    type: object
                    description: Generated metadata for crosschain transfer
        '400':
          description: >-
            Bad Request - Invalid parameters provided (e.g., invalid chain IDs,
            missing required fields)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '403':
          description: >-
            Forbidden - Insufficient permissions. Requires INTERNAL or
            INTEGRATOR scope (ADMIN scope also allowed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '500':
          description: Internal Server Error - Failed to generate metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
      security:
        - api-key: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            https://api.relayer.fi/v1/action/builders/crosschain-transfer \
              -H "Authorization: ApiKey $RELAYER_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "fromChain":  "base",
                "toChain":    "arbitrum",
                "token":      "USDC",
                "to":         "0xRecipient...",
                "amount":     "50"
              }'
        - lang: TypeScript
          label: Node.js
          source: >-
            const response = await
            fetch("https://api.relayer.fi/v1/action/builders/crosschain-transfer",
            {
              method: "POST",
              headers: {
                Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                fromChain: "base",
                toChain: "arbitrum",
                token: "USDC",
                to: recipientAddress,
                amount: "50",
              }),
            });
components:
  schemas:
    CrossChainAppDto:
      type: object
      properties:
        title:
          type: string
          description: The title of the Application
        description:
          type: string
          description: The description of the Application
        icon:
          type: string
          description: The icon URL of the Application
        url:
          type: string
          description: The URL of the Application
        sourceChainId:
          type: number
          description: The source chain ID for the cross-chain transfer
        destinationChainId:
          type: number
          description: The destination chain ID for the cross-chain transfer
        address:
          type: string
          description: The recipient address for the cross-chain transfer
      required:
        - title
        - description
        - url
        - sourceChainId
        - destinationChainId
        - address
    ApiResponseDto:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
        statusCode:
          type: number
        timestamp:
          type: string
        path:
          type: string
        traceId:
          type: string
      required:
        - success
        - message
        - statusCode
        - timestamp
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use this format: `ApiKey <your_api_key>`'

````