调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
销售收入
平台和交易市场
资金管理
开发人员工具
概览
Billing
    概览
    关于 Billing API
    订阅
      订阅的运作机制
      快速开始
      用例
      构建您的集成
      订阅功能
        订阅账单
        订阅计划
        订阅定价
        经常性定价模型
        嵌入价格表
        开始订阅
        设置数量
        设置计费周期
        回溯订阅
        订阅多个项目
        设置试用期
        使用优惠券
        将订阅迁移到 Stripe
        信用按比例分配计算方式
        订阅付款
        订阅支付方式
          按 ACH 直接借记额收取
          Amazon Pay
          英国的 BACS 直接借记
          银行转账
          澳大利亚的 BECS 直接借记
          Cash App Pay
          PayPal
          Revolut Pay
          韩国卡
          Kakao Pay
          Naver Pay
          加拿大预授权借记
          欧盟的 SEPA 直接借记
          使用 SEPA 直接借记的 iDEAL
          使用 SEPA 直接借记的 Bancontact
          使用 SEPA 直接借记的 Sofort
        集成第三方支付处理
        欠款回收方式
        分享一个更新支付详情的链接
        强客户认证 (SCA)
        管理订阅
        修改订阅
        管理新的更新
      分析
    开账单
    基于用量的计费
    Connect 和 Billing
    Tax 和 Billing
    报价
    收入恢复
    自动化
    脚本
    收入确认
    客户管理
    资格
    测试您的集成
税务
报告
数据
创业公司
首页销售收入BillingSubscriptionsSubscription featuresSubscription payment methods

Set up a subscription with Amazon Pay

Learn how to create and charge for a subscription with Amazon Pay.

复制页面

Use this guide to set up a subscription using Amazon Pay as a payment method.

You can use the Checkout API to create and confirm a subscription with a prebuilt checkout page.

Create a product and price
Dashboard

Products represent the item or service you’re selling. Prices define how much and how frequently you charge for a product. This includes how much the product costs, what currency you accept, and whether it’s a one-time or recurring charge. If you only have a few products and prices, create and manage them in the Dashboard.

This guide uses a stock photo service as an example and charges customers a 15 USD monthly subscription. To model this:

  1. Navigate to the Add a product page.
  2. Enter a Name for the product.
  3. Enter 15 for the price.
  4. Select USD as the currency.
  5. Click Save product.

After you create the product and the price, record the price ID so you can use it in subsequent steps. The pricing page displays the ID and it looks similar to this: price_G0FvDp6vZvdwRZ.

Create a Checkout Session
Server-side

Your customer must authorize you to use their Amazon account for future payments through Stripe Checkout. This allows you to accept Amazon payments. Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.

index.html
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>

Create a Checkout Session in subscription mode to collect the required information. After creating the Checkout Session, redirect your customer to the URL that the response returns.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel" \ -d "line_items[0][price]"={{RECURRING_PRICE_ID}} \ -d "line_items[0][quantity]"=1 \ -d "payment_method_types[0]"=card \ -d "payment_method_types[1]"=amazon_pay \ -d mode=subscription

Test your integration
Server-side

Select Amazon Pay as the payment method and tap Subscribe. You can test the successful payment case by authenticating the payment on the redirect page. The PaymentIntent transitions from requires_action to succeeded.

此页面的内容有帮助吗?
是否
需要帮助?联系支持。
加入我们的早期使用计划。
查看我们的更改日志。
有问题?联系销售。
LLM? Read llms.txt.
Powered by Markdoc