Skip to content

Document shop subscription integration and fulfillment callback - #628

Merged
ruibaby merged 5 commits into
mainfrom
docs/shop-subscription-integration
Oct 16, 2026
Merged

ruibaby merged 5 commits into
mainfrom
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 dacc35f Commit Preview URL

Branch Preview URL
Oct 16 2026, 06:46 AM

@ruibaby
ruibaby changed the base branch from main to dev September 17, 2026 10:15
@ruibaby
ruibaby marked this pull request as draft October 14, 2026 09:46
- Add subscription management guide covering tiers, plans, change
  rules, policies, console management and customer self-service
- Document guest checkout and subscription menu settings
- Note subscription product type, fulfillment and UC subscription
  section in products, orders and customer center pages
- Add periodDelta field, reminder scope and repurchase reuse
  conditions to developer docs
@ruibaby
ruibaby self-requested a review October 15, 2026 15:37
@ruibaby
ruibaby changed the base branch from dev to main October 16, 2026 05:06
@ruibaby
ruibaby marked this pull request as ready for review October 16, 2026 05:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T06:47:47.595609Z dacc35f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a55dbb0856

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/developer-guide/shop/integration/fulfillment-callback.md Outdated
Comment thread docs/developer-guide/shop/integration/subscription-webhook.md Outdated
Comment thread docs/developer-guide/shop/integration/subscription-webhook.md Outdated
Comment thread docs/developer-guide/shop/integration/subscription-webhook.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 706c31a231

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/developer-guide/shop/integration/subscription-lifecycle.md Outdated
Comment thread docs/developer-guide/shop/integration/subscription-lifecycle.md Outdated
@ruibaby
ruibaby merged commit 49cb3e2 into main Oct 16, 2026
2 checks passed
@ruibaby
ruibaby deleted the docs/shop-subscription-integration branch October 16, 2026 07:39
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.

2 participants