使用 PayPal Subscriptions API 收取税费

Luk*_*rda 6 paypal subscription paypal-subscriptions tax

作为欧盟卖家,我需要根据客户所在国家/地区的税率和规则收取税款。这意味着当我创建订阅时,我需要指定税率(百分比或金额)或能够覆盖订阅价格。使用Stripe时,只需在创建订阅时指定tax_percentbeside即可。plan_id

到目前为止,我无法使用PayPal Subscriptions API及其智能按钮执行相同的操作。创建计划时可以设置税率,但我需要能够设置每个订阅的税率。

智能按钮 JS 代码示例:

paypal.Buttons({
  createSubscription: function(data, actions) {
    return actions.subscription.create({
      'plan_id': 'P-2UF78835G6983425GLSM44MA',
      // I'd like to be able to set tax rate here somehow
    });
  }
}).render('#paypal-button-container');
Run Code Online (Sandbox Code Playgroud)

直接使用 Subscriptions API 设置税收也不行:

curl -v -k -X POST https://api.sandbox.paypal.com/v1/billing/subscriptions \
   -H "Accept: application/json" \
   -H "Authorization: Bearer Access-Token" \
   -H "Content-Type: application/json" \
   -d '{
      "plan_id": "P-2UF78835G6983425GLSM44MA",
      "application_context": {
        "brand_name": "example",
        "user_action": "SUBSCRIBE_NOW",
        "payment_method": {
          "payer_selected": "PAYPAL",
          "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
        },
        "return_url": "https://example.com/returnUrl",
        "cancel_url": "https://example.com/cancelUrl"
      }
    }'
Run Code Online (Sandbox Code Playgroud)

我是否遗漏了一些东西,错误地思考了这一点,或者PayPal“忘记”实施税率等基本内容,因此使他们的新订阅API无法用于VAT MOSS场景?

小智 5

您可以将税收优惠添加到计划节点,如下所示

    <script>

      paypal.Buttons({
        createSubscription: function(data, actions) {
          return actions.subscription.create({
            'plan_id': 'YOUR_PLAN_ID_HERE', // Creates the subscription
            
            'plan': {
               'taxes': {
                   'percentage': '2.9',
                   'inclusive': false
               }}


          });
        },
        onApprove: function(data, actions) {
          alert('You have successfully created subscription ' + data.subscriptionID); // Optional message given to subscriber
        }
      }).render('#paypal-button-container'); // Renders the PayPal button
    </script>
Run Code Online (Sandbox Code Playgroud)


Mat*_*ann 1

这是一个古老的话题,但仍然不可能。PayPal 不支持订阅税。您可以为订阅定价,使其包含增值税。在用户重定向至付款之前,请提及价格包含增值税。

我强烈建议不要自己执行税收规则。最好让第 3 方 API 处理正确的计算。