Billing Plans
curl --request GET \
--url https://api.example.com/api/billing/public/{shareId}import requests
url = "https://api.example.com/api/billing/public/{shareId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/billing/public/{shareId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/billing/public/{shareId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/billing/public/{shareId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/billing/public/{shareId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/billing/public/{shareId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPublic Endpoints
Billing Plans
Get plans and features for any project (public, no auth required)
GET
/
api
/
billing
/
public
/
{shareId}
Billing Plans
curl --request GET \
--url https://api.example.com/api/billing/public/{shareId}import requests
url = "https://api.example.com/api/billing/public/{shareId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/billing/public/{shareId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/billing/public/{shareId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/billing/public/{shareId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/billing/public/{shareId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/billing/public/{shareId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns all visible pricing plans with features for a project. This is the API that powers the billing widget (
data-cuprice-billing).
No authentication required — plan data is public.
string
required
The project’s Share ID (from the Cuprice dashboard after publishing).
Response
{
"project": {
"id": 42,
"name": "My SaaS",
"currency": "USD",
"handoffBaseUrl": "https://yoursite.com/checkout",
"handoffMethod": "redirect"
},
"plans": [
{
"id": 100,
"name": "Starter",
"description": "For individuals",
"monthlyPrice": 0,
"annualPrice": 0,
"isFree": true,
"isPopular": false,
"order": 0,
"features": [
{
"id": 1,
"name": "Projects",
"description": "Number of projects",
"included": true,
"limit": 3,
"isCountable": true,
"multiplier": 3
}
]
}
],
"annualDiscount": 0.2,
"annualDiscountEnabled": true
}
Rate limiting
60 requests per minute per IP address.Example
curl https://app.cuprice.io/api/billing/public/YOUR_SHARE_ID
const res = await fetch("https://app.cuprice.io/api/billing/public/YOUR_SHARE_ID");
const { plans, annualDiscount } = await res.json();
