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

# Record Cross-chain Deposit

> Record a completed cross-chain (CCTP) deposit so it shows in the wallet history with its source chain

```bash cURL theme={null}
curl -X POST "https://api.chipipay.com/v1/transactions/record-cross-chain-deposit" \
  -H "Authorization: Bearer sk_prod_xxxx" \
  -H "x-api-key: pk_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionHash": "0x02ab...",
    "walletAddress": "0x03329497...",
    "token": "USDC",
    "amount": "25.500000",
    "chain": "STARKNET",
    "sourceChain": "Base",
    "sourceTxHash": "0x7f3a...",
    "sourceDomain": "6",
    "finality": "standard",
    "feeBps": 0
  }'
```

```json 200 Response theme={null}
{
  "id": "transaction-0x02ab...",
  "transactionHash": "0x02ab...",
  "subType": "cross_chain_deposit",
  "token": "USDC",
  "amount": "25.500000",
  "status": "SUCCESS"
}
```

Best-effort bookkeeping: the USDC is already in the wallet when you call this. A failure here never means the deposit failed.


## OpenAPI

````yaml POST /transactions/record-cross-chain-deposit
openapi: 3.1.0
info:
  title: Chipi Pay API
  description: >-
    REST API for creating self-custodial wallets, executing gasless
    transactions, and purchasing services on Starknet.
  version: 14.0.0
  license:
    name: MIT
servers:
  - url: https://api.chipipay.com/v1
security:
  - bearerAuth: []
    apiKeyAuth: []
tags:
  - name: Wallets
    description: Create and manage self-custodial Starknet wallets
  - name: Transactions
    description: Record and query blockchain transactions
  - name: SKUs
    description: Browse available services for purchase
  - name: SKU Purchases
    description: Purchase services using blockchain payments
  - name: Exchanges
    description: Currency conversion rates
  - name: Cross-chain
    description: >-
      USDC in and out of a Chipi wallet through Circle's CCTP V2 (Base and other
      EVM chains, Solana)
paths:
  /transactions/record-cross-chain-deposit:
    post:
      tags:
        - Cross-chain
      summary: Record Cross-chain Deposit
      description: >-
        Record a completed cross-chain (CCTP) deposit so it appears in the
        wallet's history with its source chain. The funds arrive on Starknet as
        a mint from the zero address, which the on-chain sync cannot attribute.
        Idempotent on the mint transaction hash.
      operationId: recordCrossChainDeposit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordCrossChainDepositBody'
      responses:
        '200':
          description: Deposit recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Wallet not found for this API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    RecordCrossChainDepositBody:
      type: object
      properties:
        transactionHash:
          type: string
          description: >-
            The Starknet receive_message (mint) transaction hash. Idempotency
            key.
        walletAddress:
          type: string
          description: The recipient Chipi wallet
        token:
          $ref: '#/components/schemas/ChainToken'
        amount:
          type: string
          description: Human USDC amount with a decimal point, e.g. "25.500000"
        chain:
          type: string
          enum:
            - STARKNET
          description: Always STARKNET for a deposit
        sourceChain:
          type: string
          description: Source chain label for display, e.g. "Base"
        sourceTxHash:
          type: string
          description: The source-chain burn transaction hash
        senderAddress:
          type: string
          description: The external wallet that sent the funds
        sourceDomain:
          type: string
          description: Circle CCTP domain of the source chain
        finality:
          $ref: '#/components/schemas/CctpFinality'
        feeBps:
          type: number
          description: >-
            Fee Circle took on the source chain, in basis points (0 for
            standard)
      required:
        - transactionHash
        - walletAddress
        - token
        - amount
        - chain
        - sourceChain
    Transaction:
      type: object
      properties:
        id:
          type: string
          description: Unique transaction identifier
        type:
          type: string
          description: Transaction type
        subType:
          type: string
          description: Transaction sub-type
        chain:
          $ref: '#/components/schemas/Chain'
        transactionHash:
          type: string
          description: On-chain transaction hash
        senderAddress:
          type: string
          description: The sender's wallet address
        destinationAddress:
          type: string
          description: The recipient's wallet address
        contractAddress:
          type: string
          description: The contract that was called
        contractName:
          type: string
        functionName:
          type: string
          description: The contract function that was called
        functionSelector:
          type: string
        token:
          $ref: '#/components/schemas/ChainToken'
        tokenAddress:
          type: string
          description: The token's contract address
        amount:
          type: string
          description: Transfer amount (raw, divide by 10^decimals)
        skuId:
          type: string
          description: SKU ID if this is a service purchase
        skuReference:
          type: string
          description: Reference provided for the SKU purchase
        skuPurchaseAmount:
          type: number
          description: Purchase amount in local currency
        skuPurchaseCurrency:
          $ref: '#/components/schemas/Currency'
        skuFileNumber:
          type: string
          description: File number from the service provider
        status:
          $ref: '#/components/schemas/TxStatus'
        createdAt:
          type: string
          format: date-time
        confirmedAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        apiPublicKey:
          type: string
          description: The API key that created this transaction
        chipiWalletId:
          type: string
          description: Internal wallet ID of the sender
        destinationChipiWalletId:
          type: string
          description: Internal wallet ID of the recipient (if also a Chipi wallet)
      required:
        - id
        - chain
        - transactionHash
        - senderAddress
        - destinationAddress
        - status
        - createdAt
        - updatedAt
        - apiPublicKey
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Human-readable error message
      required:
        - error
        - message
    ChainToken:
      type: string
      enum:
        - USDC
        - USDC_E
        - USDT
        - DAI
        - ETH
        - STRK
        - SLINK
        - ALF
        - BROTHER
        - ARB
        - DOC
        - MXNB
        - WLD
        - WBTC
        - OTHER
      description: Token identifier
    CctpFinality:
      type: string
      enum:
        - fast
        - standard
      description: >-
        fast: Circle attests after a few confirmations, for a fee taken from the
        amount. standard: free, attested at the source chain's hard finality.
    Chain:
      type: string
      enum:
        - STARKNET
        - BASE
        - ARBITRUM
        - OPTIMISM
        - ROOTSTOCK
        - SCROLL
        - WORLDCHAIN
      description: Blockchain network identifier
    Currency:
      type: string
      enum:
        - MXN
        - USD
      description: Fiat currency code
    TxStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - SUCCESS
        - FAILED
        - CANCELLED
      description: Transaction lifecycle status
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized — invalid or missing API key / bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded (100 requests/minute per API key)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token — use your secret key (sk_prod_xxx) for server-side calls,
        or the user's JWT for client-side calls
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Chipi public API key (pk_xxx)

````

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