You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Stripe Checkout支付后,能否向Stripe Dashboard的Payments传递账单地址?

Stripe Checkout账单地址关联支付记录的参数问题解答

问题1:Stripe Checkout支付后,是否存在直接向Stripe Dashboard的Payments传递账单地址的参数?

有的,不需要用metadata绕路——你可以直接在创建Checkout Session时,通过payment_intent_data.billing_details参数传入完整的账单信息,包括姓名、电话、地址等。支付完成后,这些信息会直接关联到对应的Payment Intent,在Stripe Dashboard的Payments模块的具体支付记录详情中显示(在「账单详情」区域)。

另外,如果需要让用户在支付时自行填写账单地址,还可以在Checkout Session中设置billing_address_collection: "required",用户填写的地址也会自动同步到Payment Intent的账单详情里。

问题2:若不存在,Stripe是否会为payment_intent_data新增billing_address参数?

不存在这个需求,因为目前payment_intent_data下已经有billing_details参数,这个字段本身就包含了name、phone、address等完整的账单信息字段,完全覆盖你需要传递的内容,不需要额外新增参数。

Django代码示例

import stripe
stripe.api_key = settings.STRIPE_SECRET_KEY

# 创建Checkout Session
checkout_session = stripe.checkout.Session.create(
    payment_method_types=["card"],
    line_items=[
        {
            "price": "price_xxxxxx",  # 替换为你的价格ID
            "quantity": 1,
        }
    ],
    mode="payment",
    success_url=settings.STRIPE_SUCCESS_URL,
    cancel_url=settings.STRIPE_CANCEL_URL,
    # 直接传入账单信息到Payment Intent
    payment_intent_data={
        "billing_details": {
            "name": "用户姓名",
            "phone": "138xxxxxxx",
            "address": {
                "line1": "街道地址",
                "city": "城市",
                "state": "省份/地区",
                "postal_code": "邮政编码",
                "country": "CN",  # 两位国家代码
            }
        }
    }
)

补充说明

你提到的Customer模块的address参数确实仅关联到客户的账单详情,无法直接对应到单条支付记录;而payment_intent_data.billing_details是绑定到具体支付Intent的,完全满足你让账单地址显示在Payments模块支付记录里的需求。

内容的提问来源于stack exchange,提问作者Super Kai - Kazuya Ito

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 22:52:13