ShoppingateShoppingateDevelopers
shoppinggate.app ↗
Documentation
  • What is a Mini App
  • Why Mini Apps
  • API integration
  • SDK
  • Webview
  • Mini App architecture
  • Getting started
  • Choosing your path
  • Introduction
    • Introduction
    • Sign up & login
    • Dashboard & analytics
    • Mini-Programs
    • Submit & publish a version
    • App Binding
    • Privacy Settings
    • Allowed URL
    • Users & roles
    • Introduction
    • Become a Mini-App vendor
    • API keys
    • My Mini-Apps
    • Orders
    • Webhook
    • Deep-link config
    • Introduction
    • Install & log in
    • Create a project
    • The workspace
    • Preview & upload
  • Introduction
  • Configuration
  • Lifecycle
  • Routing & query
  • Host functions
  • orderPayment
  • Permissions
  • User info
  • Introduction
  • Configuration
  • SDK
  • Lifecycle
  • Routing & query
  • Host functions
  • orderPayment
  • Permissions
  • User info
  • Web app and shell calls
  • Look and feel
  • Overview
    • Verify user
    • Create order
    • Get order
    • Update order status
    • Charge an order
    • Send a notification
  • Subscriptions
    • Create a subscription
    • List subscriptions
    • Get a subscription
    • Update a subscription
    • Reschedule next charge
    • Change plan (upgrade)
    • Cancel a subscription
  • Webhooks
Server side

Subscriptions

Recurring billing for your mini app. Your backend registers a subscription with plan details inline; Shoppingate charges the user's saved card on your cadence, handles retries, and tells you every outcome over webhooks.

How it works

  1. Your backend calls Create a subscription with the amount, interval, and your own provider_subscription_ref. It starts in incomplete — no money moves.
  2. The user activates it inside the mini app by picking a saved card. The host runs the first charge; on success the subscription becomes active and you get a subscription.activated webhook.
  3. At each next_charge_at, Shoppingate charges the bound card automatically — you never call a renewal endpoint. Each success fires subscription.charged; the period rolls forward.
  4. A failed renewal moves the subscription to past_due and enters dunning (retries with backoff). If every retry fails the subscription is cancelled.
Your backend is the source of truth for every amount. There is no plan catalog to pre-register — plan details ride inline on each call, so you set the price. Addressing is by your own provider_subscription_ref everywhere; you never store SG's subscription_uuid.

Lifecycle states

status
Meaning
incomplete
Created, no payment taken yet. Waiting for the user to activate in-app.
active
First charge succeeded. Renews automatically at each period end.
past_due
A renewal charge failed; dunning is retrying. Flips back to active on success.
cancelled
Ended (by you, the user, or dunning exhaustion). Terminal.
expired
Reached period end with auto_renew off. Terminal.
incomplete ──activate──► active ⇄ past_due        (renewal fails / recovers)
                          └──► cancelled | expired (terminal)

Endpoints

All of these use the same base URL and headers as the rest of the S2S API — see Overview. Every subscription is addressed by the provider_subscription_ref you chose on create.

POST/s2s/v1/subscriptionsCreate a subscription →GET/s2s/v1/subscriptionsList subscriptions →GET/s2s/v1/subscriptions/{ref}Get a subscription →PATCH/s2s/v1/subscriptions/{ref}Update a subscription →POST/s2s/v1/subscriptions/{ref}/rescheduleReschedule the next charge →POST/s2s/v1/subscriptions/{ref}/change-planChange plan (upgrade now) →POST/s2s/v1/subscriptions/{ref}/cancelCancel a subscription →

Every lifecycle change also reaches your backend as a webhook (subscription.activated, subscription.charged, subscription.payment_failed, and more) — see Webhooks.