Change plan, cancel or resume
- Credentials
- OAuth access token
- Scopes
billing:write- Role
- Owners and admins only. Staff get
403 forbidden. - Subscription
- Needs an active plan. Otherwise
403 subscription_locked. - Idempotency
- Send an
Idempotency-Keyheader. A retry with the same key does the work once.
Charges the saved card on an upgrade, and a cancel or resume changes what the shop is billed. billing:write is opt-in on the OAuth consent screen.
Access: OAuth scope billing:write; owner/admin only; write-gated by the subscription.
merchantOAuth billing:writeAuthorizationBearer <token>OAuth 2.1 (authorization code + PKCE S256, public clients, dynamic registration) for connected AI apps. Effective power is scopes granted AND the person's role today AND the plan. orders:refund, billing:write and team:write are opt-in on the consent screen. Write implies read for marketing:read and messages:read, so a grant holding marketing:write passes a marketing:read check, and messages:send passes messages:read.
Scope: billing:write
storeId*stringA store the person can reach. Any other id answers 404, never 403.
Idempotency-Key*stringRequired on every write. Minted on the device when the person taps, reused on every retry. A write without one, or with one that does not match the pattern, is refused with 422 validation_error. Scoped to the token's subject, remembered 24 hours. A replay returns the first 2xx response with Idempotent-Replay: true; a request still running answers 409 in_flight; the same key with a different method, path or body answers 409 idempotency_key_reused; non-2xx results are not remembered. If the key store cannot be read nothing is processed and the answer is 503 idempotency_unavailable: retry with the same key.
^[A-Za-z0-9_-]{8,128}$application/json- body
action*string"changePlan""cancel""resume"planId?stringRequired for changePlan.
"starter""growth""scale"interval?string"monthly""annual"OK
application/json- response
data*|curl -X PATCH 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/billing' \ -H 'Authorization: Bearer <access_token>' \ -H 'Idempotency-Key: <unique_key>' \ -H 'Content-Type: application/json' \ -d '{ "action": "changePlan"}'{ "data": { "action": "cancel" }}Plan, subscription, card on file, credits and usage GET
Access: OAuth scope `store:read`; owner/admin only; not write-gated.
What a plan, add-on, extra, credit pack or the Launch package costs today GET
What the change would charge the saved card today (`chargeToday`, nothing for a downgrade or a reduction), the next bill where there is one, and whether a card is saved. Refuses what the change itself would refuse, so nobody confirms something that cannot happen. Charges nothing. Access: OAuth scope `store:read`; owner/admin only; not write-gated.