staqlydocs
REST APIAPI referenceBilling

Buy extra posts to X

Buy extra posts to X (account owner)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/billing/credits/checkout

Returns a Stripe Checkout URL (one-time payment) for a bundle; the posts are added when Stripe reports the payment.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Header Parameters

Idempotency-Key?string

Replays the stored response when the same key is repeated with the same method, path, query string and body within 24 hours (422 idempotency_mismatch with a different request, 409 idempotency_in_progress while the first one runs). Not applied to multipart uploads or to responses that carry a secret.

Lengthlength <= 200

Request Body

application/json
  1. body
provider?"x"

Default x

Value in"x"
posts*integer
Value in20010004000

Response Body

Checkout URL

application/json
  1. response
url*string
curl -X POST 'https://staqly.example.com/v1/billing/credits/checkout' \  -H 'Content-Type: application/json' \  -d '{  "posts": 200}'
{  "url": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3"}