Reputation: 835
I'm trying to figure out how to do payouts to multi-party transactions on PayPal. The multi-party payment system documentation is good, but I can't figure out this one detail.
Lets say you have a 3rd party selling something on your platform. They sell one item for 19.99 USD. When the user goes to checkout there's taxes and fees going into this order
So the seller gets the split of 19.99, and then the taxes and fees go to the first party. Are these taxes and fees considered a purchase_unit under the guidelines of the multi-party payment API?
Im using the paypal docs here: https://developer.paypal.com/api/orders/v2/#orders_create
Right now I have this,
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);
I'm trying to figure out if the taxes item along with the actual item is necessary or not. By not having a separate purchase unit I believe I can dodge an extra paypal transaction fee. Any help would be appreciated!
Upvotes: 0
Views: 425
Reputation: 30369
If the tax is to be collected by the first party, you can add it as a "breakdown" object within the amount, for display purposes -- and also to the platform_fees, so that it is deducted from what the third party seller receives...
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. */
}
}]
},
}
Upvotes: 1