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

# Refresh a cash-in deposit code

> Regenerates the deposit code for an existing cash-in whose code has expired
or is close to expiring, returning a fresh code and expiry. Pass an
Idempotency-Key header to safely retry.



## OpenAPI

````yaml /api-reference/openapi.yaml post /cash-ins/{cashInId}/refresh
openapi: 3.0.3
info:
  title: Polygon OMS Public API
  version: v26.05.28-0001
  description: >-
    Unified API for moving money between crypto and fiat. Three ways to move
    money: Transactions (instant, wallet or card funded, including Cash-In for
    in-person cash deposits), Deposit Addresses (reusable crypto deposit
    configurations), and Virtual Accounts (dedicated bank accounts that
    auto-convert fiat to crypto). Standard transactions follow a two-step flow:
    create a Quote (pricing), then create a Transaction (execution). Cash-in
    codes generate a one-time deposit code for in-person cash deposits at retail
    locations.
  contact:
    name: Polygon OMS
    url: https://oms.polygon.technology
servers:
  - url: https://sandbox-api.polygon.technology/v0.9
    description: Sandbox
  - url: https://api.polygon.technology/v0.9
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Authentication via FrontEgg
  - name: Customers
    description: Customer management and KYC
  - name: Customer
  - name: Wallet
  - name: Quote
  - name: Transaction
  - name: Webhook
  - name: CashIns
  - name: CashLocation
  - name: Sandbox
  - name: Simulation
paths:
  /cash-ins/{cashInId}/refresh:
    post:
      tags:
        - CashIns
      summary: Refresh a cash-in deposit code
      description: >-
        Regenerates the deposit code for an existing cash-in whose code has
        expired

        or is close to expiring, returning a fresh code and expiry. Pass an

        Idempotency-Key header to safely retry.
      operationId: refreshCashIn
      parameters:
        - in: path
          name: cashInId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/IdempotencyKeyHeader'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashIn'
          description: The request has succeeded.
components:
  parameters:
    IdempotencyKeyHeader:
      description: >-
        Required on POST and PUT requests. Use a unique value per logical
        mutation attempt, for example a UUID.
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
  schemas:
    CashIn:
      description: >-
        A code-based cash deposit. The customer takes the issued code to a
        retail location and deposits cash, which OMS converts to crypto and
        delivers to the destination. Amounts start as estimates and are
        finalized once the cash is deposited.
      properties:
        cash:
          $ref: '#/components/schemas/CashInfo'
        completedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        customerId:
          type: string
        depositInstructions:
          $ref: '#/components/schemas/CashInDepositInstructions'
        destination:
          $ref: '#/components/schemas/CashInDestination'
        developerFees:
          description: >-
            Developer fee entries echoed back from the request.

            Omitted in alpha - request side is stripped per spec § 2. The field

            stays on the schema so it can be reintroduced without a breaking
            change

            when developer fees ship.
          items:
            $ref: '#/components/schemas/FeeEntry'
          type: array
        fixedAmountSide:
          enum:
            - source
            - destination
          type: string
        id:
          type: string
        location:
          $ref: '#/components/schemas/CashInLocation'
        metadata:
          type: object
          additionalProperties:
            type: string
        object:
          enum:
            - cashIn
          type: string
        omsFeeSchedule:
          $ref: '#/components/schemas/OmsFeeSchedule'
        rates:
          $ref: '#/components/schemas/Rates'
        source:
          $ref: '#/components/schemas/CashInSource'
        sponsorGas:
          type: boolean
        sponsorGasCost:
          description: |-
            USD cost of gas absorbed by the developer when sponsoring gas.
            Always "0" in alpha - gas is sponsored. Spec § 4.1.
          type: string
        status:
          $ref: '#/components/schemas/CashInStatus'
        subStatus:
          $ref: '#/components/schemas/CashInSubStatus'
        transactionId:
          type: string
        type:
          $ref: '#/components/schemas/TransferType'
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - type
        - status
        - customerId
        - source
        - destination
        - cash
        - location
        - createdAt
        - updatedAt
      type: object
    CashInfo:
      properties:
        locationId:
          type: string
        locationReference:
          type: string
      required:
        - locationId
        - locationReference
      type: object
    CashInDepositInstructions:
      description: >-
        The deposit code and retail location a customer uses to complete a
        cash-in.
      properties:
        code:
          type: string
        expiresAt:
          type: string
          format: date-time
        locationAddress:
          type: string
        locationName:
          type: string
      required:
        - code
        - expiresAt
      type: object
    CashInDestination:
      description: The crypto destination a cash-in is converted to and delivered to.
      properties:
        amountGross:
          type: string
        amountNet:
          type: string
        asset:
          type: string
        feesDeducted:
          $ref: '#/components/schemas/FeesDeducted'
        network:
          type: string
        wallet:
          $ref: '#/components/schemas/CashInDestinationWallet'
      type: object
    FeeEntry:
      description: >-
        A single developer fee entry. At least one of percentage or flatFee is
        required.
      properties:
        amount:
          description: Computed fee amount for this entry. Present on responses only.
          type: string
        flatFee:
          description: Fixed fee in USD. Converted to fee-side asset at the exchange rate.
          type: string
        id:
          description: Unique identifier assigned by OMS. Present on responses only.
          type: string
        payoutAsset:
          description: Crypto asset for fee payout. Defaults to "usdc".
          enum:
            - usdc
            - usdt
          type: string
        percentage:
          description: Percentage fee as a decimal rate. "0.02" = 2%.
          type: string
        wallet:
          description: OMS wallet to receive this fee.
          type: string
      type: object
    CashInLocation:
      properties:
        address:
          type: string
        name:
          type: string
      type: object
    OmsFeeSchedule:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/OmsFeeEntry'
          type: array
        feeCurrency:
          type: string
      required:
        - feeCurrency
        - entries
      type: object
    Rates:
      description: Exchange and effective rates.
      properties:
        effectiveRate:
          description: All-in rate inclusive of all fees on both sides.
          type: string
        exchangeRate:
          description: Units of destination asset per 1 unit of source asset.
          type: string
        pair:
          description: Asset pair string, e.g. "usdc/usd".
          type: string
      required:
        - pair
        - exchangeRate
        - effectiveRate
      type: object
    CashInSource:
      properties:
        amount:
          type: string
        amountGross:
          type: string
        amountNet:
          type: string
        asset:
          type: string
        email:
          type: string
        feesDeducted:
          $ref: '#/components/schemas/FeesDeducted'
        indicatedAmount:
          type: string
        network:
          type: string
      required:
        - asset
      type: object
    CashInStatus:
      description: >-
        Lifecycle of a cash-in. pending: code issued, awaiting deposit.
        processing: cash deposited, conversion underway. completed: converted
        and delivered. failed: the deposit or conversion did not succeed.
        expired: the code expired before any deposit.
      enum:
        - pending
        - processing
        - completed
        - failed
        - expired
      type: string
    CashInSubStatus:
      description: >-
        Granular sub-status for a cash-in. Adds detail behind the coarse status
        field.
      enum:
        - order_reserved
        - settled
        - cash_deposit_expired
        - cash_deposit_failed
        - provider_order_failed
        - provider_order_template_error
      type: string
    TransferType:
      description: >-
        Direction of value across rails: cryptoToCrypto, fiatToCrypto, or
        cryptoToFiat.
      enum:
        - cryptoToCrypto
        - fiatToCrypto
        - cryptoToFiat
      type: string
    FeesDeducted:
      description: |-
        Per-side breakdown of fees deducted in-line from the transaction.
        End-of-month billable fees will be reported separately in the future
        (planned `feesInvoice` sibling). Denominated in that side's asset.
      properties:
        developer:
          description: |-
            Per-side aggregated developer fee total in this side's asset.
            Always "0" in alpha - alpha invariant, mirrors the gas line.
          type: string
        gas:
          type: string
        oms:
          type: string
        total:
          type: string
      required:
        - total
        - developer
        - oms
        - gas
      type: object
    CashInDestinationWallet:
      properties:
        blockchainAddress:
          type: string
        externalAccount:
          type: string
        id:
          type: string
      type: object
    OmsFeeEntry:
      properties:
        amount:
          type: string
        rate:
          type: string
        type:
          type: string
      required:
        - type
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from POST /auth/token

````