Skip to main content
We strongly advise managing all plan operations (create, read, update, delete) through the Credibill dashboard instead of using the API. The dashboard provides a user-friendly interface for defining pricing structures, managing trials, and configuring complex pricing models. Use the API only when you need programmatic plan operations in exceptional cases.
Plans define the pricing structure, billing interval, and feature set for a subscription.

Plan Structure

A Plan consists of:
  • Name: A human-readable name for the plan (e.g., Pro Plan, Basic Plan).
  • Description: A brief description of what the plan offers.
  • Interval: How often the customer is billed (e.g., month, year).
  • Currency: The currency for the plan (e.g., UGX, KES).
  • Prices: The amount to be charged.
  • Trial Period: Optional free trial duration before billing starts.

Pricing Models

Credibill supports flexible pricing models:
  1. Flat Rate: A fixed amount per interval (e.g., UGX 10,000/month).
  2. Per Unit: Charged based on the number of units (e.g., UGX 5,000 per seat).
  3. Tiered: Different prices for different volume ranges (e.g., first 100 free, then UGX 100/unit).
  4. Usage-Based: Metered billing based on reported usage (e.g., UGX 1 per API call).
Note: Features can be defined within your application and not Credibill.

How to create a plan

Create a new plan with pricing and billing configuration. This endpoint allows you to define how customers are charged when subscribed to this plan.
  • Endpoint: https://giant-goldfish-922.convex.site/api/v1/plans
  • Method: POST
  • Authentication: Authorization: Bearer <CREDIBILL_API_KEY>

Request Body Schema

Examples

Usage in a Component

Response

When you create a plan, the API responds with the newly created plan’s ID.

Getting your app’s plans

Retrieve all plans configured for your application. This endpoint returns a list of all available plans that customers can subscribe to.
  • Endpoint: https://giant-goldfish-922.convex.site/api/v1/plans
  • Method: GET
  • Authentication: Authorization: Bearer <CREDIBILL_API_KEY>

Examples

Usage in a Component

Response

When you fetch your app’s plans, the API responds with a list of all configured plans.

How to update a plan

Update an existing plan’s configuration. You can modify the name, description, price, trial period, and other plan attributes.
  • Endpoint: https://giant-goldfish-922.convex.site/api/v1/plans
  • Method: PATCH
  • Authentication: Authorization: Bearer <CREDIBILL_API_KEY>

Request Body Schema

Examples

Usage in a Component

Response

When you update a plan, the API responds with a success message.

How to delete a plan

Delete a plan from your application. This action removes the plan and prevents new subscriptions from being created with this plan. Existing subscriptions are not affected.
  • Endpoint: https://giant-goldfish-922.convex.site/api/v1/plans/delete
  • Method: DELETE
  • Authentication: Authorization: Bearer <CREDIBILL_API_KEY>

Query Parameters

Examples

Usage in a Component

Response

When you delete a plan, the API responds with a success message.