Payments flow for purchasing digital goods of onboarded partners

theliveoffice
Contributor
Contributor

We are setting up a service through our website, where onboarded partners who go through the Partner Referrals API will have the ability to sell digital products/subscriptions. We intend to have payments processed through the website, and then payout the partner the transaction, minus a set fee we take on each transaction.

 

I have looked through the Orders API and Payments API, and can't figure out how to attach product information to the order such as product description and more importantly, how to attach the partners merchant-id to the transaction so we can determine which partner should be paid.

 

How can we associate a merchant-id to a subscription/digital good and subtract our fee from the transaction before performing a payout to the partner?

 

We have already been granted access to the Partner Referrals API and I'm able to onboard a user and retrieve their merchantIdInPayPal which I'm assuming is what I need to pass into the transaction.

Login to Me Too
1 REPLY 1

MTS-Aaron
PayPal Employee
PayPal Employee

Hi @theliveoffice 

 

I'd be happy to help take a stab at this. So you'll want to be using the Orders V2 API for this. The way you pass the merchant ID that you've got for the partner is in the "merchant_id" field of the "payee" object which is in the "purchase_unts" object. You can see this here. In that link you can click on the payee object to see the parameters: either an email address or a merchant ID for the receiver of the payment.

 

In that same "purchase_units" object, you can pass a description of the order as well as an array of the "item" object for each object you may have in the order.

 

Just one more note, in the "purchase_units" object, you have a "payment_instruction" object you can have the "platform_fee" object, which you pass the amount that you as the partner want to take out of the transaction, as well as the payee (so either your email address or your merchant ID) for where those fees should be sent to. This way, each transaction doesn't require another API operation on top of it to make sure you get your cut of the transaction.

 

I hope that helps!

-Aaron

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.