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

# Register — Inbound Receiver

> Register a deposit for automatic bridging (PulseChain routes only)

Confirms a deposit at the Hypermid bridge contract. Only needed for some PulseChain swap routes — the quote response tells you when.

<Note>
  **When is this needed?** Only when the quote response includes an `afterStep1` field. Most swaps don't need this — you just sign a transaction and you're done.
</Note>

## When to Use This

1. You called [`GET /v1/quote`](/api-reference/quote) with `toChain=369` (PulseChain) and a non-stablecoin source token
2. The quote response included `afterStep1` with signing instructions
3. You signed and broadcast the swap transaction (Step 1)
4. Now you need to confirm the deposit so Hypermid can bridge it automatically

## Parameters

<ParamField body="txHash" type="string" required>
  The confirmed transaction hash from Step 1.
</ParamField>

<ParamField body="fromAddress" type="string" required>
  The sender wallet address. Must match `tx.from` of the transaction.
</ParamField>

<ParamField body="toAddress" type="string">
  Recipient wallet address on PulseChain. Defaults to `fromAddress`.
</ParamField>

<ParamField body="outputToken" type="string" required>
  Desired output token on PulseChain (e.g., `0xA1077a294dDE1B09bB078844df40758a5D0f9a27` for PLS).
</ParamField>

<ParamField body="destinationDomain" type="number">
  Destination chain domain. Default: `369` (PulseChain).
</ParamField>

<ParamField body="signature" type="string" required>
  Wallet signature authorizing the routing. Generated by signing the data from `afterStep1.eip712` in the quote response.
</ParamField>

## Full Example

```typescript theme={"system"}
// 1. Get a quote
const quote = await client.getQuote({
  fromChain: 8453, toChain: 369,
  fromToken: "0x0000000000000000000000000000000000000000", // ETH
  toToken: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27",  // PLS
  fromAmount: "1000000000000000",
  fromAddress: "0xYourWallet",
});

// 2. Sign the swap transaction
const txHash = await wallet.sendTransaction(quote.data.steps[0].transactionRequest);
await publicClient.waitForTransactionReceipt({ hash: txHash });

// 3. If afterStep1 exists, confirm the deposit
if (quote.data.afterStep1) {
  // Sign the authorization (gasless — no transaction cost)
  const signature = await wallet.signTypedData({
    ...quote.data.afterStep1.eip712,
    message: { ...quote.data.afterStep1.eip712.message, txHash },
  });

  // Confirm with the API
  await fetch("https://api.hypermid.io/v1/inbound-receiver/register", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      ...quote.data.afterStep1.body,
      txHash,
      signature,
    }),
  });
}

// Done — Hypermid handles the rest (~5 min)
```

<ResponseExample>
  ```json 200 Success theme={"system"}
  {
    "data": {
      "id": 42,
      "usdcAmount": "4985000",
      "status": "USDC_ARRIVED",
      "message": "Deposit verified. Bridge will execute automatically within ~5 minutes."
    }
  }
  ```

  ```json 400 Missing Signature theme={"system"}
  {
    "error": {
      "code": "SIGNATURE_REQUIRED",
      "message": "Wallet signature required. Sign the deposit parameters using the data from afterStep1.eip712 in the quote response."
    }
  }
  ```

  ```json 403 Invalid Signature theme={"system"}
  {
    "error": {
      "code": "INVALID_SIGNATURE",
      "message": "Signature verification failed. Must be signed by the transaction sender."
    }
  }
  ```
</ResponseExample>

## Refunds & Fallback

If the bridge lands on PulseChain but the DEX swap fails after 3 retries, the backend automatically sends the bridged USDCh to the user's wallet — the user never loses funds. If the user signed Step 1 but abandoned Step 2, they can resume by calling this endpoint later with the original tx hash.

See the [Safety & Fallback guide](/guides/safety-fallback) for the full state machine, every failure scenario, and the recovery script for abandoned flows.


## OpenAPI

````yaml POST /v1/inbound-receiver/register
openapi: 3.0.3
info:
  title: Hypermid Partner API
  version: 1.0.0
  description: >-
    Cross-chain swap aggregator API. Supports 30+ EVM chains, Solana, Bitcoin,
    Sui, and Near Intents chains (NEAR, TON, Tron, XRP, etc.).


    ## Authentication

    Pass your API key via the `X-API-Key` header. Public endpoints work without
    a key (anonymous tier). Partner endpoints (`/v1/partner/*`) require a valid
    key.


    ## Rate Limits

    - **Anonymous**: 30 requests/minute (per IP)

    - **Partner (authenticated)**: 100 requests/minute (per API key)


    These limits are designed for human-driven widget usage and mirror our
    upstream aggregator (LiFi) limits to prevent any single user from exhausting
    shared quota.


    Rate limit info is returned in `meta.rateLimit` on every response.


    ## Response Envelope

    All responses follow the shape:

    ```json

    { "data": <T | null>, "error": <{ code, message, details? } | null>, "meta":
    { "requestId", "timestamp", "rateLimit?" } }

    ```
  contact:
    name: Hypermid
    url: https://hypermid.io
servers:
  - url: https://api.hypermid.io
    description: Production
security:
  - ApiKeyAuth: []
  - {}
tags:
  - name: Swap
    description: Cross-chain swap quoting, routing, status, and reference data
  - name: Execute
    description: Transaction execution and deposit management for Near Intents swaps
  - name: On-Ramp
    description: Fiat-to-crypto on-ramp via RampNow
  - name: Partner
    description: Partner account, analytics, and webhook management (requires X-API-Key)
  - name: Tracking
    description: Swap event tracking for partner attribution
  - name: System
    description: Health check and API metadata
paths:
  /v1/inbound-receiver/register:
    post:
      tags:
        - Swap
      summary: Register a deposit for automatic bridging
      description: >-
        Confirms a confirmed USDC deposit at the InboundReceiver contract so the
        backend can bridge + swap to a PulseChain token automatically.


        Only required for **multi-step** SuperSwap routes (source token is not
        USDC). The quote response signals this via `afterStep1` — if present,
        the frontend must:


        1. Send `steps[0].transactionRequest` and wait for the receipt.

        2. Sign the `afterStep1.eip712` typed data with the confirmed tx hash
        substituted into `message.txHash`.

        3. POST to this endpoint with `{ ...afterStep1.body, txHash, signature
        }`.


        The backend verifies (a) the tx receipt shows a USDC Transfer to the
        InboundReceiver, (b) the EIP-712 signature proves the user authorised
        this deposit's destination. Single-step direct SuperSwap (USDC input)
        does NOT use this endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - txHash
                - fromAddress
                - outputToken
                - signature
              properties:
                txHash:
                  type: string
                  description: The confirmed Step 1 transaction hash (0x-prefixed).
                  example: 0xabc123...
                fromAddress:
                  type: string
                  description: Sender wallet address — must match tx.from on-chain.
                  example: '0x0101e82F16792A3368Ca5c62c263F56a99C46c1a'
                toAddress:
                  type: string
                  description: Recipient on PulseChain. Defaults to fromAddress.
                outputToken:
                  type: string
                  description: >-
                    Desired output token address on PulseChain (e.g.
                    0xA1077a29... for WPLS).
                destinationDomain:
                  type: number
                  description: Hyperlane destination domain (369 for PulseChain).
                  example: 369
                signature:
                  type: string
                  description: >-
                    EIP-712 signature over RegisterDeposit(txHash, toAddress,
                    outputToken, destinationDomain) using domain { name:
                    "HypermidInboundReceiver", version: "1", chainId: <source>
                    }. Required — unsigned registrations are rejected with 400
                    SIGNATURE_REQUIRED.
      responses:
        '200':
          description: Deposit registered; backend will bridge + swap automatically
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registered:
                        type: boolean
                      recordId:
                        type: string
                      usdcAmount:
                        type: string
                        description: >-
                          Amount of USDC extracted from the tx Transfer log
                          (base units)
                      status:
                        type: string
                        example: USDC_ARRIVED
        '400':
          description: >-
            Invalid parameters. Codes: INVALID_PARAMS (missing fields),
            SIGNATURE_REQUIRED (no signature), INVALID_SIGNATURE (signature does
            not recover to tx sender), UPSTREAM_ERROR (receipt lookup failed).
          content:
            application/json:
              schema:
                $ref: 80383027-1332-402b-8790-3a89bb1d70a1
        '503':
          description: InboundReceiver contract not configured on this deployment.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Partner API key. Optional for public endpoints, required for
        /v1/partner/*.

````