调至内容部分
创建账户
或
登录
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
        集成第三方支付处理
        欠款回收方式
        强客户认证 (SCA)
        管理订阅
        修改订阅
        管理新的更新
      分析
    开账单
    基于用量的计费
    Connect 和 Billing
    Tax 和 Billing
    报价
    收入恢复
    自动化
    脚本
    收入确认
    客户管理
    资格
    测试您的集成
税务
报告
数据
创业公司
首页销售收入BillingSubscriptionsSubscription featuresSubscription payment methods

Set up a subscription with Revolut Pay

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

复制页面

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

Create and confirm a subscription using two API calls. The first API call uses the Setup Intents API to set Revolut Pay as a payment method. The second API call sends customer, product, and payment method information to the Subscriptions API to create a Subscription and confirm a payment in one call.

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 GBP 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 GBP 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 SetupIntent
Server-side

Create a SetupIntent to save a customer’s payment method for future payments. The SetupIntent tracks the steps of this setup process.

Command Line
cURL
curl https://api.stripe.com/v1/setup_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d confirm=true \ --data-urlencode return_url="https://www.stripe.com" \ -d usage=off_session \ -d customer=cus_ODQluYFNl44ODI \ -d "payment_method_data[type]"=revolut_pay \ -d "payment_method_types[]"=revolut_pay \ -d "mandate_data[customer_acceptance][type]"=online \ -d "mandate_data[customer_acceptance][online][ip_address]"="127.0.0.0" \ -d "mandate_data[customer_acceptance][online][user_agent]"=device

The SetupIntent object contains a client_secret, which is a unique key that you must pass to Stripe.js on the client side to redirect your buyer to Revolut Pay and authorize the mandate.

Create a subscription
Server-side

Create a subscription that has a price and a customer. Set the value of the default_payment_method parameter to the PaymentMethod ID from the SetupIntent response.

Command Line
cURL
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer={{CUSTOMER_ID}} \ -d "items[0][price]"={{PRICE_ID}} \ -d default_payment_method={{PAYMENT_METHOD_ID}} \ -d off_session=true

Creating subscriptions automatically charges customers due to the pre-set default payment method. After a successful payment, the status in the Stripe Dashboard changes to Active. The price that you previously set up determines the amount for future billings. Learn how to create a subscription with a free trial period.

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