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

# Buy a credit pack

> Charges the organization's card for a credit pack (10 credits = $1) and adds the credits once the payment succeeds. A requires_action result carries a client secret for Stripe.js to finish card authentication, after which POST /current/credits/purchases/{paymentIntentId}/confirm adds the credits. Replaying the same Idempotency-Key returns the original purchase. Organization admins only.



## OpenAPI

````yaml https://api.zeroclick.io/openapi.json post /v1/organizations/current/credits/purchases
openapi: 3.0.0
info:
  title: ZeroClick API
  description: >-
    REST API for managing ZeroClick sellers, services, pricing, usage, and
    analytics. Authenticate with an API key from the ZeroClick dashboard.
  version: 1.0.0
servers:
  - url: https://api.zeroclick.io
security:
  - bearerAuth: []
tags:
  - name: API keys
  - name: Sellers
  - name: Services
  - name: Meters
  - name: Plans
  - name: Plan meter prices
  - name: Usage
  - name: Analytics
  - name: Agentify
  - name: Stripe Connect
  - name: Sandbox
  - name: Organizations
  - name: Users
paths:
  /v1/organizations/current/credits/purchases:
    post:
      tags:
        - Organizations
      summary: Buy a credit pack
      description: >-
        Charges the organization's card for a credit pack (10 credits = $1) and
        adds the credits once the payment succeeds. A requires_action result
        carries a client secret for Stripe.js to finish card authentication,
        after which POST /current/credits/purchases/{paymentIntentId}/confirm
        adds the credits. Replaying the same Idempotency-Key returns the
        original purchase. Organization admins only.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          in: header
          name: idempotency-key
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                credits:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
              required:
                - credits
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - succeeded
                      - requires_action
                      - processing
                  paymentIntentId:
                    type: string
                  clientSecret:
                    nullable: true
                    type: string
                  publishableKey:
                    nullable: true
                    type: string
                  balance:
                    nullable: true
                    type: object
                    properties:
                      settledUsd:
                        type: string
                      heldUsd:
                        type: string
                      availableUsd:
                        type: string
                    required:
                      - settledUsd
                      - heldUsd
                      - availableUsd
                    additionalProperties: false
                required:
                  - status
                  - paymentIntentId
                  - clientSecret
                  - publishableKey
                  - balance
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in the ZeroClick dashboard under Settings → API keys.
        Keys start with `zc_`. Send them as `Authorization: Bearer zc_...`.

````

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