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

# Cancel an order

> Cancels a `pending`/`awaiting_otp` order on our side. The provider offers no cancel call, so instruct the payer not to pay; a payment that still arrives is credited (money wins).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/onramp/orders/{id}/cancel
openapi: 3.0.3
info:
  title: XentFi API
  version: 1.0.0
  description: >-
    API documentation for XentFi.The XentFi API gives you access to pretty much
    all the features you can use on our dashboard and lets you extend them for
    use in your application. It strives to be RESTful and is organized around
    the main resources you would be interacting with - with a few notable
    exceptions.
servers:
  - url: https://api.xentfi.com
    description: Production server
security: []
tags: []
paths:
  /v1/onramp/orders/{id}/cancel:
    post:
      tags:
        - On-ramp
      summary: Cancel an order
      description: >-
        Cancels a `pending`/`awaiting_otp` order on our side. The provider
        offers no cancel call, so instruct the payer not to pay; a payment that
        still arrives is credited (money wins).
      operationId: cancelOnrampOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      reference:
                        type: string
                      rail:
                        type: string
                        enum:
                          - bank_transfer
                          - mobile_money
                      status:
                        type: string
                        enum:
                          - initiated
                          - pending
                          - awaiting_otp
                          - paid
                          - processing
                          - completed
                          - expired
                          - cancelled
                          - failed
                      walletId:
                        type: string
                      assetId:
                        type: string
                      currency:
                        type: string
                      amount:
                        type: string
                        description: Stablecoin the wallet receives
                      amountFiat:
                        type: string
                      feeFiat:
                        type: string
                      amountFiatPayable:
                        type: string
                        nullable: true
                        description: Total the payer must send
                      amountFiatReceived:
                        type: string
                        nullable: true
                      rate:
                        type: string
                      paymentInstructions:
                        type: object
                        nullable: true
                        properties:
                          type:
                            type: string
                            enum:
                              - bank_transfer
                              - mobile_money
                          bank:
                            type: object
                            properties:
                              name:
                                type: string
                              accountName:
                                type: string
                              accountNumber:
                                type: string
                          mobileMoney:
                            type: object
                            properties:
                              phoneNumber:
                                type: string
                                description: Masked
                              networkProvider:
                                type: string
                              nextStep:
                                type: string
                                enum:
                                  - PIN
                                  - OTP
                              prompt:
                                type: string
                          amountToPay:
                            type: string
                          currency:
                            type: string
                          expiresAt:
                            type: string
                            format: date-time
                      customer:
                        type: object
                        properties:
                          name:
                            type: string
                          email:
                            type: string
                      transactionHash:
                        type: string
                        nullable: true
                        description: >-
                          On-chain hash of the delivery to your wallet, when
                          reported
                      failureReason:
                        type: string
                        nullable: true
                      failureStage:
                        type: string
                        nullable: true
                        enum:
                          - provider_setup
                          - rate_moved
                          - provider
                          - abandoned
                      requiresOtp:
                        type: boolean
                      expiresAt:
                        type: string
                        format: date-time
                      metadata:
                        type: object
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      completedAt:
                        type: string
                        format: date-time
                        nullable: true
        '409':
          description: Order is not cancellable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Wallet not found
                      timestamp:
                        type: string
                        format: date-time
                      requestId:
                        type: string
      security:
        - ApiKeyAuth: []
          OrgIdAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    OrgIdAuth:
      type: apiKey
      in: header
      name: orgId

````

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