调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
销售收入
平台和交易市场
资金管理
开发人员资源
概览
关于 Stripe 支付
升级您的集成
支付分析
线上付款
概览查找您的用例Managed Payments
使用 Payment Link
构建结账页面
    概览
    快速开始
    自定义外观样式
    收集额外信息
    收税
    动态更新结账流程
    管理产品目录
      管理有限库存
      将行项目设置为可调
      让客户决定为什么付钱
    订阅
    管理支付方式
    让客户用本地货币支付
    添加折扣、追加销售和可选商品
    设置未来付款
    支付过程中保存付款详情
    在您的服务器上手动批准支付
    付款后
    具有 Checkout Sessions API Beta 更改日志的 Element
    从传统 Checkout 迁移
    迁移 Checkout 来使用 Prices
构建高级集成
构建应用内集成
支付方式
添加支付方式
管理支付方式
用 Link 更快结账
支付接口
Payment Links
结账
Web Elements
应用内 Element
支付场景
处理多种货币
自定义支付流程
灵活收单
编排
线下支付
Terminal
超越支付功能
成立公司
加密货币
Financial Connections
Climate
了解欺诈
Radar 欺诈保护
管理争议
验证身份
首页付款Build a checkout pageManage your product catalog

Let customers decide what to pay

Accept tips and donations, or sell pay-what-you-want products and services.

Inline pricing

If you maintain your product catalog outside of Stripe, you might want to use inline pricing. With inline pricing, you set inline prices for products or services when you create a Checkout Session.

You can also use inline pricing to collect donations. However, unlike pay-what-you-want pricing, you can’t reuse or update inline prices, and they’re only available through the API.

You can use this feature to collect a tip for a service provided, accept donations for a cause, or give your customers the option to pay what they want for your product or service. Go to Stripe Support to learn more about Stripe’s requirements for accepting tips or donations.

Pay-what-you-want payments have the following limitations:

  • You can’t add any other line items and the quantity can only be 1.
  • You can’t use promotion codes or discounts with them.
  • They don’t support recurring payments or optional items.
Custom amounts

Set up your product catalog

Stripe Checkout uses Products and Prices to structure pay-what-you-want payments. In the following example, Togethere is selling tickets to a fundraising dinner and wants to allow their customers to pay what they want for their tickets.

To create a pay-what-you-want model on Stripe through the Dashboard, complete these steps:

  1. Create the Fundraising dinner product.

    1. Go to More > Product catalog.
    2. Click +Add product.
    3. Enter the Name of the product (Fundraising dinner).
    4. (Optional) Add a Description. The customer sees the description at checkout.
  2. Create the price for the Fundraising dinner product:

    1. Click on More pricing options at the bottom.
    2. Select One-off.
    3. Select Customer chooses price in the Choose your pricing model dropdown.
    4. (Optional) Add a suggested price.
    5. (Optional) Specify limits that the customer can input.
    6. Click Next and Add product.

Create a Checkout Session

To enable customers to change the amount on the payment page, use the price ID when you create a Checkout Session. If you select Customer chooses price as your pricing model, you can’t add any other line items and the quantity can only be 1.

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
:"
\ --data-urlencode cancel_url="https://example.com" \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d mode=payment \ --data-urlencode success_url="https://example.com/success"
此页面的内容有帮助吗?
是否
  • 需要帮助?联系支持。
  • 加入我们的早期使用计划。
  • 查看我们的更改日志。
  • 有问题?联系销售。
  • LLM? Read llms.txt.
  • Powered by Markdoc