Casama AI Payments API

The payments API from Casama AI, for payments.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v1/orgs/{id}/payments Get payment settings #
PUT /v1/orgs/{id}/payments Connect the workspace's card issuing account for single-use cards (owners) #
DELETE /v1/orgs/{id}/payments Delete payment settings #
GET /v1/orgs/{id}/payments/requests Cards bots asked for (owners see all; others their own) #

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/casama-ai:casama-ai-payments-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

casama-ai-payments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Payments API
  version: 0.1.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://api.casama.ai
tags:
- name: Payments
paths:
  /v1/orgs/{id}/payments:
    get:
      operationId: getPaymentSettings
      tags:
      - Payments
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSettings'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      summary: Get payment settings
      x-summary-source: derived
    put:
      operationId: setPaymentSettings
      tags:
      - Payments
      security:
      - bearerAuth: []
      summary: Connect the workspace's card issuing account for single-use cards (owners)
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPaymentSettingsRequest'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSettings'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    delete:
      operationId: deletePaymentSettings
      tags:
      - Payments
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSettings'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      summary: Delete payment settings
      x-summary-source: derived
  /v1/orgs/{id}/payments/requests:
    get:
      operationId: listPaymentRequests
      tags:
      - Payments
      security:
      - bearerAuth: []
      summary: Cards bots asked for (owners see all; others their own)
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequestList'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    PaymentRequestList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRequest'
      required:
      - items
    PaymentRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        bot_id:
          type: string
          format: uuid
        merchant:
          type: string
        amount_cents:
          type: integer
        currency:
          type: string
        reason:
          type: string
        status:
          type: string
          enum:
          - requested
          - issued
          - used
          - declined
          - expired
          - failed
          - canceled
        last4:
          type:
          - string
          - 'null'
        spent_cents:
          type:
          - integer
          - 'null'
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
      - id
      - bot_id
      - merchant
      - amount_cents
      - currency
      - reason
      - status
      - last4
      - spent_cents
      - expires_at
      - created_at
    SetPaymentSettingsRequest:
      type: object
      properties:
        secret_key:
          type: string
          minLength: 10
          maxLength: 300
        webhook_secret:
          type: string
          minLength: 10
          maxLength: 300
        cardholder:
          type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 100
            email:
              type: string
              format: email
            line1:
              type: string
              minLength: 1
              maxLength: 200
            city:
              type: string
              minLength: 1
              maxLength: 100
            state:
              type: string
              maxLength: 100
            postal_code:
              type: string
              minLength: 1
              maxLength: 20
            country:
              type: string
              minLength: 2
              maxLength: 2
          required:
          - name
          - email
          - line1
          - city
          - postal_code
          - country
        monthly_cap_usd:
          type: number
          minimum: 0
          maximum: 100000
        bot_monthly_cap_usd:
          type: number
          minimum: 0
          maximum: 100000
      required:
      - secret_key
      - webhook_secret
      - cardholder
    Problem:
      type: object
      properties:
        type:
          type: string
          example: https://casama.ai/problems/not_found
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: Stable error code
          example: not_found
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
            - path
            - message
          description: Field errors for validation_failed
      required:
      - type
      - title
      - status
      - code
    PaymentSettings:
      type: object
      properties:
        connected:
          type: boolean
        provider:
          type:
          - string
          - 'null'
          enum:
          - stripe
          - null
        monthly_cap_usd:
          type: number
        bot_monthly_cap_usd:
          type: number
        spent_this_month_usd:
          type: number
        webhook_url:
          type:
          - string
          - 'null'
      required:
      - connected
      - provider
      - monthly_cap_usd
      - bot_monthly_cap_usd
      - spent_this_month_usd
      - webhook_url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token