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

# Create credit purchase intent

> Creates a Stripe PaymentIntent for purchasing credits. Returns a client secret that should be passed to Stripe.js for payment confirmation.



## OpenAPI

````yaml api-reference/billing.yaml post /checkout/credits/payment-intent
openapi: 3.0.3
info:
  title: billing
  description: >-
    The Billing Service manages billing-related operations across the platform.
    It handles all financial transactions, balance management, and SKU-based
    pricing across the platform.
  version: 1.0.0
servers:
  - url: https://billing.platform.arb.inc
security: []
tags:
  - name: /
  - name: _internal
  - name: balance
  - name: charge
  - name: checkout
  - name: pricing
  - name: skus
  - name: transactions
paths:
  /checkout/credits/payment-intent:
    post:
      tags:
        - checkout
      summary: Create credit purchase intent
      description: >-
        Creates a Stripe PaymentIntent for purchasing credits. Returns a client
        secret that should be passed to Stripe.js for payment confirmation.
      operationId: createCreditsCheckout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - skuCode
              properties:
                skuCode:
                  type: string
                  description: >-
                    SKU code for the credit package to purchase (1-100
                    characters)
                  example: CREDITS_50
                quantity:
                  type: integer
                  description: Number of packages to purchase (1-100, defaults to 1)
                  example: 1
                metadata:
                  type: object
                  description: Optional custom tracking data (reserved keys are ignored)
                  additionalProperties:
                    type: string
                  example:
                    source: web-app
                    campaign: summer-2025
      responses:
        '200':
          description: Payment intent created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientSecret:
                    type: string
                    description: Client secret for Stripe.js payment confirmation
                    example: >-
                      pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YZ6X7YW8vU9tU8oZ1kL2mN3o
                  paymentIntentId:
                    type: string
                    example: pi_3MtwBwLkdIwHu7ix28a3tqPa
                  amount:
                    type: integer
                    description: Charge amount in cents
                    example: 2500
                  currency:
                    type: string
                    example: usd
                  skuCode:
                    type: string
                    example: CREDITS_50
                  creditsToAdd:
                    type: integer
                    example: 50
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: access token
      scheme: bearer
      bearerFormat: JWT

````