MarketIntell Billing API

Stripe billing, subscriptions, and customer portal

GitHub OpenAPI

Operations 4

POST /v1/billing/checkout Create Stripe checkout session #
POST /v1/billing/webhook Stripe webhook #
POST /v1/billing/portal Customer portal session #
GET /v1/billing/status Subscription status #

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/marketintell-ai:marketintell-ai-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

marketintell-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MarketIntell Billing API
  version: 0.1.0
  description: 'AI-powered market intelligence with tier-aware Mastra agents and a deterministic analytical pipeline across crypto, US equities, and India stocks. REST, MCP, OpenAI-compatible, async workflow, and batch transports share one evidence/provenance/recovery contract.


    **Rate limits (per minute / per day):**

    - Free: 60 / 25

    - Builder: 120 / 50,000

    - Pro: 300 / 2,000

    - Enterprise: 1,000 / unlimited


    MCP has a separate per-key bucket (default 30/min, env `MCP_RATE_LIMIT_MAX`). 429 responses include `Retry-After` and machine-readable recovery fields.


    **Self-registration (agents):** `POST /v1/auth/challenge` returns a SHA-256 proof-of-work challenge; submit the solved nonce to `POST /v1/auth/signup`. Follow `/.well-known/oauth-protected-resource` to the authorization-server `agent_auth` block, or read `/auth.md`.'
  contact:
    name: MarketIntell
    email: support@marketintell.ai
    url: https://marketintell.ai/contact
  license:
    name: Proprietary
    url: https://marketintell.ai/terms
  termsOfService: https://marketintell.ai/terms
  x-api-lifecycle:
    stability: stable
    versioning: Major versions are encoded in the URL path (currently /v1). Additive fields do not change the major version.
    deprecation_notice_days: 90
    deprecation_header: Deprecation (RFC 9745)
    sunset_header: Sunset (RFC 8594)
    migration_link_relation: successor-version
servers:
- url: https://api.marketintell.ai
  description: Production
- url: http://localhost:3848
  description: Local development
security:
- BearerAuth: []
- ApiKeyHeader: []
tags:
- name: Billing
  description: Stripe billing, subscriptions, and customer portal
paths:
  /v1/billing/checkout:
    post:
      operationId: postBillingCheckout
      summary: Create Stripe checkout session
      tags:
      - Billing
      description: Create a Stripe Checkout session for the requested paid tier (Builder or Pro). See `lib/plans.ts` for the canonical price list.
      responses:
        '200':
          description: Checkout session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      checkout_url:
                        type: string
                        format: uri
                      session_id:
                        type: string
        '500':
          description: Failed to create checkout session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/billing/webhook:
    post:
      operationId: postBillingWebhook
      summary: Stripe webhook
      tags:
      - Billing
      security: []
      description: Stripe webhook endpoint. Verifies signature, processes subscription events. Do not call directly.
      responses:
        '200':
          description: Webhook processed
          content:
            application/json:
              schema:
                type: object
                required:
                - received
                properties:
                  received:
                    type: boolean
                    enum:
                    - true
        '400':
          description: Invalid signature or payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/billing/portal:
    post:
      operationId: postBillingPortal
      summary: Customer portal session
      tags:
      - Billing
      description: Create a Stripe Customer Portal session for managing subscription, payment methods, and invoices.
      responses:
        '200':
          description: Portal session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      portal_url:
                        type: string
                        format: uri
        '500':
          description: Failed to create portal session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/billing/status:
    get:
      operationId: getBillingStatus
      summary: Subscription status
      tags:
      - Billing
      description: Get the current user's subscription status, plan tier, and billing details.
      responses:
        '200':
          description: Subscription status
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      tier:
                        type: string
                        enum:
                        - free
                        - pro
                      status:
                        type: string
                        enum:
                        - active
                        - cancelled
                        - past_due
                        - none
                      current_period_end:
                        type: string
                        format: date-time
                        nullable: true
                      cancel_at_period_end:
                        type: boolean
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
      - success
      - error
      properties:
        success:
          type: boolean
          enum:
          - false
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Stable machine-readable error code, when present
        request_id:
          type: string
          description: Correlation id from the X-Request-ID header
        retry_after_ms:
          type: integer
          description: Suggested back-off for 429 responses (mirrors the Retry-After header in ms)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key