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

# Create a test account

> Instantly creates a sandbox account, with a starter product and `sk_test_` and `pk_test_` keys in the response, no login needed. Keep the response: the secret key is not shown again, and keys are never emailed. To keep the account, open `claimUrl` and sign in to Infi before `expiresAt`.
`email` is optional and unverified: it is only a contact. If sent, it asynchronously receives a notice with the claim link and deadline (at most one per address every 24 hours). A `201` confirms creation, not email delivery.




## OpenAPI

````yaml /api-reference/openapi.en.json post /public/v1/claimables
openapi: 3.1.0
info:
  title: Infi API
  version: 0.0.1
  description: >
    The Infi REST API: catalog, customers, usage metering, subscriptions,

    invoices, payments and checkout.


    **Authentication.** Send your secret key as `Authorization: Bearer
    sk_test_…`

    (sandbox) or `sk_live_…` (production). The key prefix selects the
    environment.

    Checkout routes (`/pay/*`) and `/public/*` take no key: they run in the

    payer's browser.


    **Idempotency.** Every request that changes data requires an

    `Idempotency-Key` header. A retry with the same key returns the original

    response instead of running again.


    **Amounts.** Money and quantities travel as decimal strings (`"150.00"`,

    `"0.0001"`), never as floating-point numbers.


    **Errors.** The body carries `error_code` (stable, branch on it), `message`

    (for humans) and `tracer_id` (send it to support). Rate-limit and
    idempotency

    errors are nested under `error`, with `code` and `request_id`.
servers:
  - url: https://api-sandbox.beinfi.com
    description: Sandbox
  - url: https://api.beinfi.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Catalog
  - name: Customers
  - name: Metering
  - name: Subscriptions
  - name: Invoices
  - name: Payments
  - name: Checkout
  - name: Coupons
  - name: Billing
  - name: Account
  - name: Webhooks
  - name: Test account
  - name: Rail
  - name: Storefronts
paths:
  /public/v1/claimables:
    post:
      tags:
        - Test account
      summary: Create a test account
      description: >
        Instantly creates a sandbox account, with a starter product and
        `sk_test_` and `pk_test_` keys in the response, no login needed. Keep
        the response: the secret key is not shown again, and keys are never
        emailed. To keep the account, open `claimUrl` and sign in to Infi before
        `expiresAt`.

        `email` is optional and unverified: it is only a contact. If sent, it
        asynchronously receives a notice with the claim link and deadline (at
        most one per address every 24 hours). A `201` confirms creation, not
        email delivery.
      operationId: createClaimable
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                ref:
                  type: string
                  enum:
                    - lovable
                    - mcp
                    - cursor
                    - cli
                  description: >-
                    Where the account came from: `lovable`, `mcp`, `cursor` or
                    `cli`.
                accountName:
                  type: string
                  maxLength: 120
                  description: >-
                    Business name, optional. Does not change the account
                    identifier, which is random.
                email:
                  type: string
                  format: email
                  maxLength: 254
                  description: >-
                    Optional, unverified contact for the claim notice. Without
                    it, no email is sent.
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestAccountCreated'
          description: Test account created.
        '422':
          $ref: '#/components/responses/ValidationFailed'
      security: []
components:
  schemas:
    TestAccountCreated:
      type: object
      required:
        - id
        - status
        - tenantSlug
        - productId
        - apiKeySecret
        - publishableKey
        - accountName
        - claimUrl
        - expiresAt
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Test account ID. Use it with `GET
            /public/v1/claimables/{claimableID}`.
        status:
          type: string
          enum:
            - UNCLAIMED
            - CLAIMED
          description: '`UNCLAIMED` until someone claims the account; then `CLAIMED`.'
        tenantSlug:
          type: string
          description: >-
            The account's public identifier, used in checkout URLs. It is
            random.
        accountName:
          type: string
          description: The business name sent at creation.
        productId:
          type: string
          format: uuid
          description: >-
            The starter product. Not sellable yet: publish a version with a
            price first.
        apiKeySecret:
          type: string
          description: The `sk_test_` key. Shown only this once.
        publishableKey:
          type: string
          description: >-
            The `pk_test_` key. Reserved: no route accepts it today. The
            embedded checkout needs no key; the payment link token is enough.
        claimUrl:
          type: string
          format: uri
          description: >-
            Open it and sign in to Infi to keep the account, e.g.
            `https://app-sandbox.beinfi.com/claim/{id}`.
        expiresAt:
          type: string
          format: date-time
          description: >-
            Claim deadline, 30 days after creation. After it, the unclaimed
            account expires and the `sk_test_` key is revoked.
      description: The created test account and its credentials. Keep the whole response.
    ValidationError:
      type: object
      required:
        - message
        - error_code
        - tracer_id
        - errors
      properties:
        message:
          type: string
        error_code:
          $ref: '#/components/schemas/ErrorCode'
        tracer_id:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - field
              - value
              - constraint
              - description
            properties:
              field:
                type: string
              value:
                type: string
              constraint:
                type: string
              description:
                type: string
          description: >-
            Per-field detail (`field`, `description`). Always present on a
            `422`; may be empty.
      description: >-
        Body of a `422`. Same shape as `Error`, plus `errors[]` with per-field
        detail. That is where the sentence telling you what to fix lives (for
        example, "product has no published version").
    ErrorCode:
      type: string
      examples:
        - internal_error
        - validation_failed
        - bad_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - rate_limited
      description: >-
        Stable error code. The list is open: besides the generic codes, each
        area defines its own (`coupon_expired`, `insufficient_balance`,
        `version_not_draft`, `idempotency_key_reused`…). Handle a code you do
        not recognize by its HTTP status and show `message`; do not fail parsing
        the response.
  responses:
    ValidationFailed:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
      description: One or more fields are invalid. Per-field detail is in `errors[]`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your account's secret key: `Authorization: Bearer sk_test_…` or
        `sk_live_…`. Server-side only.

````