调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
销售收入
平台和交易市场
资金管理
开发人员资源
概览
关于 Stripe 支付
升级您的集成
支付分析
线上付款
概览查找您的用例Managed Payments
使用 Payment Link
构建结账页面
构建高级集成
构建应用内集成
支付方式
添加支付方式
管理支付方式
    支付方式支持
    面向平台和交易市场的支付方式支持
    注册支付方式域名
    动态支付方式
    动态支付方式
    支付方式 A/B 测试
    支付方式规则
    支付方式配置
用 Link 更快结账
支付接口
Payment Links
结账
Web Elements
应用内 Element
支付场景
处理多种货币
自定义支付流程
灵活收单
编排
线下支付
Terminal
超越支付功能
成立公司
加密货币
Financial Connections
Climate
了解欺诈
Radar 欺诈保护
管理争议
验证身份
首页付款Manage payment methods

Payment method configurations

Create different sets of payment methods to display to customers based on specific checkout scenarios.

Payment method configurations allows dynamic payment method users to display different sets of payment methods to customers for specific checkout scenarios.

You can create a configuration to:

  • Display a unique set of payment methods for certain products
  • Enable a set of payment methods for your one-time payment checkout flow and a different set of payment methods for your subscription checkout flow
  • Connect Offer connected accounts access to additional payment methods for a different subscription fee

After you create a payment method configuration, you can toggle each payment method on or off for a given scenario directly in Dashboard—no code required. Then at checkout, select which configuration you want to use. Stripe ranks the payment methods that are enabled within that configuration to optimize for conversion.

开始前

  • You must use either the Stripe Payment Element or Checkout.
  • You must use Dynamic payment methods to enable additional payment methods from the Stripe Dashboard, which won’t require any code changes.
    • To set up dynamic payment methods for direct users, see the payment method integration guide.
    • Connect To set up dynamic payment methods for Connect platforms, see Upgrading to dynamic payment methods.

Create a payment method configuration

By default, you have one payment method configuration called Default Config. You can create additional payment method configurations using both the Stripe Dashboard and the API.

  1. In your Dashboard, go to Payment methods settings.
  2. In the Configuration Management section, click the overflow menu (), then select Create a configuration.
  3. Give your new configuration a name.
  4. Click Save configuration.
Payment method configuration page

The page displays your new configuration. All payment methods are initially disabled by default.

To switch between configurations, use the Select configuration dropdown near the top of the page.

Enable payment methods

In the Dashboard, open the configuration and turn on the payment methods that you want to make available to buyers when using that configuration. A buyer sees only payment methods that are turned on and compatible with the payment location and currency.

注意

Some payment methods don’t show edit controls until you expand them.

Display available payment methods in checkout

Copy the configuration ID in the Dashboard from the configuration you want to use in your checkout flow.

If you’re using the deferred intent creation integration path, pass the payment_method_configuration ID when you create your Payment Element component. The Payment Element automatically pulls the payment methods associated with that configuration and ranks them to best convert buyers.

const options = { mode: 'payment', amount: 1099, currency: 'usd', payment_method_configuration: 'pmc_234' }

If you aren’t using a Payment Element, pass the payment_method_configuration ID when you create a Checkout session.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=payment \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel" \ -d currency=usd \ -d payment_method_configuration=pmc_234

Payment methods

By default, Stripe enables cards and other common payment methods. You can turn individual payment methods on or off in the Stripe Dashboard. In Checkout, Stripe evaluates the currency and any restrictions, then dynamically presents the supported payment methods to the customer.

To see how your payment methods appear to customers, enter a transaction ID or set an order amount and currency in the Dashboard.

You can enable Apple Pay and Google Pay in your payment methods settings. By default, Apple Pay is enabled and Google Pay is disabled. However, in some cases Stripe filters them out even when they’re enabled. We filter Google Pay if you enable automatic tax without collecting a shipping address.

Checkout’s Stripe-hosted pages don’t need integration changes to enable Apple Pay or Google Pay. Stripe handles these payments the same way as other card payments.

Create a PaymentIntent with the configuration

Create a PaymentIntent on your server using the payment method configuration.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1000 \ -d currency=usd \ -d "automatic_payment_methods[enabled]"=true \ -d payment_method_configuration=pmc_123

In the latest version of the API, the automatic_payment_methods parameter is optional because it’s enabled by default.

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