Insforge Stripe Payments API

Stripe Checkout, Billing Portal, catalog, sync, customer, subscription, and transaction routes

Operations 23

POST /api/payments/stripe/{environment}/checkout-sessions Create Stripe Checkout Session
POST /api/payments/stripe/{environment}/customer-portal-sessions Create Stripe Customer Portal Session
GET /api/payments/stripe/status Get Stripe Payments Status
GET /api/payments/stripe/config Get Stripe Key Configuration
PUT /api/payments/stripe/{environment}/config Configure Stripe Secret Key
DELETE /api/payments/stripe/{environment}/config Remove Stripe Secret Key
POST /api/payments/stripe/sync Sync Stripe Payments State
POST /api/payments/stripe/{environment}/sync Sync Stripe Payments State For One Environment
POST /api/payments/stripe/{environment}/webhook Configure Managed Stripe Webhook
GET /api/payments/stripe/{environment}/catalog List Stripe Catalog
GET /api/payments/stripe/{environment}/catalog/products List Stripe Products
POST /api/payments/stripe/{environment}/catalog/products Create Stripe Product
GET /api/payments/stripe/{environment}/catalog/products/{productId} Get Stripe Product
PATCH /api/payments/stripe/{environment}/catalog/products/{productId} Update Stripe Product
DELETE /api/payments/stripe/{environment}/catalog/products/{productId} Delete Stripe Product
GET /api/payments/stripe/{environment}/catalog/prices List Stripe Prices
POST /api/payments/stripe/{environment}/catalog/prices Create Stripe Price
GET /api/payments/stripe/{environment}/catalog/prices/{priceId} Get Stripe Price
PATCH /api/payments/stripe/{environment}/catalog/prices/{priceId} Update Stripe Price
DELETE /api/payments/stripe/{environment}/catalog/prices/{priceId} Archive Stripe Price
GET /api/payments/stripe/{environment}/subscriptions List Stripe Subscriptions
GET /api/payments/stripe/{environment}/customers List Stripe Customers
GET /api/payments/stripe/{environment}/transactions List Stripe Transactions

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/insforge-stripe-payments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

insforge-stripe-payments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Insforge AI Admin Stripe Payments API
  version: 1.0.0
  description: Model Gateway helper APIs for OpenRouter key provisioning, model discovery, and deprecated compatibility proxy routes
servers:
- url: https://api.insforge.dev
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Stripe Payments
  description: Stripe Checkout, Billing Portal, catalog, sync, customer, subscription, and transaction routes
paths:
  /api/payments/stripe/{environment}/checkout-sessions:
    post:
      summary: Create Stripe Checkout Session
      description: Create a local checkout attempt with the caller's user context and then create a Stripe Checkout Session. Subscription mode requires a billing subject.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutSessionBody'
            example:
              mode: subscription
              lineItems:
              - priceId: price_123
                quantity: 1
              successUrl: https://app.example.com/billing/success
              cancelUrl: https://app.example.com/billing/cancel
              subject:
                type: team
                id: team_123
              customerEmail: buyer@example.com
              idempotencyKey: checkout-team_123-pro
      responses:
        '201':
          description: Checkout Session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckoutSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /api/payments/stripe/{environment}/customer-portal-sessions:
    post:
      summary: Create Stripe Customer Portal Session
      description: Create a Stripe Billing Portal Session for an authenticated user's mapped billing subject.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerPortalSessionBody'
            example:
              subject:
                type: team
                id: team_123
              returnUrl: https://app.example.com/billing
      responses:
        '201':
          description: Customer Portal Session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerPortalSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /api/payments/stripe/status:
    get:
      summary: Get Stripe Payments Status
      description: Return Stripe connection, sync, and managed webhook status for each environment.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      responses:
        '200':
          description: Stripe payments status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripeStatusResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/config:
    get:
      summary: Get Stripe Key Configuration
      description: Return masked Stripe key configuration for test and live environments.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      responses:
        '200':
          description: Stripe key configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripeConfigResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/config:
    put:
      summary: Configure Stripe Secret Key
      description: Validate and store a Stripe secret key. New Stripe accounts attempt managed webhook setup and then run a unified sync.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertStripeConfigBody'
            example:
              secretKey: sk_test_xxx
      responses:
        '200':
          description: Updated Stripe key configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripeConfigResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    delete:
      summary: Remove Stripe Secret Key
      description: Remove the configured Stripe secret key for one environment and best-effort remove managed webhook endpoints.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      responses:
        '200':
          description: Updated Stripe key configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripeConfigResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/payments/stripe/sync:
    post:
      summary: Sync Stripe Payments State
      description: Sync products, prices, customers, and subscriptions for every configured Stripe environment. Stripe remains the source of truth.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      responses:
        '200':
          description: Sync result for configured environments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncStripePaymentsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/sync:
    post:
      summary: Sync Stripe Payments State For One Environment
      description: Sync products, prices, customers, and subscriptions for one Stripe environment. Stripe remains the source of truth.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      responses:
        '200':
          description: Sync result for the requested environment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncStripePaymentsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/webhook:
    post:
      summary: Configure Managed Stripe Webhook
      description: Create or recreate the InsForge-managed Stripe webhook endpoint for one environment.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      responses:
        '200':
          description: Managed webhook configuration result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigureStripeWebhookResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/catalog:
    get:
      summary: List Stripe Catalog
      description: Return mirrored Stripe products and prices for one environment.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      responses:
        '200':
          description: Synced Stripe products and prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStripeCatalogResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/catalog/products:
    get:
      summary: List Stripe Products
      description: List mirrored Stripe products for one environment.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      responses:
        '200':
          description: Stripe products
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStripeProductsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      summary: Create Stripe Product
      description: Create a Stripe product in the requested environment, then mirror it locally after Stripe succeeds.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStripeProductBody'
            example:
              name: Pro Plan
              description: Monthly access to Pro features
              active: true
              metadata:
                tier: pro
              idempotencyKey: product-pro-plan
      responses:
        '201':
          description: Product created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutateStripeProductResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/catalog/products/{productId}:
    get:
      summary: Get Stripe Product
      description: Get one mirrored Stripe product and its associated prices.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/ProductIdPath'
      responses:
        '200':
          description: Product and prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripeProductResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Update Stripe Product
      description: Update a Stripe product, then mirror it locally after Stripe succeeds.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/ProductIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStripeProductBody'
            example:
              name: Pro Plan
              active: true
      responses:
        '200':
          description: Product updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutateStripeProductResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Delete Stripe Product
      description: Delete a Stripe product from one environment, then remove it from the local mirror.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/ProductIdPath'
      responses:
        '200':
          description: Product deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteStripeProductResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/payments/stripe/{environment}/catalog/prices:
    get:
      summary: List Stripe Prices
      description: List mirrored Stripe prices for one environment, optionally filtered by product.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - name: productId
        in: query
        required: false
        schema:
          type: string
          minLength: 1
        description: Filter prices by Stripe product ID.
        example: prod_123
      responses:
        '200':
          description: Stripe prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStripePricesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      summary: Create Stripe Price
      description: Create a Stripe price in the requested environment, then mirror it locally after Stripe succeeds.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStripePriceBody'
            example:
              productId: prod_123
              currency: usd
              unitAmount: 2900
              recurring:
                interval: month
                intervalCount: 1
              lookupKey: pro_monthly
              idempotencyKey: price-pro-monthly
      responses:
        '201':
          description: Price created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutateStripePriceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/catalog/prices/{priceId}:
    get:
      summary: Get Stripe Price
      description: Get one mirrored Stripe price.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/PriceIdPath'
      responses:
        '200':
          description: Price
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStripePriceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      summary: Update Stripe Price
      description: Update mutable Stripe price fields, then mirror the price locally after Stripe succeeds.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/PriceIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStripePriceBody'
            example:
              active: true
              lookupKey: pro_monthly
      responses:
        '200':
          description: Price updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutateStripePriceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Archive Stripe Price
      description: Archive a Stripe price in one environment, then mirror the archived state locally.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/PriceIdPath'
      responses:
        '200':
          description: Price archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveStripePriceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/payments/stripe/{environment}/subscriptions:
    get:
      summary: List Stripe Subscriptions
      description: Admin/debug read for mirrored Stripe subscriptions. Use app-owned tables with RLS for end-user payment state.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/SubjectTypeQuery'
      - $ref: '#/components/parameters/SubjectIdQuery'
      - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: Stripe subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStripeSubscriptionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/customers:
    get:
      summary: List Stripe Customers
      description: Admin/debug read for mirrored Stripe customers. This is a display mirror only and should not replace app-owned billing tables.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: Stripe customers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentCustomersResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/payments/stripe/{environment}/transactions:
    get:
      summary: List Stripe Transactions
      description: Admin/debug read for InsForge's Stripe transaction projection. Use app-owned fulfillment tables with RLS for end-user order, credit, or entitlement state.
      tags:
      - Stripe Payments
      security:
      - bearerAuth: []
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/EnvironmentPath'
      - $ref: '#/components/parameters/SubjectTypeQuery'
      - $ref: '#/components/parameters/SubjectIdQuery'
      - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: Stripe transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentTransactionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CustomerPortalSession:
      type: object
      required:
      - id
      - environment
      - status
      - subjectType
      - subjectId
      - customerId
      - returnUrl
      - configuration
      - url
      - lastError
      - createdAt
      - updatedAt
      properties:
        id:
          type: string
          format: uuid
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        status:
          $ref: '#/components/schemas/CustomerPortalSessionStatus'
        subjectType:
          type: string
        subjectId:
          type: string
        customerId:
          type:
          - string
          - 'null'
          example: cus_123
        returnUrl:
          type:
          - string
          - 'null'
          example: https://app.example.com/billing
        configuration:
          type:
          - string
          - 'null'
        url:
          type:
          - string
          - 'null'
          example: https://billing.stripe.com/p/session/test_123
        lastError:
          type:
          - string
          - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    StripeEnvironment:
      $ref: '#/components/schemas/PaymentEnvironment'
    CheckoutSession:
      type: object
      required:
      - id
      - environment
      - mode
      - status
      - paymentStatus
      - subjectType
      - subjectId
      - customerEmail
      - checkoutSessionId
      - customerId
      - paymentIntentId
      - subscriptionId
      - url
      - lastError
      - createdAt
      - updatedAt
      properties:
        id:
          type: string
          format: uuid
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        mode:
          $ref: '#/components/schemas/CheckoutMode'
        status:
          $ref: '#/components/schemas/CheckoutSessionStatus'
        paymentStatus:
          allOf:
          - $ref: '#/components/schemas/CheckoutSessionPaymentStatus'
        subjectType:
          type:
          - string
          - 'null'
        subjectId:
          type:
          - string
          - 'null'
        customerEmail:
          type:
          - string
          - 'null'
          format: email
        checkoutSessionId:
          type:
          - string
          - 'null'
          example: cs_test_123
        customerId:
          type:
          - string
          - 'null'
          example: cus_123
        paymentIntentId:
          type:
          - string
          - 'null'
          example: pi_123
        subscriptionId:
          type:
          - string
          - 'null'
          example: sub_123
        url:
          type:
          - string
          - 'null'
          example: https://checkout.stripe.com/c/pay/cs_test_123
        lastError:
          type:
          - string
          - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    StripeSubscription:
      type: object
      required:
      - environment
      - subscriptionId
      - customerId
      - subjectType
      - subjectId
      - status
      - currentPeriodStart
      - currentPeriodEnd
      - cancelAtPeriodEnd
      - cancelAt
      - canceledAt
      - trialStart
      - trialEnd
      - latestInvoiceId
      - metadata
      - syncedAt
      - createdAt
      - updatedAt
      - items
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        subscriptionId:
          type: string
          example: sub_123
        customerId:
          type:
          - string
          - 'null'
          example: cus_123
        subjectType:
          type:
          - string
          - 'null'
        subjectId:
          type:
          - string
          - 'null'
        status:
          $ref: '#/components/schemas/StripeSubscriptionStatus'
        currentPeriodStart:
          type:
          - string
          - 'null'
          format: date-time
        currentPeriodEnd:
          type:
          - string
          - 'null'
          format: date-time
        cancelAtPeriodEnd:
          type: boolean
        cancelAt:
          type:
          - string
          - 'null'
          format: date-time
        canceledAt:
          type:
          - string
          - 'null'
          format: date-time
        trialStart:
          type:
          - string
          - 'null'
          format: date-time
        trialEnd:
          type:
          - string
          - 'null'
          format: date-time
        latestInvoiceId:
          type:
          - string
          - 'null'
          example: in_123
        metadata:
          $ref: '#/components/schemas/Metadata'
        syncedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/StripeSubscriptionItem'
    CreateStripePriceBody:
      type: object
      required:
      - productId
      - currency
      - unitAmount
      additionalProperties: false
      properties:
        productId:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 3
          maxLength: 3
          example: usd
        unitAmount:
          type: integer
          minimum: 0
          example: 2900
        lookupKey:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 200
        active:
          type: boolean
        recurring:
          type: object
          additionalProperties: false
          required:
          - interval
          properties:
            interval:
              $ref: '#/components/schemas/StripePriceRecurringInterval'
            intervalCount:
              type: integer
              minimum: 1
        taxBehavior:
          $ref: '#/components/schemas/StripePriceTaxBehavior'
        metadata:
          $ref: '#/components/schemas/Metadata'
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 200
    SyncStripePaymentsResponse:
      type: object
      required:
      - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/SyncStripePaymentsEnvironmentResult'
    ArchiveStripePriceResponse:
      type: object
      required:
      - price
      - archived
      properties:
        price:
          $ref: '#/components/schemas/StripePrice'
        archived:
          type: boolean
    SyncStripePaymentsEnvironmentResult:
      type: object
      required:
      - environment
      - connection
      - subscriptions
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        connection:
          $ref: '#/components/schemas/StripeConnection'
        subscriptions:
          allOf:
          - $ref: '#/components/schemas/SyncStripePaymentsSubscriptionsSummary'
    CreateCheckoutSessionBody:
      type: object
      required:
      - mode
      - lineItems
      - successUrl
      - cancelUrl
      additionalProperties: false
      description: Metadata keys starting with insforge_ are reserved and rejected.
      properties:
        mode:
          $ref: '#/components/schemas/CheckoutMode'
        lineItems:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/CreateCheckoutSessionLineItem'
        successUrl:
          type: string
          format: uri
        cancelUrl:
          type: string
          format: uri
        subject:
          $ref: '#/components/schemas/BillingSubject'
        customerEmail:
          type:
          - string
          - 'null'
          format: email
        metadata:
          $ref: '#/components/schemas/Metadata'
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 200
    UpdateStripeProductBody:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          minLength: 1
        description:
          type:
          - string
          - 'null'
          maxLength: 5000
        active:
          type: boolean
        metadata:
          $ref: '#/components/schemas/Metadata'
      minProperties: 1
    CreateCheckoutSessionLineItem:
      type: object
      required:
      - priceId
      additionalProperties: false
      properties:
        priceId:
          type: string
          minLength: 1
          example: price_123
        quantity:
          type: integer
          minimum: 1
          maximum: 999
          default: 1
    SyncStripePaymentsSubscriptionsSummary:
      type: object
      required:
      - environment
      - synced
      - unmapped
      - deleted
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        synced:
          type: integer
          minimum: 0
        unmapped:
          type: integer
          minimum: 0
        deleted:
          type: integer
          minimum: 0
    StripeSubscriptionItem:
      type: object
      required:
      - environment
      - subscriptionItemId
      - subscriptionId
      - productId
      - priceId
      - quantity
      - metadata
      - createdAt
      - updatedAt
      properties:
        environment:
          $ref: '#/components/schemas/StripeEnvironment'
        subscriptionItemId:
          type: string
          example: si_123
        subscriptionId:
          type: string
          example: sub_123
        productId:
          type:
          - string
          - 'null'
          example: prod_123
        priceId:
          type:
          - string
          - 'null'
          example: price_123
        quantity:
          type:
          - integer
          - 'null'
          example: 1
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    BillingSubject:
      type: object
 

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/insforge/refs/heads/main/openapi/insforge-stripe-payments-api-openapi.yml