Developers

Get a URL to change the Plan

POST
/billing/subscription/change

Returns a URL where the human confirms moving their current Subscription to another Plan or cycle; nothing changes until they do. The Subscription’s own provider decides the page: Stripe’s Billing Portal, or our confirmation page for PayPal, where the change applies from the next cycle. No Subscription answers 404; a change the provider cannot make answers 400 or 422 with details.reason.

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
planId*string
Value in"starter""pro""premium"
billingCycle*string
Value in"monthly""yearly"

Response Body

Success.

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