Billing

Start an upgrade: a Stripe-hosted Checkout Session

Returns a hosted Checkout URL for one paid plan. Open url in a browser and pay there — Galley never sees a card. The session carries the plan's flat price and its metered overage price, and Stripe Tax is calculated on the page.

The plan does not change when this returns. It changes when Stripe delivers checkout.session.completed and customer.subscription.created to our webhook, a second or two later. Poll GET /v1/account and read subscription.status.

The account must have a verified email address: the invoice, the receipt and every dunning message go to it. A keyless trial gets permission_error naming the call that fixes it.

post/v1/billing/checkout

Request

  • Base URL: https://api.galleyrender.com
  • URL: https://api.galleyrender.com/v1/billing/checkout
  • Auth: HTTP bearer

Request body

plan'solo' | 'starter' | 'growth' | 'scale' required

The paid plan to subscribe to. free is not a checkout — it is a portal cancellation.

interval'month' | 'year'

Annual is ten months for twelve.

success_urlstring

Where Stripe returns on success. https on galleyrender.com only.

cancel_urlstring

Where Stripe returns if the customer backs out.

Response

A Checkout Session. Nothing has been charged.

object'checkout_session' required
idstring required
urlstring required

The hosted page. Open it in a browser.

expires_atstring date-time nullable
accountstring
plan'solo' | 'starter' | 'growth' | 'scale' required
interval'month' | 'year' required
price_usdnumber
included_rendersinteger

The plan's included quantity each month, in meter units: a PDF page is 2.5, an image 1. Solo's 500 is 200 PDF pages or 500 images. The name predates the page weighting and is kept for compatibility.

overage_usd_per_rendernumber

Dollars per meter unit past the allowance — the price of one image. A PDF page is 2.5 of them: $0.015 on Solo, $0.01 on the larger plans.

current_planstring
next_stepstring
notestring

Example response

{
  "id": "cs_test_a1b2c3",
  "url": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3",
  "price_usd": 5,
  "included_renders": 500,
  "overage_usd_per_render": 0.006
}

Changes

No recorded changes to this operation across all 1 revision of this API.