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

> ## Agent Instructions
> Soroswap Aggregator API: base URL https://api.soroswap.finance, pick the network with ?network=mainnet or ?network=testnet (omitted means mainnet).
> Auth: Authorization: Bearer sk_... on every call. Get a key at https://console.soroswap.finance/register. A missing or invalid key returns 401 with code and registerUrl (POST /send returns 403 instead); an expired JWT or a missing role returns 403. Free plan 1 request/s; see https://docs.soroswap.finance/api/plans.md.
> Flow: POST /quote (assetIn, assetOut as C... contract addresses, amount as an integer string in the smallest unit, tradeType, protocols) -> POST /quote/build with the unchanged quote and from -> the user signs the XDR -> POST /send. Build right after quoting: a Soroban XDR is valid for 180 seconds. Submit it as is, never re-simulate it.
> Partner id: every account has one (9 hex chars, permanent). Read partnerId from GET /partner, or in the console at https://console.soroswap.finance under Fees & payouts. The partner fee itself is switched on by Soroswap; see https://docs.soroswap.finance/api/fees.md.
> AI tools: docs MCP at https://docs.soroswap.finance/mcp (claude mcp add --transport http soroswap-docs https://docs.soroswap.finance/mcp), skill with npx skills add https://docs.soroswap.finance. Other clients: https://docs.soroswap.finance/api/build-with-ai.md.
> Units and Stellar pitfalls: https://docs.soroswap.finance/api/stellar-gotchas.md. Errors and retries: https://docs.soroswap.finance/api/errors.md.

# Build the claim of a USDC transfer into Stellar

> USDC into Stellar only. Builds the Stellar transaction that mints the bridged USDC to the recipient fixed at the burn. from is any G... account and only pays the fee. 425 Not attested yet (retry), 409 Already claimed (done).



## OpenAPI

````yaml POST /bridge/claim/build
openapi: 3.0.0
info:
  title: Soroswap API
  description: >+

    # 🚀 Soroswap API


    **Soroswap.Finance** is both an **Automated Market Maker (AMM)** and a **DEX
    Aggregator** on the Stellar blockchain.


    It aggregates liquidity from Soroban DEXes (**Soroswap, Phoenix, Aqua and
    Comet(TBA)**), and the **Stellar Classic DEX** — giving you **the best trade
    routes, liquidity tools, and real-time market data**.


    ---


    ## 📋 What You Can Do


    - 🔄 **Quote** – Get the best trade route between two assets with
    split-routing logic across AMMs and SDEX.  

    - 🧱 **Build** – Generate and simulate unsigned transactions (XDR) for swaps
    or liquidity actions.  

    - 🚀 **Send** – Submit signed transactions via Soroban RPC or Horizon.

    - ⚡ **Gasless Trustlines** – Use `gaslessTrustline` in `/quote` to open
    trustlines for users without requiring them to hold XLM or deal with
    trustline setup themselves.

    - 💰 **Platform Fees** – Add your own fee to user swaps with
    `platformFee`.  

    - 💧 **Liquidity** – Create LPs, add liquidity, remove liquidity.  

    - 💲 **Price** – Get real-time token prices.  

    - 🧠 **Pools** – View detailed pool information for Soroswap AMM.


    📮 **[Downnload the Postman Collection
    here](https://drive.google.com/drive/folders/1G-LQYE2EojPWP1CSuuS_tDb9vjYbFR6E?usp=drive_link)**


    ---


    ## 🔑 Authentication


    Send `Authorization: Bearer <credential>`: an API key (`sk_...`) or the JWT
    access token from `POST /login`. Each operation's `security` says whether it
    needs one; `security: []` means it is public.


    - **401**: no credential, or an invalid API key. The body says where to get
    a key, and `WWW-Authenticate` is set.

    - **403**: an expired or invalid JWT, or a valid credential without the
    required role.

    - `POST /send` answers **403** for any missing or invalid credential.

  version: '1.0'
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/soroswap-full.svg
    backgroundColor: '#0e0e0e'
    altText: Soroswap Logo
    href: https://soroswap.finance
servers: []
security: []
tags: []
paths:
  /bridge/claim/build:
    post:
      tags:
        - Bridge
      summary: Build the claim of a USDC transfer into Stellar
      description: >-

        USDC sent into Stellar is not minted by Circle: someone submits
        CctpForwarder

        `mint_and_forward(message, attestation)` on Stellar, which mints and
        pays the recipient named in the

        transfer in one invocation. Anyone can submit it; `from` (a G… account)
        only pays the XLM fee.

        Refuses a burn that isn't into Stellar through the CctpForwarder (400),
        answers 425 while Circle

        hasn't attested the burn (poll /bridge/status until `claimable`) and 409
        once it was claimed.

        Returns one ready step of kind `claim`.


        A source transaction can hold several CCTP messages. Without
        `messageIndex` the one message that

        is a claim into Stellar is used; when several are, the route answers 400
        `Message Index Required`

        with their indexes in `extra.claimableIndexes`. `messageIndex` (Circle
        Iris's order, ascending

        log index) picks one; past the last message is 400 `Message Index Out Of
        Range`.
      operationId: BridgeController_claimBuild
      parameters:
        - name: network
          required: false
          in: query
          description: Mainnet only; testnet answers 400
          schema:
            enum:
              - testnet
              - mainnet
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BridgeClaimBuildDto'
            examples:
              fromBase:
                value:
                  sourceChain: base
                  txHash: >-
                    0x5f0a6b2e8d1c4f3a9b7e6d5c4b3a29181716151413121110f0e0d0c0b0a09080
                  from: GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ
              secondMessage:
                summary: >-
                  A transaction with several claims into Stellar: claim message
                  1
                value:
                  sourceChain: base
                  txHash: >-
                    0x5f0a6b2e8d1c4f3a9b7e6d5c4b3a29181716151413121110f0e0d0c0b0a09080
                  from: GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ
                  messageIndex: 1
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BridgeClaimBuildResponse'
        '400':
          description: >-
            Not a burn into Stellar through the CctpForwarder, several claims
            and no messageIndex, a messageIndex out of range, bad input, testnet
        '401':
          description: >-
            No credential, an invalid API key, or a valid JWT of a disabled
            account. Except for the disabled account, the answer carries
            `WWW-Authenticate` and a `registerUrl`.
        '403':
          description: >-
            An expired or invalid JWT, or a valid credential without the
            required role.
        '409':
          description: >-
            Already claimed (CctpForwarder error 6908, read for the chosen
            message): final, the USDC was delivered
        '425':
          description: >-
            Too Early: Circle has not attested the burn yet; retry once
            /bridge/status says claimable
        '503':
          description: Iris or the Stellar RPC could not answer
      security:
        - bearer: []
components:
  schemas:
    BridgeClaimBuildDto:
      type: object
      properties:
        sourceChain:
          type: string
          example: base
          description: Chain the USDC was burned on
        txHash:
          type: string
          description: Source burn transaction hash, or Solana signature
        from:
          type: string
          description: >-
            Stellar G… account that signs and pays the network fee. Anyone can
            claim: the USDC always goes to the recipient named in the transfer.
        messageIndex:
          type: number
          minimum: 0
          description: >-
            Which CCTP message of the source transaction to claim, by its
            position in Circle Iris's list (ascending log index). Only needed
            when the transaction holds more than one claim into Stellar; without
            it the one message that is a claim is used.
      required:
        - sourceChain
        - txHash
        - from
    BridgeClaimBuildResponse:
      type: object
      properties:
        steps:
          description: 'One ready step, kind ''claim'': CctpForwarder mint_and_forward'
          type: array
          items:
            $ref: '#/components/schemas/BridgeStep'
      required:
        - steps
    BridgeStep:
      type: object
      properties:
        id:
          type: string
          example: bridge
        kind:
          type: string
          enum:
            - approval
            - reset_approval
            - bridge
            - claim
        chain:
          type: string
          example: base
          description: Chain id the transaction runs on
        status:
          type: string
          enum:
            - ready
            - rebuild_after_previous
        description:
          type: string
        tx:
          oneOf:
            - $ref: '#/components/schemas/StellarXdrTx'
            - $ref: '#/components/schemas/EvmTx'
            - $ref: '#/components/schemas/SolanaV0Tx'
      required:
        - id
        - kind
        - chain
        - status
        - description
    StellarXdrTx:
      type: object
      properties:
        format:
          type: string
          enum:
            - stellar_xdr
        xdr:
          type: string
          description: Base64 transaction envelope, simulated and assembled, unsigned
      required:
        - format
        - xdr
    EvmTx:
      type: object
      properties:
        format:
          type: string
          enum:
            - evm
        chainId:
          type: number
          example: 8453
        to:
          type: string
          example: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d'
        data:
          type: string
          description: 0x-prefixed calldata
        value:
          type: string
          example: '0'
          description: Wei, decimal string
      required:
        - format
        - chainId
        - to
        - data
        - value
    SolanaV0Tx:
      type: object
      properties:
        format:
          type: string
          enum:
            - solana_v0
        serialized:
          type: string
          description: Base64 serialized v0 transaction, unsigned
        additionalSigners:
          type: array
          items:
            $ref: '#/components/schemas/SolanaAdditionalSigner'
        recentBlockhash:
          type: string
        lastValidBlockHeight:
          type: string
          description: u64 as a decimal string
      required:
        - format
        - serialized
        - additionalSigners
        - recentBlockhash
        - lastValidBlockHeight
    SolanaAdditionalSigner:
      type: object
      properties:
        role:
          type: string
          enum:
            - messageSentEventData
        publicKey:
          type: string
          description: Base58 public key
        secretKey:
          type: string
          description: >-
            Base58 secret key of a throwaway keypair. It only signs the creation
            of the CCTP event account and controls nothing afterwards.
      required:
        - role
        - publicKey
        - secretKey
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.