调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
销售收入
平台和交易市场
资金管理
开发人员资源
概览
关于 Stripe 支付
升级您的集成
支付分析
线上付款
概览查找您的用例Managed Payments
使用 Payment Link
构建结账页面
构建高级集成
构建应用内集成
支付方式
添加支付方式
    概览
    支付方式集成选项
    在管理平台中管理默认支付方式
    支付方式类型
    银行卡
    使用 Stripe 余额支付
    加密货币
    银行借记
      按 ACH 直接借记额收取
      Bacs 直接借记
      加拿大预授权借记
      澳大利亚 BECS 直接借记
      新西兰 BECS 直接借记
      SEPA 直接借记
        收款
        保存银行详情
    银行重定向
    银行转账
    贷记转账(来源)
    先买后付
    实时付款
    付款凭单
    钱包
    按国家启用本地支付方式
    自定义支付方式
管理支付方式
用 Link 更快结账
支付接口
Payment Links
结账
Web Elements
应用内 Element
支付场景
处理多种货币
自定义支付流程
灵活收单
编排
线下支付
Terminal
超越支付功能
成立公司
加密货币
Financial Connections
Climate
首页付款Add payment methodsBank debitsSEPA Direct Debit

Save SEPA Direct Debit details for future payments

Learn how to save payment method details for future SEPA Direct Debit payments.

You can use Checkout in setup mode to collect SEPA Direct Debit payment details in advance, and determine the final amount or payment date later. Use it to:

  • Save payment methods to a wallet to streamline future purchases
  • Collect surcharges after fulfilling a service
  • Start a free trial for a subscription
  • Saving payment methods to a wallet to streamline future purchases
  • Collecting surcharges after fulfilling a service
  • Starting a free trial for a subscription

注意

SEPA Direct Debit is a delayed notification payment method, which means that funds are not immediately available after payment. A payment typically takes 5 business days to arrive in your account.

Create or retrieve a Customer
Server-side

To reuse a SEPA Direct Debit payment method for future payments, it must be attached to a Customer.

Create a Customer object when your customer creates an account with your business. Associating the ID of the Customer object with your own internal representation of a customer enables you to retrieve and use the stored payment method details later.

Create a new customer or retrieve an existing customer to associate with this payment. Include the following code on your server to create a new customer.

Command Line
cURL
curl -X POST https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

Set up future payments

注意

This guide builds on the foundational set up future payments Checkout integration.

Use this guide to learn how to enable SEPA Direct Debit—it shows the differences between setting up future payments for cards and using SEPA Direct Debit.

Enable SEPA Direct Debit as a payment method

When creating a new Checkout Session, you need to add sepa_debit to the list of payment_method_types.

Ruby
Stripe::Checkout::Session.create({ mode: 'setup', payment_method_types: ['card'], payment_method_types: ['card', 'sepa_debit'], customer: customer.id, success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', })

Test your integration

You can test your integration using the IBANs below. The payment method details are successfully collected for each IBAN but exhibit different behavior when charged.

Test IBANs
账号描述
HR7624020064583467589PaymentIntent 状态从 processing 变成 succeeded。
HR6323600002337876649三分钟后,PaymentIntent 状态从 处理中 变成 已成功。
HR2725000096983499248PaymentIntent 状态从 processing 变成 requires_payment_method。
HR6723600004878117427至少三分钟后,PaymentIntent 状态从处理中变为 requires_payment_method。
HR8724840081455523553PaymentIntent 状态从 processing 变成 succeeded,但会立即创建争议。
HR7424020060000343434付款失败,显示 charge_exceeds_source_limit 错误代码,原因是支付金额导致账户超过每周支付限额。
HR3624020060000121212付款失败,显示 charge_exceeds_weekly_limit 错误代码,原因是支付金额导致账户超过的交易限额。
HR7424020060002222227付款失败,失败代码为:insufficient_funds。

可选Customize mandate references with a prefix

另见

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