Black API
Black runs subscriptions for your accounts: products and their prices, customers, subscriptions, invoices, and the events that tell your systems what changed. Every request goes to a path under /v1, and most carry a bearer token: an API client's access token or, in the console, a team member's session token. Each operation below shows the headers it reads, the body it takes, the body it answers and the error codes it may refuse with; every error has the same shape.
Authentication
- HTTP: Bearer Auth
- HTTP: Bearer Auth
- API Key: publishableKey
- API Key: checkoutSecret
An API client's access token, issued by POST /v1/oauth/token.
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
A team member's session token, issued by POST /v1/console/sessions.
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
An app's publishable key, created by POST /v1/apps/{app}/publishable-keys. It opens the Client API under /v1/client to the app's own origins, or to its mobile app named in Black-App, and never the Server API.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Black-Publishable-Key |
A checkout session's secret, shown once, in the fragment of the url its create answers. It opens the routes of the hosted checkout page for that one session, in place of a publishable key.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Black-Checkout-Secret |