Docs Partner Integration

Partner Integration

Hosted account link plus partner APIs for third-party stores.

Best Integration Path for Third-Party Stores

Use Hosted Link + OAuth + Partner APIs. This keeps user auth and payment risk centralized in MoonStore while minimizing partner-side complexity.

Partner API Endpoints

POST /api/v1/partner/checkout/sessions
POST /api/v1/partner/billing/portal
POST /api/v1/partner/subscriptions/cancel
GET  /api/v1/partner/entitlements
GET  /api/v1/partner/events/replay
POST /api/v1/partner/clients
POST /api/v1/partner/clients/{id}/rotate-secret
POST /api/v1/partner/clients/{id}/revoke
  1. Partner app generates PKCE verifier/challenge.
  2. Partner redirects to https://moonstore.nanodata.cloud/oauth/link.
  3. User signs in/consents and is sent back with code.
  4. Partner backend exchanges code and calls partner endpoints.

Use the JS Partner SDK

The sdks/js-partner package provides PKCE helpers, hosted-link URL construction, token exchange, introspection/revocation, and partner API wrappers.