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

# Create Order

> Create a new carbon offset order through the offset gateway



## OpenAPI

````yaml POST /offset-gateway/orders
openapi: 3.0.1
info:
  title: Offset Gateway API
  description: API specification for carbon credit purchases and offsets
  version: 1.0.0
servers:
  - url: https://api.sandbox.external.bnznow.com
    description: Sandbox server for marketplace APIs
  - url: https://api.external.bnznow.com
    description: Production server for marketplace APIs
security: []
paths:
  /offset-gateway/orders:
    post:
      tags:
        - Offset
      summary: Create Offset Order
      description: Create a new carbon offset order
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: API key for authentication
        - name: x-body-signature
          in: header
          required: true
          schema:
            type: string
          description: Signature of the request body signed with API secret (private key)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '200':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateOrderRequest:
      type: object
      required:
        - emission_amount
      properties:
        emission_amount:
          type: number
          description: Amount of carbon credits to purchase
          minimum: 0
        emission_unit:
          type: string
          description: >-
            Unit of measurement for emissions (defaults to kgCO2 if not
            specified)
          enum:
            - kgCO2
            - tonCO2e
          default: kgCO2
        callback_url:
          type: string
          format: uri
          description: URL to receive webhook notifications about order status changes
        user:
          type: object
          description: User information
          properties:
            name:
              type: string
              description: Full name of the user
            email:
              type: string
              format: email
              description: Email address of the user
            tax_id:
              type: string
              description: Tax identification number of the user
    CreateOrderResponse:
      type: object
      properties:
        order_id:
          type: string
          description: Unique identifier for the order
        emission_amount:
          type: number
          description: Amount of emissions to offset
        emission_unit:
          type: string
          description: Unit of emission measurement
        user:
          type: object
          properties:
            name:
              type: string
              description: Full name of the user
            email:
              type: string
              description: Email address of the user
            tax_id:
              type: string
              description: Tax identification number of the user
        callback_url:
          type: string
          format: uri
          description: URL to receive webhook notifications about order status changes
        payment_url:
          type: string
          format: uri
          description: URL to complete the payment
        created_at:
          type: string
          format: date-time
          description: Order creation timestamp
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string

````