简体   繁体   中英

PayPal Payouts via W3C Web Payments API

PayPal provide payout payment functionality to their merchants/customers via a native bespoke API. Is there anyway other than this feature request to surface the functionality via the Web Payments API ?

Great news!

@adrianhopebailie has detailed a solution right here right now for Web Payment Disbursement functionality that requires no (absolutely ZERO) changes to the Payment Request OR Payment Handler APIs and W3C standards! (Always a bonus :-)

As he correctly points out, the methodData argument is opaque and pretty much down to the autonomous Payment Handler to specify. So Stripe, Square, and PayPal are free to specify to their customers the format/naming-convention for communicating Application Fees between Web App supplier and Stripe.

To quote Adrian's example: -

const methodData = [
  {
    supportedMethods: "https://square.com/",
    data: {
      parties: [{ 
        merchantId: "super-mini-cabs",
        portion: 0.1
      },{ 
        merchantId: "driver-fred",
        portion: 0.9
      }],
    },
  },
  {
    supportedMethods: "https://stripe.com",
    data: {
      application_fee_amount: 1.00,
    },
  },
  {
    supportedMethods: "https://paypal.com",
    data: {
      payouts: [{ 
        paypalId: 12478764,
        amount: 1.00
      },{ 
        paypalId: 23448764,
        amount: 9.00
      }],
    },
  },
];

Just tell us PayPal what you need us to tell you and it's done!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM