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

# Create Credit Order Route



## OpenAPI

````yaml https://api.somya.ai/openapi.json post /v1/credits/orders
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/credits/orders:
    post:
      tags:
        - credits
      summary: Create Credit Order Route
      operationId: create_credit_order_route_v1_credits_orders_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditOrderRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCreditOrderResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateCreditOrderRequest:
      properties:
        amount_inr:
          type: integer
          maximum: 100000
          minimum: 100
          title: Amount Inr
      type: object
      required:
        - amount_inr
      title: CreateCreditOrderRequest
    CreateCreditOrderResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          $ref: '#/components/schemas/CreateCreditOrderData'
      type: object
      required:
        - data
      title: CreateCreditOrderResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateCreditOrderData:
      properties:
        order_id:
          type: string
          format: uuid
          title: Order Id
        razorpay_order_id:
          type: string
          title: Razorpay Order Id
        amount:
          type: integer
          title: Amount
        currency:
          type: string
          title: Currency
        key_id:
          type: string
          title: Key Id
        credits:
          type: integer
          title: Credits
      type: object
      required:
        - order_id
        - razorpay_order_id
        - amount
        - currency
        - key_id
        - credits
      title: CreateCreditOrderData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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