Developers

Start a checkout

POST
/billing/checkout

Creates an Order for a one-time Credit Pack and returns checkout_url, the page where the human pays: Stripe’s hosted Checkout, or for PayPal our page hosting PayPal’s approval for that Order. Opening it charges nothing; Credits arrive only after the payment provider confirms the payment. Plans are not on sale, so a Plan selection is refused.

Send an Idempotency-Key to make retries safe: the same key with the same body returns the first result, with a different body 409.

Authorization

headerAuthorizationBearer <token>

An API Key the User creates in account settings, sent as Authorization: Bearer <key>. It holds the Scopes chosen at creation.

Header Parameters

Idempotency-Key?string

A client key, unique per request.

Length1 <= length <= 255

Request Body

application/json
  1. body
providerCode*string
Value in"stripe""paypal"
selection*|

Response Body

Success.

application/json
  1. response
provider*string
Value in"stripe""paypal"
checkout_url*string
Formaturi
order_no*string
Example request
curl -X POST 'https://ximagesplitter.com/api/v1/billing/checkout' \
  -H 'Content-Type: application/json' \
  -d '{
  "providerCode": "stripe",
  "selection": {
    "planId": "starter",
    "billingCycle": "monthly",
    "purchaseKind": "plan"
  }
}'
Example response
{
  "provider": "stripe",
  "checkout_url": "http://example.com",
  "order_no": "string"
}