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

调用Paypal Create agreement API如何隐藏结算页收货地址区块

要隐藏Paypal结算页的收货地址区块,你只需要将no_shipping: 1参数添加到请求体的override_merchant_preferences对象中即可。

修改后的完整请求体如下:

{
    "name": "user@user.com Agreement",
    "description": "Essential 1  Plan - 19$ trial 7 days - 1$",
    "start_date": "2021-11-11T00:52:01Z",
    "payer": {
        "payment_method": "paypal"
    },
    "plan": {
        "id": "P-XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "override_merchant_preferences": {
        "setup_fee": {
            "value": 0,
            "currency": "USD"
        },
        "return_url": "http://domain.local/membership/checkout/success",
        "cancel_url": "http://domain.local/membership/checkout/cancel",
        "auto_bill_amount": "YES",
        "initial_fail_amount_action": "CONTINUE",
        "max_fail_attempts": 2,
        "no_shipping": 1
    }
}

no_shipping参数支持三个取值:

  • 0:默认值,允许买家填写收货地址
  • 1:完全隐藏收货地址区块,适配数字产品售卖场景
  • 2:显示收货地址字段,但不强制买家填写

如果配置后依旧不生效,可以检查你关联的订阅Plan本身的全局商户偏好配置,避免全局配置覆盖了本次请求的覆盖参数。

Paypal结算页收货地址区块示例

内容的提问来源于stack exchange,提问作者Vanya Avchyan

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.26 17:48:07