调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
财务自动化
平台和交易市场
资金管理
开发人员工具
开始
付款
财务自动化
开始
付款
财务自动化
平台和交易市场
资金管理
概览
关于 Stripe 支付
升级您的集成
支付分析
线上付款
概览查找您的用例Managed Payments
使用 Payment Link
构建结账页面
    概览
    快速开始
    自定义外观样式
      自定义外观
      自定义文本和策略
      自定义行为
    收集额外信息
    收税
    动态更新结账流程
    管理产品目录
    订阅
    管理支付方式
    让客户用本地货币支付
    添加折扣、追加销售和可选商品
    设置未来付款
    支付过程中保存付款详情
    Manually approve payments on your server
    付款后
    具有 Checkout Sessions API Beta 更改日志的 Element
    从传统 Checkout 迁移
    迁移 Checkout 来使用 Prices
构建高级集成
构建应用内集成
支付方式
添加支付方式
管理支付方式
用 Link 更快结账
支付接口
Payment Links
结账
Web Elements
应用内 Element
支付场景
自定义支付流程
灵活收单
编排
线下支付
Terminal
其他 Stripe 产品
Financial Connections
加密货币
Climate
首页付款Build a checkout pageCustomize look and feel

注意

该页尚未提供此语言版本。我们正在加紧将我们的文档翻译成更多语言,很快将为您提供译文。

Customize checkout behavior

Customize the behavior of the checkout process to increase conversion and revenue.

复制页面

Customize the Submit button

To better align Checkout with your business model, configure the copy displayed on the Checkout submit button for one-time purchases.

Define a submit_type on your session. In this example (for a 5 USD donation), your customized Checkout submit button would read Donate $5.00. See the API reference for a complete list of submit_type options.

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

Localization and supported languages

By default, Checkout detects the locale of the customer’s browser and displays a translated version of the page in their language, if Stripe supports it. You can override the browser locale for Checkout by passing the locale parameter when you create a Checkout Session.

Checkout also uses the locale to format numbers and currencies. For example, when selling a product whose price is set in EUR with the locale set to auto, a browser configured to use English (en) would display €25.00 while one configured for German (de) would display 25,00 €.

Autofill payment details with Link

You can automatically use Link (Stripe’s one-click checkout) in your prebuilt Checkout page. To learn more, see Link with Checkout.

Filter card brands

You can specify which card brands you want to block from your customers in the Checkout Session.

To block specific card brands, you can include the brands_blocked parameter when creating a Checkout Session. Pass an array with any of the following card brand values:

  • visa
  • mastercard
  • american_express
  • discover_global_network

The discover_global_network value encompasses all of the cards that are part of the Discover Global Network, including Discover, Diners, JCB, UnionPay, and Elo.

The following code example initializes the Checkout Session with the brands_blocked parameter set to ['american_express'], which prevents customers from using American Express cards.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d mode=payment \ --data-urlencode return_url="https://example.com/return" \ -d "payment_method_options[card][restrictions][brands_blocked][0]"=american_express

If a customer enters an unsupported card number in Checkout, an error message notifies them that their card brand isn’t accepted.

Card brand filtering on Checkout

An error surfaces informing the customer that you don’t accept Visa (or whatever card brand you have blocked).

Additionally, Link also disables saved cards for returning users if the saved card is blocked.

Card brand filtering on Checkout with Link

If a Link user’s saved card is blocked, it is disabled.

Checkout also filters cards in Apple and Google Pay wallets, customer’s saved payment methods, and networks from co-badged cards.

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