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

Overview

Your backend calls Shoppingate's server-to-server API. Every call goes to the same base URL and carries the same two headers.

Base URL

https://microservices.shoppinggate.app/mini-app-core/

Headers

Every server-to-server call is authenticated with your Vendor API Key — one key for all your Mini Apps — plus the X-Mini-App-Id header with your Mini App's AppID from the Dev portal. Get the key from the merchant portal → Mini-Apps → API Keys (see Merchant portal → API keys).

# Every request carries these two headers
X-Vendor-Api-Key: sg_s_<your-key>      // sandbox — production keys start with sg_p_
X-Mini-App-Id: fc3387032477716613
Keep the key server-side. Never ship it inside the mini-app bundle or expose it in a page. If a key leaks, revoke it from the merchant portal immediately.

X-Mini-App-Id takes either form — the numeric id or the Mini App id string from your project config.

When authentication fails

These are rejected before your request reaches any endpoint, so they can come back from any S2S call. Every one carries status: false and an error_code — branch on the code, not the human message.

Status
error_code
What to do
401
VENDOR_API_KEY_MISSING
No X-Vendor-Api-Key header on the request.
401
VENDOR_API_KEY_INVALID
The key is not recognised.
401
VENDOR_API_KEY_MISMATCH
The key is valid but does not belong to the vendor the request identified itself as. Send X-Vendor-Api-Key and X-Mini-App-Id and nothing else — no other header needs to name your vendor.
401
VENDOR_INACTIVE
Your vendor account is not active. Contact your Shoppingate account manager.
400
MINI_APP_REQUIRED
No X-Mini-App-Id header. Add it; it is required on every call, not only the ones that name a mini app in the body.
404
MINI_APP_NOT_FOUND
No mini app of yours matches that value. A mini app belonging to another vendor answers the same way, so check the value against the merchant portal and check you are on the right environment.
503
VENDOR_AUTH_UNAVAILABLE
Shoppingate could not check the key right now. Retry with backoff — this one is safe to retry.

Endpoints

POST/s2s/v1/identity/verifyVerify user →POST/s2s/v1/ordersCreate order →GET/s2s/v1/orders/{orderUuid}Get order →POST/s2s/v1/orders/{orderUuid}/transitionsUpdate order status →

Running recurring billing? See Subscriptions for the subscription S2S API.

Shoppingate also calls your backend when an order or subscription changes — see Webhooks.