How to pay multiple people in node.js

I am trying to implement something where you pay someone (me), and also someone else automatically in node.js/react but I am finding it really difficult to find something on exactly how to do this.

Currently I am using paypal to send payments to sandbox accounts, however cant seem to find anything on how to send to myself and another user at the same time. I researched the paypal API docs and many options are deprecated with little guidance online.

below is my current code to send a single payment.

 useEffect(() => {
            createOrder: (data, actions, error) => {
                return actions.order.create({
                    intent: "CAPTURE",
                    purchase_units: [
                            description: "Online Therapy",
                            amount: {
                                currency_code: "GBP",
                                value: price,
            onApprove: async (data, actions) => {
                const order = await actions.order.capture();
                if (order.status === "COMPLETED") {
            onError: (error) => {
    }, []);

If anyone can point me in the right direction that would be much appreciated for me and others who I have seen have the same issue.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum