代码之家  ›  专栏  ›  技术社区  ›  Shooting Stars

PayPal获取订单上的税费

  •  0
  • Shooting Stars  · 技术社区  · 4 年前

    我想知道如何在PayPal上对多方交易进行支付。多方支付系统文档很好,但我搞不懂这一个细节。

    假设你有一个第三方在你的平台上卖东西。他们以19.99美元的价格出售一件商品。当用户去结帐时,这个订单上有税费

    所以卖方得到19.99的分成,然后税费归第一方。根据多方支付API的指导原则,这些税费是否被视为购买单位?

    我在这里使用paypal文档: https://developer.paypal.com/api/orders/v2/#orders_create

    现在我有这个,

             var item = {
                reference_id: "REFID-"+ (i+1),
                payee: {
                    email: email
                },
                amount: {
                    currency_code: currency,
                    value: (price / 100)
                },
                payment_instruction: {
                  disbursement_mode: "INSTANT",
                  platform_fees: [{
                    amount: {
                        currency_code: currency,
                        value: ((price / 100) * 0.03).toFixed(2),
                    }
                  }]
                },
            }
    
    
            purchase_units.push(item);
    
            var taxes = {
              reference_id: 'REFID-'+0,
              amount: {
                  currency_code: currency,
                  value: ((totalPrice * cali_tax) / 100).toFixed(2)
              }
            }
    
            purchase_units.push(taxes);
    

    我想弄清楚税收项目和实际项目是否有必要。通过没有单独的购买单元,我相信我可以避免额外的paypal交易费用。任何帮助都将不胜感激!

    0 回复  |  直到 4 年前
        1
  •  1
  •   Preston PHX    4 年前

    如果税款由甲方征收,您可以将其添加为 "breakdown" object within the amount ,用于展示目的——也包括平台费用,以便从第三方卖方收到的费用中扣除。。。

            amount: {
                currency_code: currency,
                value: (price / 100)
                /* add "breakdown" object here with additional tax and pre-tax subtotal */
            },
            payment_instruction: {
              disbursement_mode: "INSTANT",
              platform_fees: [{
                amount: {
                    currency_code: currency,
                    value: /* This amount should be everything the first party is intended to collect. Fees, and any taxes if applicable. */
                }
              }]
            },
        }
    
    推荐文章