> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate collateral funding

> Triggers a collateral deposit to a smart contract, exactly as if a real on-chain transfer had occurred. Use this to test your collateral webhook handling and balance updates without executing actual blockchain transactions.

**Sandbox only.** This endpoint returns `404 Not Found` in production environments.



## OpenAPI

````yaml /openapi.json post /simulate/collateral/fund
openapi: 3.0.3
info:
  title: Issuing API
  description: This is the specification for Rain's Issuing API.
  termsOfService: https://www.rain.xyz/legal/authorized-user-terms
  contact:
    email: support@rain.xyz
  version: 1.3.0
servers:
  - url: https://api-dev.rain.xyz/v1
    description: Sandbox server
  - url: https://api.rain.xyz/v1
    description: Production server
security: []
tags:
  - name: paymentRoutes
    description: >-
      **Endpoint Migration:** The `/v1/automations` endpoints have been renamed
      to `/v1/payment-routes`. The old `/v1/automations` paths remain available
      as deprecated aliases during migration. Update your integrations to use
      `/v1/payment-routes` as the deprecated endpoints will be removed in a
      future release.
  - name: simulate
    description: >-
      Transaction simulation endpoints for testing integration flows in
      non-production environments. These endpoints let you trigger transaction
      events programmatically to automate integration tests and verify webhook
      handling without depending on external systems or staging real deposits.
      **Sandbox only** — all simulation endpoints return `404 Not Found` in
      production.
  - name: raindrops
    description: >-
      Rewards and points management endpoints. Custom API keys need
      `raindrops:read`/`raindrops:write` for general rewards endpoints and
      `raindrops-travel:read`/`raindrops-travel:write` for travel redemption
      endpoints.
    x-group: rewards
paths:
  /simulate/collateral/fund:
    post:
      tags:
        - simulate
      summary: Simulate collateral funding
      description: >-
        Triggers a collateral deposit to a smart contract, exactly as if a real
        on-chain transfer had occurred. Use this to test your collateral webhook
        handling and balance updates without executing actual blockchain
        transactions.


        **Sandbox only.** This endpoint returns `404 Not Found` in production
        environments.
      operationId: simulateCollateralFund
      requestBody:
        description: Collateral funding simulation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateCollateralFundRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateCollateralFundResponse'
        '400':
          description: >-
            Invalid body — missing required fields, unsupported currency, or
            negative amount
        '404':
          description: >-
            Endpoint not available in production, feature not enabled for your
            tenant, or the contract does not exist or belong to your tenant
        '422':
          description: >-
            The contract's chain is not supported, or rUSD is not available on
            the contract's chain
        '500':
          description: Unhandled error during simulation
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SimulateCollateralFundRequest:
      type: object
      required:
        - contractId
        - currency
        - amount
      properties:
        contractId:
          type: string
          format: uuid
          description: >-
            The collateral contract ID to fund. Must belong to your tenant or be
            an operator-owned contract for your tenant.
        currency:
          type: string
          enum:
            - rusd
          description: The currency to simulate. Currently only rusd is supported.
        amount:
          type: integer
          minimum: 0
          description: >-
            The amount in cents (USD minor units). For example, 10000 represents
            $100.00.
    SimulateCollateralFundResponse:
      type: object
      required:
        - transactionId
      properties:
        transactionId:
          type: string
          format: uuid
          description: A correlation ID for the simulation request.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Api-Key
      in: header

````