Skip to content

Document shop subscription integration and fulfillment callback - #628

Open
JohnNiang wants to merge 1 commit into
devfrom
docs/shop-subscription-integration
Open

JohnNiang wants to merge 1 commit into
devfrom
docs/shop-subscription-integration

Conversation

@JohnNiang

Copy link
Copy Markdown
Member

Document how third-party services integrate with the shop subscription system, covering the full subscription lifecycle, webhooks, and the fulfillment callback.

Add a "商城对接" section under the developer guide with four pages:

  • Overview: responsibilities, integration channels, personal access token and role preparation, end-to-end sequence, and the minimal loop.
  • Subscription lifecycle: data model (product, tier, plan, subscription), state machine, billing periods and trials, renewal and expiry, plan changes, cancellation, entitlement end-date rules, and the console and user-center query APIs.
  • Subscription webhook: envelope and headers, signature verification, retry and dedupe semantics, the SUBSCRIPTION_* event reference, data.subscription fields, and the related order events.
  • Fulfillment callback: the outbound FULFILLMENT_REQUESTED request and the inbound POST /orders/{id}/fulfillment-reports report, including authentication, idempotency, error handling, and reconciliation.

The pages document that subscription integration goes through webhooks plus the console REST API, note that the shop and subscription modules currently expose no plugin extension point for these flows, and state that the feature requires Halo 商城版 2.27.0 or later.

Also correct three inaccuracies in the existing shop webhook page: webhookId in the payload example is a numeric webhook configuration ID rather than a name, zero-amount orders emit both ORDER_CREATED and ORDER_PAID, and the event list was missing FULFILLMENT_REQUESTED and the subscription events.

Validation:

  • pnpm check:ci passed.
  • pnpm build passed (240 pages, dead links checked).
  • git diff --check passed.
  • Checked all four new pages, the sidebar entry, and the rendered diagrams in the local browser preview.

Documentation changes assisted by DeepSeek Harness.

Add a developer guide section for integrating third-party services with
the shop subscription system: lifecycle, webhooks, and the fulfillment
report callback. Also correct three inaccuracies in the shop webhook page.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
docs 318dc24 Commit Preview URL

Branch Preview URL
Sep 17 2026, 10:07 AM

@ruibaby
ruibaby changed the base branch from main to dev September 17, 2026 10:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant