BLNG Billing API

REST API that manages BLNG payment and billing — listing Stripe products and prices, creating Stripe checkout sessions and customer-portal sessions, confirming checkout, and submitting enterprise "contact sales" inquiries. Also declares three Stripe webhook receivers for checkout completion and subscription update/delete. The product catalog endpoint answers unauthenticated.

Operations 5

POST /billing/requestEnterprise Submit an enterprise "Contact Sales" inquiry
GET /billing/products Retrieve available products and their prices
POST /billing/createCheckoutSession Create Stripe's checkout session (aka as payment link)
POST /billing/createCustomerPortal Create a link to customer's billing portal
POST /billing/confirmCheckout/{stripeCheckoutSessionId} Confirm Stripe Checkout Session

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/blng-billing-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

blng-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Api Billing API
  description: Api to manage user's payment and billing
  version: 1.0.0
servers:
- url: https://billing.blng.ai
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Billing
paths:
  /billing/requestEnterprise:
    post:
      tags:
      - Billing
      summary: Submit an enterprise "Contact Sales" inquiry
      security:
      - cognitoUserAuth:
        - openid
      description: Submits an authenticated in-app enterprise inquiry to the HubSpot form, which owns the Enterprise/Teams/Solo routing and acknowledgment emails. Off prod the HubSpot form is not configured, so the submission is accepted and skipped (the email/Sheet backup still records it).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - environment
              - firstName
              - lastName
              - workEmail
              - website
              - designTeamSize
              - procurement
              properties:
                environment:
                  type: string
                  description: Origin environment of the submission
                  example: prod
                firstName:
                  type: string
                  example: Ada
                lastName:
                  type: string
                  example: Lovelace
                workEmail:
                  type: string
                  format: email
                  example: ada@example.com
                website:
                  type: string
                  maxLength: 2048
                  example: example.com
                designTeamSize:
                  type: string
                  enum:
                  - '1'
                  - 2-5
                  - 6-10
                  - 11-15
                  - 16-25
                  - 26-50
                  - 51+
                  example: 6-10
                procurement:
                  type: string
                  enum:
                  - 'Yes'
                  - 'No'
                  - Sometimes
                  example: 'No'
      responses:
        '201':
          description: Submission accepted (submitted to HubSpot on prod, skipped off prod)
          content:
            application/json:
              schema:
                type: object
                properties:
                  submitted:
                    type: boolean
                    example: true
        '400':
          description: Missing or invalid request body
        '401':
          description: Unauthenticated
        '500':
          description: The HubSpot form submit failed
  /billing/products:
    get:
      tags:
      - Billing
      summary: Retrieve available products and their prices
      description: Fetches active products along with their associated prices from Stripe.
      responses:
        '200':
          description: Successfully retrieved products and prices
          content:
            application/json:
              schema:
                type: object
                properties:
                  productData:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the product
                          example: prod_12345
                        name:
                          type: string
                          description: Product name
                          example: Premium Subscription
                        metadata:
                          type: object
                          description: Additional metadata associated with the product
                        prices:
                          type: array
                          items:
                            $ref: '#/components/schemas/Price'
        '500':
          description: Internal server error
  /billing/createCheckoutSession:
    post:
      tags:
      - Billing
      summary: Create Stripe's checkout session (aka as payment link)
      security:
      - cognitoUserAuth:
        - openid
      description: Generates a checkout session URL for subscribing to a tier plan. Requires the caller to be an OWNER or BILLING_ADMIN of the workspace owning the subscription.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutSessionRequest'
      responses:
        '200':
          description: Payment link for user to subscribe to tier plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: The generated URL for the checkout session
                    example: https://checkout.stripe.com/session/abc123
        '400':
          description: Invalid request parameters
        '403':
          description: Caller is not linked to the subscription or lacks the OWNER/BILLING_ADMIN role
        '500':
          description: Internal server error
  /billing/createCustomerPortal:
    post:
      tags:
      - Billing
      summary: Create a link to customer's billing portal
      security:
      - cognitoUserAuth:
        - openid
      description: Generates a customer portal session link allowing users to manage their subscription and payment settings. Requires the caller to be an OWNER or BILLING_ADMIN of the workspace owning the subscription.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerPortalRequest'
      responses:
        '200':
          description: Successfully created customer portal session
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: The generated URL for the customer portal session
                    example: https://billing.stripe.com/session/abc123
        '400':
          description: Invalid request parameters
        '403':
          description: Caller is not linked to the subscription or lacks the OWNER/BILLING_ADMIN role
        '404':
          description: Subscription not found
        '500':
          description: Internal server error
  /billing/confirmCheckout/{stripeCheckoutSessionId}:
    post:
      tags:
      - Billing
      summary: Confirm Stripe Checkout Session
      security:
      - cognitoUserAuth:
        - openid
      description: Uses Stripe Checkout Session ID to confirm the checkout. Called in addition to the webhook for redundancy. Requires the caller to be an OWNER or BILLING_ADMIN of the workspace owning the subscription.
      parameters:
      - name: stripeCheckoutSessionId
        in: path
        required: true
        description: The Stripe Checkout Session ID
        schema:
          type: string
      responses:
        '200':
          description: Successfully confirmed the checkout session
          content:
            application/json:
              schema:
                type: object
                properties:
                  received:
                    type: boolean
                    description: Indicates whether the checkout session was processed
                    example: true
        '400':
          description: No stripeCheckoutSessionId was provided
        '403':
          description: Caller is not linked to the subscription or lacks the OWNER/BILLING_ADMIN role
        '404':
          description: Checkout session not found
        '500':
          description: Failed to process the checkout session
components:
  schemas:
    CreateCheckoutSessionRequest:
      type: object
      properties:
        quantity:
          type: integer
          description: Quantity of the subscription item
          example: 1
        email:
          type: string
          format: email
          description: Customer's email address
          example: xxxx@gmail.com
        subscriptionId:
          type: string
          description: The ID of the subscription
          example: subId
        priceId:
          type: string
          description: The Stripe price ID for the subscription tier
          example: priceId
        callback:
          type: object
          description: Callback URLs for redirecting after success or failure
          properties:
            successUrl:
              type: string
              format: uri
              description: URL to redirect after a successful checkout
              example: http://localhost:3000/checkout/success?session_id={CHECKOUT_SESSION_ID}
            cancelUrl:
              type: string
              format: uri
              description: URL to redirect if the checkout is cancelled
              example: http://localhost:3000/dashboard
    CreateCustomerPortalRequest:
      type: object
      properties:
        subscriptionId:
          type: string
          description: The ID of the subscription
          example: subId-xxx
        callbackUrl:
          type: string
          format: uri
          description: URL to redirect the user after portal interaction
          example: http://localhost:3000/dashboard
    Price:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the price
          example: price_12345
  securitySchemes:
    cognitoUserAuth:
      type: oauth2
      description: Cognito authorization code flow for users
      flows:
        implicit:
          authorizationUrl: https://auth.app.blng.ai/oauth2/authorize
          scopes:
            email: email
            profile: profile
            openid: openid
            aws.cognito.signin.user.admin: aws.cognito.signin.user.admin