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

# Create a payment intent



## OpenAPI

````yaml specs/billing_api_docs.json post /api/v1/payments
openapi: 3.0.1
info:
  title: Billing API
  description: Billing service for managing subscriptions, payments, and entitlements
  contact: {}
  version: '1.0'
servers:
  - url: https://dev-billing-api.iqraa.ai/api/v1
security: []
tags:
  - name: Customers
    description: Customers related endpoints
  - name: Subscriptions
    description: Subscription related endpoints
  - name: Plans
    description: Plans related endpoints
  - name: Entitlements
    description: Entitlements related endpoints
  - name: Payments
    description: Payments related endpoints
  - name: Emails
    description: Email related endpoints
paths:
  /api/v1/payments:
    post:
      tags:
        - Payments
      summary: Create a payment intent
      operationId: PaymentController_createPaymentIntent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentIntentDto'
      responses:
        '201':
          description: Payment intent created successfully
        '400':
          description: Bad request - Invalid amount, currency or plan code
        '403':
          description: Forbidden - User not authorized to create payment intent
        '404':
          description: Not Found - Customer or plan not found
      security:
        - bearer: []
components:
  schemas:
    CreatePaymentIntentDto:
      type: object
      properties:
        amount:
          type: number
          description: The amount for the payment intent
          example: 1000
        currency:
          type: string
          description: The currency for the payment intent
          example: AED
        planCode:
          type: string
          description: The plan code associated with the payment intent (for subscriptions)
          example: PREMIUM_MONTHLY
        seats:
          type: number
          description: Number of seats (for subscriptions)
          example: 1
        userEmail:
          type: string
          description: The user email for the payment intent
          example: test@test.com
        userName:
          type: string
          description: The user name for the payment intent
          example: John Doe
        chargeCode:
          type: string
          description: The entitlement code for the addon
          example: EXTRA_STORAGE
        quota:
          type: number
          description: The quota amount for the addon
          example: 100
          minimum: 1
        isRenewable:
          type: boolean
          description: Whether the addon can be automatically renewed
          example: true
          default: false
      required:
        - amount
        - currency
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: opaque
      type: http

````