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

# Cancel an order (only while it is awaiting payment)



## OpenAPI

````yaml /openapi/order-service.json post /v1/orders/{id}/cancel
openapi: 3.0.0
info:
  title: Asiko Order Service
  description: Cart, checkout, order lifecycle
  version: '1.0'
  contact: {}
servers:
  - url: https://asikodevapi.candourit.io
    description: Production (via api-gateway)
  - url: http://localhost:3000
    description: Local development (via api-gateway)
security: []
tags:
  - name: orders
    description: ''
  - name: cart
    description: ''
paths:
  /v1/orders/{id}/cancel:
    post:
      tags:
        - orders
      summary: Cancel an order (only while it is awaiting payment)
      operationId: OrdersController_cancel
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderBody'
      responses:
        '200':
          description: ''
      security:
        - bearer: []
components:
  schemas:
    CancelOrderBody:
      type: object
      properties:
        reason:
          type: string
          example: Ordered the wrong size
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````