internal
Shopify Credits Sync
Ensure the shop's headless user + wallet, apply the plan's credit grant, and return the current balance. The Shopify app calls this on every load (cheap). Grant shape depends on the plan:
- free: a ONE-TIME signup grant into the non-expiring bonus pool (add_studio_bonus_credits, action_type shopify_signup_free) — fired only if this shop has never received a free grant (neither the signup grant nor a legacy shopify_free_monthly from the pre-billing era). Never refilled: once spent, the merchant upgrades or stops.
- starter: a monthly lazy reset of the subscription studio_credits pool via grant_studio_credits (SET + expiry on the 1st) — fires when the current grant has lapsed, so mid-month consumption is preserved. On upgrade the app passes force=true once so the paid allotment takes effect immediately; downgrades don't force, so a paid month's balance survives until the 1st, after which the free plan grants nothing further.
A Shopify shop account never has a Stripe studio subscription (synthetic email, no login), so the subscription pool isn't contended. Idempotent on email (like provision-user). X-Internal-Key gated.
post/api/internal/shopify-credits-sync
Request
- Base URL: https://api.tintin-x.com (the document declares no server; this is the origin it was published from)
- URL: https://api.tintin-x.com/api/internal/shopify-credits-sync
- Auth: none declared
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.