Skip to main content
Returns the checkout payload for a plan, or for a custom selection of features: the price for the chosen billing interval, the features with their limits, and the full link to your checkout. The pricing page calls this endpoint when a buyer clicks a plan. Your server can call it too, to price a purchase without trusting the query string. No authentication.

Endpoints

Path Parameters

string
required
The project’s Share ID

Query Parameters (GET)

number
required
Cuprice’s numeric plan ID: cuprice_plan_id in the checkout link, or pricingPlans[].id in the Share API. Only plans that are visible on the page are found.
string
default:"month"
month or year. Any other value counts as month.
string
Buyer email to carry through to the payload and the checkout link.

Body Parameters (POST)

array
required
The chosen features, as objects with a name that matches a feature in the project, for example [{ "name": "API calls" }]. Names that match no feature are left out of the price and of features.
object
Amounts for limit and usage-based features, keyed by feature name, for example { "API calls": 10000 }.
string
default:"month"
month or year. The custom plan card on the pricing page always sends month.
string
Buyer email to carry through to the payload and the checkout link.

Response

object
The plan, its features, the price breakdown, return URLs and metadata. Field by field in Checkout Flow.
string
Your checkout link with all query parameters added: the address a buyer is sent to.
string
redirect or postMessage, as set under Integration > Payment.
string
Always handoff.

Errors

Example: a plan

The response is trimmed. features entries also carry featureType, multiplier, basePrice and a pricing object.

Example: a custom plan

The response has the same shape. payload.plan.id is 0, payload.plan.isCustom is true, and payload.customPlan holds the selection: