BTCPay Server Subscriptions API

Subscription operations

GitHub OpenAPI
Business capability
Subscription Lifecycle Management BC-4240

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/v1/stores/{storeId}/offerings/{offeringId} Get a subscription offering · Get an offering #
Ask an LLM
“What features and price does a particular subscription offering have?”
“Can I look up one offering by its ID?”
Tell an agent
Get offering {offering} in store {store}.
Show the details of subscription offering {offering} for store {store}.
PUT /api/v1/stores/{storeId}/offerings/{offeringId} Update a subscription offering · Update an offering #
Ask an LLM
“Can I rename a subscription offering or change its features?”
“Is it possible to update the success redirect URL on an offering?”
Tell an agent
Rename offering {offering} in store {store} to {name}.
Set the success redirect URL of offering {offering} in store {store} to {url}.
GET /api/v1/stores/{storeId}/offerings List subscription offerings · List offerings for a store #
Ask an LLM
“Which subscription offerings exist in my store?”
“Can I see all offerings for one store?”
Tell an agent
List all offerings in store {store}.
Show every subscription offering for store {store}.
POST /api/v1/stores/{storeId}/offerings Create a subscription offering · Create an offering #
Ask an LLM
“How do I create a new subscription offering for my store?”
“Can I set features and a success redirect when creating an offering?”
Tell an agent
Create offering {name} in store {store}.
Create offering {name} in store {store} with features {features} and redirect {url}.
POST /api/v1/stores/{storeId}/offerings/{offeringId}/plans Create a subscription plan · Create an offering plan #
Ask an LLM
“How do I add a monthly or yearly plan to an offering?”
“Can I set a trial period and price when creating a plan?”
Tell an agent
Create a {recurring} plan named {name} in offering {offering} for store {store}.
Add a {recurring} plan {name} to offering {offering} in store {store} priced at {price}.
GET /api/v1/stores/{storeId}/offerings/{offeringId}/plans/{planId} Get a subscription plan · Get an offering plan #
Ask an LLM
“What price and billing interval does a specific plan have?”
“Can I look up one plan by its ID?”
Tell an agent
Get plan {plan} of offering {offering} in store {store}.
Show the details of plan {plan} on offering {offering} for store {store}.
PUT /api/v1/stores/{storeId}/offerings/{offeringId}/plans/{planId} Update a subscription plan · Update an offering plan #
Ask an LLM
“Can I change the price or billing interval of an existing plan?”
“Is it possible to extend the trial period on a plan?”
Tell an agent
Change the price of plan {plan} on offering {offering} in store {store} to {price}.
Set the trial period of plan {plan} on offering {offering} in store {store} to {days} days.
GET /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector} Get a subscription subscriber · Get a subscriber #
Ask an LLM
“What plan is a particular customer subscribed to?”
“Can I look up a subscriber by email?”
Tell an agent
Get the subscriber {customer} on offering {offering} in store {store}.
Show which plan customer {customer} is subscribed to in offering {offering} for store {store}.
DELETE /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector} Cancel a subscription subscriber · Delete a subscriber #
Ask an LLM
“How do I cancel a customer's subscription?”
“Can I remove a subscriber from an offering entirely?”
Tell an agent destructive · confirm first
Delete subscriber {customer} from offering {offering} in store {store}.
Cancel the subscription of customer {customer} on offering {offering} for store {store}.
GET /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector}/credits/{currency} Get a subscriber's credit balance · Get subscriber credit balance #
Ask an LLM
“How much credit does a subscriber have left?”
“Can I check a customer's credit balance in a specific currency?”
Tell an agent
Get the credit balance of subscriber {customer} on offering {offering} in store {store} in {currency}.
Show how many {currency} customer {customer} has left on offering {offering} in store {store}.
POST /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector}/credits/{currency} Add or charge a subscriber's credit · Update subscriber credit balance #
Ask an LLM
“How do I add credit to a subscriber's balance?”
“Can I charge a customer's credit for a plan?”
Tell an agent
Add {credit} credit to subscriber {customer} on offering {offering} in store {store} in {currency}.
Charge {charge} from customer {customer}'s credit on offering {offering} in store {store} in {currency}.
POST /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector}/suspend Suspend a subscriber · Suspend a subscriber #
Ask an LLM
“How do I temporarily suspend a customer's subscription?”
“Can I suspend a subscriber with a reason?”
Tell an agent
Suspend subscriber {customer} on offering {offering} in store {store}.
Suspend customer {customer} on offering {offering} in store {store} because {reason}.
POST /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector}/unsuspend Reactivate a suspended subscriber · Unsuspend a subscriber #
Ask an LLM
“How do I lift the suspension on a subscriber?”
“Can I reactivate a suspended customer's subscription?”
Tell an agent
Unsuspend subscriber {customer} on offering {offering} in store {store}.
Reactivate the suspended subscription of customer {customer} on offering {offering} for store {store}.
PUT /api/v1/stores/{storeId}/offerings/{offeringId}/subscribers/{customerSelector}/dates Override a subscriber's dates · Update subscriber dates #
Ask an LLM
“Can I change a subscriber's start or end date manually?”
“What happens to the grace period when I extend a subscription?”
Tell an agent
Set the subscription of customer {customer} on offering {offering} in store {store} to end on {date}.
Move the start date of customer {customer}'s subscription on offering {offering} in store {store} to {date}.
GET /api/v1/plan-checkout/{checkoutId} Get a plan checkout session · Get a plan checkout #
Ask an LLM
“What are the details of a plan checkout session?”
“Can I look up a plan checkout by its ID?”
Tell an agent
Get plan checkout {checkout}.
Show the details of plan checkout session {checkout}.
POST /api/v1/plan-checkout/{checkoutId} Complete a plan checkout · Proceed with a plan checkout #
Ask an LLM
“How do I finish a plan checkout and start the subscription?”
“What happens if a customer pays during a plan checkout?”
Tell an agent
Proceed with plan checkout {checkout}.
Complete plan checkout {checkout} for email {email}.
POST /api/v1/plan-checkout Create a plan checkout session · Create a plan checkout session #
Ask an LLM
“How do I start a checkout for a specific plan?”
“Can I create a plan checkout for a customer who doesn't exist yet?”
Tell an agent
Create a plan checkout for plan {plan} of offering {offering} in store {store}.
Create a plan checkout for customer {customer} on offering {offering} in store {store}.
POST /api/v1/subscriber-portal Create a subscriber portal session · Create a subscriber portal session #
Ask an LLM
“How do I give a subscriber a link to manage their subscription?”
“Can I create a portal session that expires after a set time?”
Tell an agent
Create a subscriber portal session for customer {customer} on offering {offering} in store {store}.
Create a portal session for offering {offering} in store {store} that lasts {minutes} minutes.
GET /api/v1/subscriber-portal/{portalSessionId} Get a subscriber portal session · Get a subscriber portal session #
Ask an LLM
“What are the details of an existing subscriber portal session?”
“Can I look up a portal session by its ID?”
Tell an agent
Get subscriber portal session {portal}.
Show the details of portal session {portal}.

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/btcpay:btcpay-subscriptions-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

btcpay-subscriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BTCPay Greenfield Subscriptions API
  version: v1
  description: '# Introduction


    The BTCPay Server Greenfield API is a REST API. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.


    # Authentication


    You can authenticate either via Basic Auth or an API key. It''s recommended to use an API key for better security. You can create an API key in the BTCPay Server UI under `Account` -> `Manage Account` -> `API keys`. You can restrict the API key for one or multiple stores and for specific permissions. For testing purposes, you can give it the ''Unrestricted access'' permission. On production you should limit the permissions to the actual endpoints you use, you can see the required permission on the API docs at the top of each endpoint under `AUTHORIZATIONS`.


    If you want to simplify the process of creating API keys for your users, you can use the Authorization endpoint to predefine permissions and redirect your users to the BTCPay Server Authorization UI. You can find more information about this on the API Authorization Flow docs page.


    # Usage examples


    Use **Basic Auth** to read store information with cURL:

    ```bash

    BTCPAY_INSTANCE="https://mainnet.demo.btcpayserver.org"

    USER="MyTestUser@gmail.com"

    PASSWORD="notverysecurepassword"

    PERMISSION="btcpay.store.canmodifystoresettings"

    BODY="$(echo "{}" | jq --arg "a" "$PERMISSION" ''. + {permissions:[$a]}'')"


    API_KEY="$(curl -s \

    -H "Content-Type: application/json" \

    --user "$USER:$PASSWORD" \

    -X POST \

    -d "$BODY" \

    "$BTCPAY_INSTANCE/api/v1/api-keys" | jq -r .apiKey)"

    ```


    Use an **API key** to read store information with cURL:

    ```bash

    STORE_ID="yourStoreId"


    curl -s \

    -H "Content-Type: application/json" \

    -H "Authorization: token $API_KEY" \

    -X GET \

    "$BTCPAY_INSTANCE/api/v1/stores/$STORE_ID"

    ```


    You can find more examples on our docs for different programming languages:

    - cURL

    - Javascript/Node.Js

    - PHP'
  contact:
    name: BTCPay Server
    url: https://btcpayserver.org
  license:
    name: MIT
    url: https://github.com/btcpayserver/btcpayserver/blob/master/LICENSE
servers:
- url: /
  description: BTCPay Server Greenfield API
security:
- API_Key: []
  Basic: []
tags:


# --- truncated at 32 KB (61 KB total) ---
# Full source: https://artifacts.apis.io/btcpay/openapi/btcpay-subscriptions-api-openapi.yml