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

# Cancel an onramp

> Cancel an onramp that is in review. Only onramps with status `IN_REVIEW` can be cancelled.



## OpenAPI

````yaml https://production.hifi.com/api/v3/openapi.json post /v3/onramps/{onrampId}/cancel
openapi: 3.0.0
info:
  title: Hifi API
  version: 3.0.0
  description: API documentation for HIFI
servers:
  - url: https://production.hifi.com
    description: Production server
  - url: https://sandbox.hifi.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Counter Party
    description: Counter party endpoints
  - name: Crypto Transfer
    description: Crypto transfer and batch transfer endpoints
  - name: Wallet
    description: Wallet and wallet offer endpoints
  - name: External Account
    description: External bank account endpoints (under a counter party)
  - name: External Wallet
    description: External wallet endpoints (under a counter party)
  - name: External Card
    description: External card endpoints (under a counter party)
  - name: Token Swap
    description: Token swap endpoints
  - name: Bridge
    description: Bridge endpoints
  - name: Virtual Account
    description: Virtual account endpoints
  - name: Compliance
    description: Compliance and compliance link endpoints
  - name: Webhook Endpoint
    description: Webhook endpoint endpoints
  - name: File
    description: File upload endpoints
  - name: Onramp
    description: Onramp (fiat to crypto) endpoints
  - name: Offramp
    description: Offramp (crypto to fiat) endpoints
  - name: Orchestration Address
    description: Orchestration (liquidation) address endpoints
  - name: KYC Link
    description: Hosted and custom KYC/KYB link endpoints
  - name: Transfer Approval
    description: Transfer approval endpoints
  - name: Corridor
    description: Supported fiat/crypto transfer corridor endpoints
  - name: Migration
    description: v2-to-v3 ID mapping endpoints
paths:
  /v3/onramps/{onrampId}/cancel:
    post:
      tags:
        - Onramp
      summary: Cancel an onramp
      description: >-
        Cancel an onramp that is in review. Only onramps with status `IN_REVIEW`
        can be cancelled.
      operationId: v3CancelOnramp
      parameters:
        - $ref: '#/components/parameters/OnrampIdPathParameter'
      responses:
        '200':
          $ref: '#/components/responses/CancelOnrampResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '422':
          $ref: '#/components/responses/ResourceNotEligibleResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  parameters:
    OnrampIdPathParameter:
      name: onrampId
      in: path
      required: true
      schema:
        type: string
      description: Public ID of the onramp transaction (prefixed with `onramp_`)
      example: onramp_7bV1aLcs3Kf9dQ2mNpXwZ
  responses:
    CancelOnrampResponse:
      description: Onramp cancelled successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OnrampObject'
          example:
            '<<':
              id: onramp_7bV1aLcs3Kf9dQ2mNpXwZ
              requestId: b3d1f2a4-5c6e-7890-abcd-ef1234567890
              status: AWAITING_FUNDS
              failedReason: null
              error: null
              errorDetails: null
              source:
                amount: 100
                currency: USD
                userId: usr_3Kf9dQ2mNpXwZ7bV1aLcs
                externalAccountId: null
                virtualAccountId: null
                depositInstructions:
                  bankName: Cross River Bank
                  bankAddress: 2115 Linwood Ave, Fort Lee, NJ 07024
                  beneficiary:
                    name: HIFI Bridge Inc
                    address: 123 Main Street, New York, NY, 10001, USA
                  ach:
                    routingNumber: '021000021'
                    accountNumber: '123456789'
                  wire:
                    routingNumber: '021000021'
                    accountNumber: '123456789'
                  rtp:
                    routingNumber: '021000021'
                    accountNumber: '123456789'
                  reference: HIFI-9A2B
                  depositBy: '2026-07-02T10:30:00.000Z'
                  instruction: >-
                    Please deposit USD to the bank account provided. For USDT
                    onramp, a minimum of $10 is required, or the funds will be
                    returned.
                depositTracking: null
              destination:
                chain: POLYGON
                amount: 100
                currency: USDC
                userId: usr_3Kf9dQ2mNpXwZ7bV1aLcs
                walletId: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
                externalWalletId: null
                walletAddress: '0x1234567890abcdef1234567890abcdef12345678'
              receipt:
                transactionHash: null
              settlement: null
              quote:
                sendGross:
                  amount: '100.00'
                  currency: USD
                sendNet:
                  amount: '100.00'
                  currency: USD
                railFee:
                  amount: '0.00'
                  currency: USDC
                receiveGross:
                  amount: '100.00'
                  currency: USDC
                receiveNet:
                  amount: '100.00'
                  currency: USDC
                rate: '1.00'
                conversionFee:
                  amount: '0'
                  currency: USDC
                  description: No conversion fee applicable
                  timing: N/A
                expiresAt: N/A
              microDeposits:
                count: 0
                data: []
              sameDayAch: false
              description: Monthly top-up
              createdAt: '2026-07-01T10:30:00.000Z'
              updatedAt: '2026-07-01T10:30:00.000Z'
            status: CANCELLED
    BadRequestResponse:
      description: Bad Request — the request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: VALIDATION_ERROR
            message: One or more fields are invalid or missing.
            fields:
              - code: invalid_value
                message: Must be a valid email address
                field: email
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    NotFoundResponse:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    ConflictResponse:
      description: >-
        Conflict — the request collides with the current state of the resource
        (e.g. idempotency-key reuse with a different payload).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: RESOURCE_CONFLICT
            message: Resource already exists or conflicts with current state
    ResourceNotEligibleResponse:
      description: >-
        Unprocessable Entity — the resource exists but is not eligible for the
        requested operation in its current state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: ACTION_NOT_ALLOWED
            message: This action is not allowed
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    OnrampObject:
      type: object
      description: An onramp transaction.
      properties:
        id:
          type: string
          description: Public ID of the onramp (prefixed with `onramp_`).
          example: onramp_7bV1aLcs3Kf9dQ2mNpXwZ
        requestId:
          type: string
          format: uuid
          description: Client-supplied idempotency key from the create request.
          example: b3d1f2a4-5c6e-7890-abcd-ef1234567890
        status:
          $ref: '#/components/schemas/OnrampStatus'
        failedReason:
          type: string
          nullable: true
          description: Machine-readable reason when the onramp failed.
          example: null
        error:
          type: string
          nullable: true
          description: User-facing error summary when the onramp failed.
          example: null
        errorDetails:
          type: string
          nullable: true
          description: User-facing error detail when the onramp failed.
          example: null
        source:
          type: object
          properties:
            amount:
              type: number
              nullable: true
              example: 100
            currency:
              type: string
              enum:
                - USD
              example: USD
            userId:
              type: string
              nullable: true
              description: Public ID of the funding user (prefixed with `usr_`).
              example: usr_3Kf9dQ2mNpXwZ7bV1aLcs
            externalAccountId:
              type: string
              nullable: true
              description: >-
                Public ID of the funding external account (prefixed with
                `extacct_`).
              example: null
            virtualAccountId:
              type: string
              nullable: true
              description: Public ID of the funding virtual account (prefixed with `va_`).
              example: null
            depositInstructions:
              $ref: '#/components/schemas/OnrampDepositInstructions'
            depositTracking:
              $ref: '#/components/schemas/OnrampDepositTracking'
        destination:
          type: object
          properties:
            chain:
              type: string
              enum:
                - ETHEREUM
                - POLYGON
                - SOLANA
                - BASE
                - OPTIMISM
                - ARBITRUM
                - FLOW_EVM
                - CANTON
                - TRON
                - BSC
                - XRPL
              example: POLYGON
            amount:
              type: number
              nullable: true
              example: 100
            currency:
              type: string
              enum:
                - USDC
                - USDT
                - PYUSD0
              example: USDC
            userId:
              type: string
              nullable: true
              description: Public ID of the receiving user (prefixed with `usr_`).
              example: usr_3Kf9dQ2mNpXwZ7bV1aLcs
            walletId:
              type: string
              nullable: true
              description: Public ID of the receiving HIFI wallet (prefixed with `wlt_`).
              example: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
            externalWalletId:
              type: string
              nullable: true
              description: >-
                Public ID of the receiving external wallet (prefixed with
                `extw_`).
              example: null
            walletAddress:
              type: string
              nullable: true
              example: '0x1234567890abcdef1234567890abcdef12345678'
        receipt:
          type: object
          properties:
            transactionHash:
              type: string
              nullable: true
              description: On-chain transaction hash of the delivered crypto.
              example: null
        settlement:
          nullable: true
          description: Settlement breakdown once funds settle.
        quote:
          $ref: '#/components/schemas/OnrampQuote'
        microDeposits:
          $ref: '#/components/schemas/OnrampMicroDeposits'
        sameDayAch:
          type: boolean
          example: false
        description:
          type: string
          nullable: true
          example: Monthly top-up
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
    ApiError:
      type: object
      description: >-
        Standard v3 error shape, returned by validation failures and
        business-logic errors alike.
      properties:
        type:
          type: string
          description: >-
            Machine-readable error type, e.g. VALIDATION_ERROR,
            ACTION_NOT_ALLOWED, RESOURCE_CONFLICT.
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message.
          example: One or more fields are invalid or missing.
        fields:
          type: array
          description: >-
            Present on field-level validation errors. One entry per problem
            field.
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code related to the field issue.
              message:
                type: string
                description: Error message for the specific issue.
              field:
                type: string
                description: The name of the field that has an issue.
    Unauthorized:
      type: object
      properties:
        type:
          type: string
          description: Unauthorized enum
          example: UNAUTHORIZED
        message:
          type: string
          description: Unauthorized message
          example: Authentication required
    NotFound:
      type: object
      properties:
        type:
          type: string
          example: RESOURCE_NOT_FOUND
          description: The error type, e.g., RESOURCE_NOT_FOUND
        message:
          type: string
          description: A descriptive error message
        fields:
          type: array
          description: List of specific field errors
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code related to the field issue
              message:
                type: string
                description: Error message for the specific issue
              field:
                type: string
                description: The name of the field that has an issue
    InternalServerError:
      type: object
      properties:
        type:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: Internal server error enum
        message:
          type: string
          example: An internal server error occurred
          description: Internal server error message
    OnrampStatus:
      type: string
      description: Lifecycle status of the onramp transaction.
      enum:
        - NOT_INITIATED
        - CREATED
        - OPEN_QUOTE
        - IN_REVIEW
        - FIAT_INITIATED
        - AWAITING_FUNDS
        - FIAT_PENDING
        - FIAT_PROCESSED
        - CRYPTO_INITIATED
        - CRYPTO_PENDING
        - COMPLETED
        - FIAT_FAILED
        - FIAT_RETURNED
        - CRYPTO_FAILED
        - QUOTE_FAILED
        - EXPIRED
        - UNKNOWN
        - CANCELLED
      example: AWAITING_FUNDS
    OnrampDepositInstructions:
      type: object
      nullable: true
      description: |
        Bank details for funding the onramp. Present only while the onramp is
        awaiting funds and no virtual or source account is attached.
      properties:
        bankName:
          type: string
          example: Cross River Bank
        bankAddress:
          type: string
          example: 2115 Linwood Ave, Fort Lee, NJ 07024
        beneficiary:
          type: object
          properties:
            name:
              type: string
              example: HIFI Bridge Inc
            address:
              type: string
              example: 123 Main Street, New York, NY, 10001, USA
        ach:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789'
        wire:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789'
        rtp:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789'
        reference:
          type: string
          nullable: true
          example: HIFI-9A2B
        depositBy:
          type: string
          format: date-time
          nullable: true
          example: '2026-07-02T10:30:00.000Z'
        instruction:
          type: string
          example: >-
            Please deposit USD to the bank account provided. For USDT onramp, a
            minimum of $10 is required, or the funds will be returned.
    OnrampDepositTracking:
      type: object
      nullable: true
      description: Details of the inbound fiat payment once received.
      properties:
        bankName:
          type: string
          example: Chase Bank
        senderName:
          type: string
          example: John Doe
        routingNumber:
          type: string
          example: '021000021'
        accountNumber:
          type: string
          example: '123456789'
        accountType:
          type: string
          example: CHECKING
        fedBatchId:
          type: string
          example: '20260701001'
        imad:
          type: string
          example: 20260701MMQFMPH5000001
        omad:
          type: string
          example: 20260701QMGFT025000123
        traceNumber:
          type: string
          example: '021000020123456'
        bankAddress:
          type: string
          example: 270 Park Avenue, New York, NY, USA
        description:
          type: string
          example: Onramp deposit
        references:
          type: object
          nullable: true
          properties:
            senderReference:
              type: string
              example: REF-12345
            beneficiaryReference:
              type: string
              example: HIFI-9A2B
            remittance:
              type: array
              items:
                type: string
        paymentRail:
          type: string
          example: ach
    OnrampQuote:
      type: object
      description: Conversion quote for the onramp.
      properties:
        sendGross:
          type: object
          properties:
            amount:
              type: string
              example: '100.00'
            currency:
              type: string
              example: USD
        sendNet:
          type: object
          properties:
            amount:
              type: string
              example: '100.00'
            currency:
              type: string
              example: USD
        railFee:
          type: object
          properties:
            amount:
              type: string
              example: '0.00'
            currency:
              type: string
              example: USDC
        receiveGross:
          type: object
          properties:
            amount:
              type: string
              example: '100.00'
            currency:
              type: string
              example: USDC
        receiveNet:
          type: object
          properties:
            amount:
              type: string
              example: '100.00'
            currency:
              type: string
              example: USDC
        rate:
          type: string
          example: '1.00'
        conversionFee:
          type: object
          properties:
            amount:
              type: string
              example: '0'
            currency:
              type: string
              example: USDC
            description:
              type: string
              example: No conversion fee applicable
            timing:
              type: string
              example: N/A
        expiresAt:
          type: string
          description: ISO timestamp when the quote expires, or `N/A` for static quotes.
          example: N/A
    OnrampMicroDeposits:
      type: object
      description: Micro-deposits received against the onramp while awaiting funds.
      properties:
        count:
          type: integer
          example: 0
        data:
          type: array
          items:
            type: object
            properties:
              createdAt:
                type: string
                format: date-time
                example: '2026-07-01T10:30:00.000Z'
              currency:
                type: string
                example: USD
              amount:
                type: number
                example: 0.01
              sourceBankInfo:
                $ref: '#/components/schemas/OnrampDepositTracking'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````