Travel Risk API Billing API

Stripe checkout + webhook receiver.

Operations 4

GET /api/v1/billing/plans Available plans and credit packs #
POST /api/v1/billing/checkout Start a Stripe checkout to subscribe to starter/pro/enterprise #
POST /api/v1/billing/credits Start a Stripe checkout to buy prepaid credits #
POST /api/v1/billing/portal Open the Stripe customer portal (cancel, switch plan, update card) #

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/travel-risk-api:travel-risk-api-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

travel-risk-api-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Travel Risk Billing API
  description: Real-time travel advisories, disaster alerts, conflict events and composite country risk scores, aggregated from government and multilateral sources.
  contact:
    name: Travel Code
    email: api@travel-code.com
    url: https://travelriskapi.com
  version: 1.0.0
  summary: Government travel advisories, disaster and conflict alerts and country risk scores.
  x-logo:
    url: https://travelriskapi.com/assets/logo.png
    backgroundColor: '#FFFFFF'
    altText: Travel Risk API
servers:
- url: https://api.travelriskapi.com
  description: Production
security:
- ApiKeyHeader: []
tags:
- name: Billing
  description: Stripe checkout + webhook receiver.
paths:
  /api/v1/billing/plans:
    get:
      tags:
      - Billing
      summary: Available plans and credit packs
      description: Public pricing, so the dashboard and landing page never drift from Stripe.
      operationId: list_plans_api_v1_billing_plans_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security: []
  /api/v1/billing/checkout:
    post:
      tags:
      - Billing
      summary: Start a Stripe checkout to subscribe to starter/pro/enterprise
      description: 'Upgrade the calling key. Authenticated so a session can never be created

        for someone else''s key.'
      operationId: create_checkout_api_v1_billing_checkout_post
      parameters:
      - name: tier
        in: query
        required: true
        schema:
          type: string
          pattern: ^(starter|pro|enterprise)$
          title: Tier
      - name: success_url
        in: query
        required: false
        schema:
          type: string
          title: Success Url
      - name: cancel_url
        in: query
        required: false
        schema:
          type: string
          title: Cancel Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/billing/credits:
    post:
      tags:
      - Billing
      summary: Start a Stripe checkout to buy prepaid credits
      operationId: buy_credits_api_v1_billing_credits_post
      parameters:
      - name: price_id
        in: query
        required: true
        schema:
          type: string
          description: A price_id from /api/v1/billing/plans
          title: Price Id
        description: A price_id from /api/v1/billing/plans
      - name: success_url
        in: query
        required: false
        schema:
          type: string
          title: Success Url
      - name: cancel_url
        in: query
        required: false
        schema:
          type: string
          title: Cancel Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/billing/portal:
    post:
      tags:
      - Billing
      summary: Open the Stripe customer portal (cancel, switch plan, update card)
      operationId: billing_portal_api_v1_billing_portal_post
      parameters:
      - name: return_url
        in: query
        required: false
        schema:
          type: string
          title: Return Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your key from https://travelriskapi.com — free plan, no card.
externalDocs:
  description: Documentation
  url: https://travelriskapi.com/docs