Create a Stripe Checkout session for an active credit pack.
const url = 'https://data.predictefy.com/v1/billing/checkout';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"packId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://data.predictefy.com/v1/billing/checkout \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "packId": "example" }'Key-authed and WEIGHT 0 (buying credits never debits credits). The returned URL is Stripe-hosted; on completion the webhook credits the pack’s amount to the calling account exactly once. A tier-specific overage pack is available only to an account on its eligible plan. 503 BILLING_UNAVAILABLE until the STRIPE_* env is configured (dark by default).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
An ACTIVE credit_packs id eligible for the current plan.
Examplegenerated
{ "packId": "example"}Responses
Section titled “Responses”The hosted Stripe Checkout URL.
object
object
Examplegenerated
{ "success": true, "data": { "url": "example" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Enveloped error.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}