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

# Cancel an order

> Cancels a pending order. Leaves a note authored by the token.



## OpenAPI

````yaml /api-reference/openapi/seller-v1.yaml patch /v1/seller/orders/{orderId}/cancel
openapi: 3.1.0
info:
  description: >-
    Read and manage your store's orders, delivery commands, servers and
    webhooks.
  title: Gamecart Seller API
  version: 1.0.0
servers:
  - url: https://api.gamecart.gg
security: []
tags:
  - description: The store behind the API token.
    name: Store
  - description: Orders and the actions on them.
    name: Orders
  - description: Internal notes on orders. Only the seller sees them.
    name: Order notes
  - description: The delivery command queue.
    name: Commands
  - description: >-
      Run the queue from your own executor, with the same protocol as the
      official connectors.
    name: Command execution
  - description: Game servers that receive delivery commands.
    name: Servers
  - description: Webhook endpoints and their deliveries.
    name: Webhooks
paths:
  /v1/seller/orders/{orderId}/cancel:
    patch:
      tags:
        - Orders
      summary: Cancel an order
      description: Cancels a pending order. Leaves a note authored by the token.
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          description: The cancelled order.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - apiToken:
            - orders:cancel
components:
  schemas:
    Order:
      description: >-
        An order placed in the store. Fields that do not apply, or that the
        token has no scope to read, are omitted. List responses omit items,
        coupons, discounts, checkoutFields and buyer.billing; fetch the order by
        id to read them.
      properties:
        buyer:
          $ref: '#/components/schemas/OrderBuyer'
          description: >-
            Buyer identity. Requires the `orders:buyer:read` scope; always
            present in webhooks.
          type: object
        cancelledAt:
          $ref: '#/components/schemas/Instant'
          description: When the order was cancelled.
          type: string
        checkoutFields:
          items:
            $ref: '#/components/schemas/OrderCheckoutField'
          type: array
        coupons:
          items:
            $ref: '#/components/schemas/OrderCoupon'
          type: array
        createdAt:
          $ref: '#/components/schemas/Instant'
          description: When the order was created.
          examples:
            - '2026-09-25T13:04:12.000Z'
          type: string
        currency:
          description: ISO 4217 currency of every amount in the order.
          examples:
            - USD
          type: string
        customGateway:
          $ref: '#/components/schemas/OrderCustomGateway'
          description: Present only when `gatewayType` is `CUSTOM`.
          type: object
        deliveryStatus:
          $ref: '#/components/schemas/DeliveryStatus'
          description: >-
            Aggregated status of the order's delivery commands. `NOT_APPLICABLE`
            when the order has no commands.
          examples:
            - EXECUTED
          type: string
        discounts:
          items:
            $ref: '#/components/schemas/OrderDiscount'
          type: array
        externalPaymentId:
          description: Payment identifier at the provider.
          examples:
            - pi_3Q1x2y3z
          type: string
        gatewayType:
          $ref: '#/components/schemas/GatewayType'
          description: >-
            Payment gateway. `MANUAL` marks an order created by the seller in
            the dashboard; `FREE` marks a checkout with total 0; `CUSTOM` marks
            a custom gateway.
          examples:
            - STRIPE
          type: string
        items:
          items:
            $ref: '#/components/schemas/OrderItem'
          type: array
        manualAdjustment:
          description: Manual adjustment the seller applied to a manual order total.
          examples:
            - 0
          type: number
        number:
          description: >-
            Sequential order number shown to the seller in the dashboard.
            Informational only.
          examples:
            - 105
          format: int32
          type: integer
        orderId:
          description: Order identifier. Use it in every order route.
          examples:
            - GC-7K9Q2X
          type: string
        paidAt:
          $ref: '#/components/schemas/Instant'
          description: When the payment was approved.
          examples:
            - '2026-09-25T13:05:00.000Z'
          type: string
        paymentStatus:
          $ref: '#/components/schemas/PaymentStatus'
          description: Payment status.
          examples:
            - APPROVED
          type: string
        publicOrderUrl:
          description: Public order page on the storefront.
          examples:
            - https://play.example.com/order/GC-7K9Q2X
          type: string
        subtotal:
          description: Sum of the items before discounts.
          examples:
            - 20
          type: number
        total:
          description: Amount charged.
          examples:
            - 18
          type: number
        totalDiscount:
          description: Total discount from coupons and automatic discounts.
          examples:
            - 2
          type: number
      type: object
    OrderBuyer:
      properties:
        accountIdentifier:
          description: Identifier used to deliver the order, such as the in-game nickname.
          examples:
            - Steve
          type: string
        billing:
          $ref: '#/components/schemas/OrderBuyerBilling'
          description: Billing details. Detail responses only.
          type: object
        deliveryIdentityMode:
          $ref: '#/components/schemas/DeliveryIdentityMode'
          description: Which identity the delivery targets.
          examples:
            - CHECKOUT_FIELD
          type: string
        discord:
          $ref: '#/components/schemas/OrderBuyerDiscord'
          description: Present when the buyer linked a Discord account.
          type: object
        email:
          examples:
            - steve@example.com
          type: string
        locale:
          description: Storefront language at checkout.
          examples:
            - en-US
          type: string
        name:
          examples:
            - Steve
          type: string
      type: object
    Instant:
      examples:
        - '2022-03-10T16:15:50.000Z'
      format: date-time
      type: string
    OrderCheckoutField:
      properties:
        identifier:
          examples:
            - discord_tag
          type: string
        label:
          examples:
            - Discord tag
          type: string
        value:
          examples:
            - steve#0001
          type: string
      type: object
    OrderCoupon:
      properties:
        code:
          examples:
            - SAVE10
          type: string
        discountValue:
          description: Amount or percentage, see `fixedValue`.
          examples:
            - 10
          type: number
        fixedValue:
          description: '`true` for a fixed amount, `false` for a percentage.'
          type: boolean
      type: object
    OrderCustomGateway:
      properties:
        id:
          $ref: '#/components/schemas/UUID'
          examples:
            - 0f8fad5b-d9cb-469f-a165-70867728950e
          type: string
        name:
          description: Omitted when the custom gateway was deleted.
          examples:
            - Bank transfer
          type: string
      type: object
    DeliveryStatus:
      enum:
        - NOT_APPLICABLE
        - PENDING
        - PROCESSING
        - EXECUTED
        - FAILED
        - UNCERTAIN
      type: string
    OrderDiscount:
      properties:
        discountValue:
          description: Amount or percentage, see `fixedValue`.
          examples:
            - 15
          type: number
        fixedValue:
          description: '`true` for a fixed amount, `false` for a percentage.'
          type: boolean
        name:
          examples:
            - Black Friday
          type: string
      type: object
    GatewayType:
      enum:
        - PAYPAL
        - STRIPE
        - MERCADO_PAGO
        - PIX
        - MANUAL
        - CUSTOM
        - FREE
      type: string
    OrderItem:
      properties:
        effectivePrice:
          description: Price actually charged per unit.
          examples:
            - 10
          type: number
        expiresAt:
          $ref: '#/components/schemas/Instant'
          description: When a time-limited item expires.
          examples:
            - '2026-10-25T13:05:00.000Z'
          type: string
        id:
          examples:
            - 3121
          format: int64
          type: integer
        name:
          examples:
            - VIP rank
          type: string
        productId:
          description: Catalog product id.
          examples:
            - 77
          format: int64
          type: integer
        quantity:
          examples:
            - 2
          format: int32
          type: integer
        unitPrice:
          description: Catalog unit price at checkout.
          examples:
            - 10
          type: number
        variables:
          items:
            $ref: '#/components/schemas/OrderItemVariable'
          type: array
      type: object
    PaymentStatus:
      enum:
        - PENDING
        - APPROVED
        - REJECTED
        - CANCELLED
        - REFUNDED
        - DISPUTE
      type: string
    Problem:
      description: >-
        RFC 9457 problem details. Decide on `status` and `code`; `detail` is
        localized text for people.
      properties:
        code:
          description: Stable machine-readable code.
          examples:
            - ORDER_NOT_FOUND
          type: string
        detail:
          examples:
            - Order not found.
          type: string
        errors:
          description: Field errors of a validation failure.
          items:
            $ref: '#/components/schemas/FieldProblem'
          type: array
        instance:
          examples:
            - /v1/seller/orders/GC-NOPE
          type: string
        requiredScope:
          description: Scopes the operation needs. Present on `INTEGRATION_SCOPE_MISSING`.
          examples:
            - - orders:read
              - orders:buyer:read
          items:
            type: string
          type: array
        retryAfterSeconds:
          description: Seconds to wait. Present on `RATE_LIMIT_ERROR`.
          examples:
            - 17
          type: integer
        status:
          examples:
            - 404
          type: integer
        title:
          examples:
            - Not Found
          type: string
        traceId:
          description: Identifier to quote when contacting support.
          examples:
            - ede70d1d-66d8-4af7-9a4e-a8775b047380
          type: string
        type:
          examples:
            - about:blank
          type: string
      type: object
    OrderBuyerBilling:
      properties:
        addressLine1:
          examples:
            - 1 Market St
          type: string
        addressLine2:
          type: string
        city:
          examples:
            - San Francisco
          type: string
        country:
          examples:
            - US
          type: string
        phone:
          examples:
            - 14155550100
          type: string
        state:
          examples:
            - CA
          type: string
        zipCode:
          examples:
            - 94105
          type: string
      type: object
    DeliveryIdentityMode:
      enum:
        - EMAIL
        - CHECKOUT_FIELD
        - DISCORD
      type: string
    OrderBuyerDiscord:
      properties:
        userId:
          examples:
            - 80351110224678910
          type: string
        username:
          examples:
            - steve
          type: string
      type: object
    UUID:
      format: uuid
      pattern: >-
        [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
      type: string
    OrderItemVariable:
      properties:
        identifier:
          examples:
            - color
          type: string
        name:
          examples:
            - Color
          type: string
        value:
          examples:
            - Red
          type: string
      type: object
    FieldProblem:
      properties:
        code:
          description: Message key of the violation.
          examples:
            - validation.required
          type: string
        field:
          examples:
            - content
          type: string
        message:
          examples:
            - This field is required.
          type: string
      type: object
  responses:
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The token is missing or invalid (`INVALID_INTEGRATION_TOKEN`).
    PlanRequired:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The store's plan does not include API access (`PLAN_FEATURE_REQUIRED`).
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The token lacks a required scope (`INTEGRATION_SCOPE_MISSING`);
        `requiredScope` lists every scope the operation needs.
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The resource does not exist in this store. A resource of another store
        answers the same way.
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The resource is in a state that does not allow the action.
    RateLimited:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The rate limit for this route was reached (`RATE_LIMIT_ERROR`).
      headers:
        Retry-After:
          description: Seconds until the next accepted call.
          schema:
            type: integer
  securitySchemes:
    apiToken:
      description: >-
        API token created in the dashboard under Integrations > API. Tokens
        start with `gci_`.
      scheme: bearer
      type: http

````