在Java中使用条带API设置自动续订

在Java中使用条带API设置自动续订,java,maven,stripe-payments,Java,Maven,Stripe Payments,我正在尝试使用stripeapi为我的javaspringmvcweb应用程序设置自动续订功能。我在我的pom.xml文件中添加了以下Maven依赖项: <dependency> <groupId>com.stripe</groupId> <artifactId>stripe-java</artifactId> <version>5.8.0</version> </dependency>

我正在尝试使用
stripeapi
为我的
javaspringmvc
web应用程序设置
自动续订
功能。我在我的
pom.xml
文件中添加了以下
Maven
依赖项:

<dependency>
  <groupId>com.stripe</groupId>
  <artifactId>stripe-java</artifactId>
  <version>5.8.0</version>
</dependency>

是否有使用Stripe API设置自动续订的示例。

您的代码是正确的。根据您所说的,听起来您遇到的问题是将Stripe的Java库导入到您的项目中,而不是实际使用该库

您是否在代码开头添加了以下内容

import com.stripe.Stripe;
import com.stripe.model.Plan;

如何处理Stripe webhook事件,您是否可以查看以下帖子:
import com.stripe.Stripe;
import com.stripe.model.Plan;