Skip to content

[Bug] Stripe支付EventTypeCheckoutSessionAsyncPaymentFailed处理不完整 #8226

Open

Description

@Yasin-cxh

Read This First

  • Docs: https://docs.newapi.ai/
  • Usage questions first: https://deepwiki.com/QuantumNous/new-api
  • Do not report issues when pass-through is enabled; pass-through sends content as-is and does not go through new-api processing logic.
  • State facts and evidence concisely. Do not paste unfiltered AI-generated text in the issue body or in later comments.
  • Relay reports must first establish that the issue occurs in the new-api layer. Use equivalent redacted requests to compare the direct upstream result with the result through new-api, including response status, error body, and server logs. Reports that skip this comparison or only show an upstream error are not accepted.
  • Reports about Coding Plan services, reverse-engineered channels, third-party API wrappers, or compatibility issues caused by exposing a Codex endpoint through a reverse proxy as a general-purpose API are not accepted. Protocols or behavior specific to the Codex API should not be treated as standard OpenAI API behavior; confirm such issues with the channel or API provider first.
  • This project does not operate an official hosted service or provide technical support for third-party hosting sites, relay services, or API services. Contact the relevant operator for those issues.
  • Warning: issues with this template removed, section headings deleted, or content cleared may be closed directly. Repeated submissions of unfiltered AI-generated text, or repeated abusive submissions, may result in a block.

Deployment source

Repository release / official image (self-hosted)

Your current newapi version

ba5f736

Submission Checks

  • Non-duplicate issue: I have searched existing Issues and confirmed there are no similar issues.
  • Read this first: I have fully read the section above, reviewed the docs at https://docs.newapi.ai/ and the project README, and asked AI first, confirming this is not a usage, configuration, or integration question.
  • Supported version: I have provided an exact version, commit, or image tag (not latest or unknown) and confirmed that the issue reproduces on an unmodified, supported version from this repository.
  • Not a third-party service: I confirm that this issue is not exclusive to a third-party hosting site, relay, API service, or fork that has not been verified against the unmodified repository. Third-party instance issues must be reported to their operator.
  • Not pass-through: I confirm that pass-through is not enabled on the relevant channel. Pass-through sends content as-is and does not go through new-api processing logic; such reports are not accepted.
  • Issue attribution: I have provided evidence that distinguishes the client, new-api, and upstream layers. For relay issues, I compared equivalent redacted requests sent directly upstream and through new-api, confirming that new-api introduces or changes the error rather than merely forwarding the upstream error unchanged.
  • Channel and protocol boundary: I confirm that the issue is not caused by a Coding Plan service, reverse-engineered channel, third-party API wrapper, Codex reverse-proxy endpoint, or behavior specific to the Codex API. If first observed through such an interface, I have reproduced it using a standard API protocol supported by this repository.
  • Maintainer time: I understand that maintainers have limited time. Do not paste unfiltered AI-generated text in the issue body or in later comments; extract the points needed for review first. Submissions that do not follow this template, or that omit the necessary points and cannot be reviewed, may be ignored or closed. Repeated submissions of this kind may result in a block.

Issue Description

订阅套餐使用stripe支付,会创建pending状态的SubscriptionOrder,但是如果webhook的状态是EventTypeCheckoutSessionAsyncPaymentFailed,只处理了使用stripe充值的业务场景,导致数据状态异常。
涉及文件controller/subscription_payment_stripe.go,controller/topup_stripe.go

Steps to Reproduce

  1. 发起 Stripe 订阅支付,创建 pending 状态的 SubscriptionOrder。
  2. 让对应 Checkout Session 触发 checkout.session.async_payment_failed。
  3. 查看该交易号对应的订阅订单状态。

Expected Result

stripe支付失败的SubscriptionOrder状态是fail

Related Screenshots

No response

Activity

  1. new-api-reviewer-bot commented on Nov 6, 2026

    @new-api-reviewer-bot

    [Bot Review]

    感谢提交 issue,我们将跟进此问题!

  2. changed the title [-][Bug]Stripe支付EventTypeCheckoutSessionAsyncPaymentFailed处理不完整[/-] [+][Bug] Stripe支付EventTypeCheckoutSessionAsyncPaymentFailed处理不完整[/+] on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions