anomalyco / anomalyco/opencode
Alipay payment-method setup returns 502 while card succeeds
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
On the OpenCode console, the Go subscription page shows a banner:
"Reauthorize Alipay before Sep 30, 2026 to keep your Go subscription renewing."
Clicking Reauthorize Alipay does nothing — no redirect to Alipay — and the page only
shows the error "Failed to start Stripe setup."
Calling the underlying API directly shows the Alipay payment-method setup endpoint returns
502, while the exact same endpoint succeeds for card. This looks like a server-side
Stripe gateway failure specific to the alipay payment method type, so re-authorization is
impossible for affected users.
Plugins
No response
OpenCode version
1.18.31
Steps to reproduce
-
Sign in to the OpenCode console and open the Go / billing page.
-
Click Reauthorize Alipay in the banner.
-
Nothing happens (no redirect); the UI shows "Failed to start Stripe setup."
Browser DevTools Console shows:POST https://opencode.ai/console/api/billing/payment-methods/stripe/setup-session 502 (Bad Gateway)
Direct API reproduction (same logged-in browser session):
POST https://opencode.ai/console/api/billing/payment-methods/stripe/setup-session
Headers: content-type: application/json, x-org-id: <org id>
Body {"returnTo":"billing","paymentMethodType":"alipay"}
-> 502 {"_tag":"BillingPaymentGatewayFailed","gateway":"stripe"}
Body {"returnTo":"billing","paymentMethodType":"card"}
-> 200 {"url":"https://checkout.stripe.com/c/pay/cs_live_..."}
Body {"returnTo":"billing","paymentMethodType":"wechat_pay"}
-> 200 {"url":"https://checkout.stripe.com/c/pay/cs_live_..."}
Screenshot and/or share link
No response
Operating System
Windows 11 (10.0.26100)
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the POST to /console/api/billing/payment-methods/stripe/setup-session with paymentMethodType set to alipay, then compare its server-side path with the successful card and wechat_pay requests. Trace the setup-session entry point and Stripe gateway response; done means Alipay setup returns a usable redirect URL and the Reauthorize Alipay action redirects instead of showing the 502 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100