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

# Create a sandbox

> Provisions an isolated sandbox tenant pre-seeded with three plans (Starter, Pro, Max) and one test customer. Returns a private API key. No authentication required. The sandbox expires after 24 hours.




## OpenAPI

````yaml POST /sandbox/create
openapi: 3.0.3
info:
  title: Plinth API
  version: 0.9.0
  description: >
    Recurring billing for Nigerian SaaS — card charging, bank transfers via
    virtual accounts,

    proration, dunning, and recovery in one API.


    All amounts are in **kobo** (1/100th of a Naira). ₦5,000 = `500000`.
servers:
  - url: https://api.useplinth.com
    description: Production
  - url: http://localhost:7331
    description: Local development
security:
  - BearerAuth: []
tags:
  - name: Sandbox
    description: Create an isolated sandbox environment for testing. No auth required.
  - name: Customers
    description: Who you are billing. One customer can have multiple subscriptions.
  - name: Plans
    description: Plan groups and the plans within them. Customers subscribe to plans.
  - name: Subscriptions
    description: The recurring billing relationship between a customer and a plan.
  - name: Virtual Accounts
    description: Dedicated bank account numbers for customers who pay by transfer.
  - name: Invoices
    description: Created at each billing cycle. Tracks what a customer owes for a period.
  - name: Webhooks
    description: >-
      Register endpoints that receive signed, retried events. See Receiving
      webhooks.
  - name: Admin
    description: Test clock control, billing tick, and suspense resolution. Test-mode only.
paths:
  /sandbox/create:
    post:
      tags:
        - Sandbox
      summary: Create a sandbox
      description: >
        Provisions an isolated sandbox tenant pre-seeded with three plans
        (Starter, Pro, Max) and one test customer. Returns a private API key. No
        authentication required. The sandbox expires after 24 hours.
      operationId: create-sandbox
      responses:
        '201':
          description: Sandbox created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxResult'
              example:
                object: sandbox
                tenant_id: ten_01JXYZ...
                api_key: sk_test_a1b2c3d4e5f6...
                expires_at: '2026-06-19T12:00:00Z'
                plans:
                  - id: pln_01JAA...
                    name: Starter
                    amount_minor: '200000'
                    currency: NGN
                    interval: month
                  - id: pln_01JAB...
                    name: Pro
                    amount_minor: '500000'
                    currency: NGN
                    interval: month
                  - id: pln_01JAC...
                    name: Max
                    amount_minor: '1200000'
                    currency: NGN
                    interval: month
                customer:
                  id: cus_01JAD...
                  name: Sandbox Customer
                  email: customer@sandbox.ng
      security: []
components:
  schemas:
    SandboxResult:
      type: object
      properties:
        object:
          type: string
          enum:
            - sandbox
        tenant_id:
          type: string
          example: ten_01JXYZ...
        api_key:
          type: string
          description: Your private API key. Store it — it cannot be retrieved again.
          example: sk_test_a1b2c3d4e5f6...
        expires_at:
          type: string
          format: date-time
          description: Sandbox tenants are automatically deleted after 24 hours.
        plans:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              amount_minor:
                type: string
              currency:
                type: string
              interval:
                type: string
        customer:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Use `sk_test_` keys for sandbox. Use `sk_live_` keys for production.
        Obtain your key from the dashboard.

````