Skip to main content

STALLYONS TECHNOLOGIES

Innovating the future of digital with AI, design, and technology. From AI to Web — Stallyons transforms your ideas into digital reality. Building smarter digital experiences through AI, innovation, and technology. Innovating the future of digital with AI, design, and technology. From AI to Web — Stallyons transforms your ideas into digital reality. Building smarter digital experiences through AI, innovation, and technology.
EN
background

Blog

Marketplace PayPal Payments
API

Marketplace PayPal Payments API

A diner taps to pay for a takeaway order. On most sites that money would land in the platform’s account, and the platform would pay the restaurant later. On a marketplace it has to work the other way: the payment goes straight to the restaurant, and the platform quietly keeps its small cut from the same transaction. That is the model a restaurant ordering platform had already built on Stripe Connect, and it wanted the same thing on PayPal.

Stripe is not available in every country, and the client is a member of PayPal’s partner programme, so it wanted restaurants to be able to choose PayPal and still get paid directly, with the platform’s 1% fee collected automatically. Marketplace PayPal Payments is the multiparty PayPal integration we built on the platform’s Parse Server back end to do exactly that, sitting beside the existing Stripe Connect flow rather than replacing it.

Put simply, a restaurant connects its own PayPal account, a diner pays for an order, the money reaches that restaurant, and the platform’s 1% is taken at the same moment. It is the Stripe Connect model the platform already ran, now offered on PayPal as well.

The Starting Point: The Stripe Connect Model, Now on PayPal

The platform was already live and earning its fee through Stripe Connect, so the brief was not to reinvent payments. It was to add PayPal as a second option that behaved the same way, inside a codebase an active team was working in every day. That shaped the requirements.

  • Pay the restaurant, not the platform. Each payment had to reach the restaurant that fulfilled the order, rather than landing with the platform to be paid out later.
  • Collect the fee automatically. The platform’s 1% had to be taken from every order at payment time, with no manual invoicing.
  • Sit beside Stripe Connect. PayPal had to be a choice a restaurant could make without disturbing the Stripe flow already in place.
  • Let restaurants connect their own accounts. A restaurant owner needed to link their own PayPal account from the admin panel, under the marketplace, through PayPal’s partner onboarding.
  • Fit an active codebase. The work had to live on the client’s own servers and branches, alongside the changes its developers were already making.

The Build: Onboard a Restaurant, Then Pay It Directly

Wiring a marketplace’s money flow to a second payment provider is careful API development services work, because the back end has to speak PayPal’s partner and payments APIs correctly while the rest of the platform carries on unchanged. The flow runs in a clear order:

  1. From the admin panel, a restaurant owner chooses to get paid with PayPal and is taken through PayPal’s partner onboarding to connect their own account.
  2. PayPal reports the result through a webhook, and the Parse Server updates the restaurant’s record so the platform knows it can accept PayPal payments.
  3. A newly connected restaurant is marked active through that webhook, rather than on trust.
  4. When a diner pays for an order, the back end creates the PayPal payment on behalf of the restaurant, with the platform’s fee attached.
  5. In that one transaction, the money reaches the restaurant and the 1% reaches the platform.
  6. Payment events come back through webhooks for the back end to act on, keeping each order’s status in step with PayPal.

The work moved through a clear sequence of its own: we studied the existing Stripe Connect flow, agreed the PayPal flow with the client, stood up the stack and demonstrated onboarding, moved onto the client’s own dev server and branches, confirmed a restaurant as active through the webhook, and finally paid an order through PayPal with the platform fee, handed over on a recorded walkthrough. A test payment button in the order-management screen let us prove the whole flow end to end before the client’s own team connected it to the diner-facing app. Building the money layer for a multi-restaurant marketplace like this is SaaS platform work as much as payments work, since every restaurant is a separate payable party under one platform, and each has to be onboarded, verified, and paid without the others being affected.

Technical Architecture

The integration lives in the platform’s existing back end rather than in a separate service, so PayPal becomes another capability of the same system that already runs Stripe Connect. Each part has a defined role.

  • Back end. Parse Server on Node.js, the platform’s existing API layer, handles onboarding, payments, and webhook events.
  • Payments. PayPal’s multiparty partner model pays restaurants directly while attaching the platform’s fee to each order payment.
  • Events. PayPal webhooks confirm onboarding and report payment status, keeping the platform’s records in step with PayPal.
  • Database. MongoDB holds the business and order records, including whether a restaurant is active for PayPal.
  • Admin. A Vue.js and Quasar admin is where restaurant owners connect PayPal and where orders are managed, with Stripe Connect already in place.
  • Environment. Work was built and tested against PayPal’s sandbox, on the client’s own dev server and Git branches.

The hard part is trusting what PayPal tells you. A restaurant is only payable once PayPal confirms the connection through a webhook, and an order is only settled once the payment events say so, which means the integration has to treat webhooks as the source of truth and keep the platform’s own records lined up with them rather than assuming a step worked.

Challenges Solved

The first real obstacle was the environment. A separate copy of the stack behaved differently from the client’s own servers, so results built in isolation could not be trusted. The work moved onto the client’s own development environment, on dedicated branches agreed with its developers, so every change could be tested alongside the team’s active work and verified on the servers that actually mattered.

The second was drawing a clean line through a shared system. We focused on the back end and the webhooks, the part that onboards restaurants and moves the money, while the client’s own developer connected the diner-facing checkout in the app. A test payment button in the order-management screen gave both sides a way to prove the payment flow end to end before the two halves were joined, so neither team was waiting on the other to see whether a payment actually worked.

The Result

Restaurants can now connect their own PayPal accounts under the marketplace, be confirmed as active through PayPal’s webhook, and be paid directly for orders with the platform’s 1% taken at payment time, all beside the Stripe Connect flow that was already running. An order was paid through PayPal with the platform fee on the client’s development server, proving the model end to end. The platform’s restaurants are no longer limited to regions where Stripe is available, and the client went on to ask us to quote further payment gateways and to treat us as its back-end payments partner.

If you run a marketplace and need a second way to pay your sellers, you can hire Node.js developers who have built multiparty payments on a live platform, or tell us how your marketplace pays its sellers and we will map the onboarding, the fee, and the webhooks to your stack. This kind of split-payment work fits online ordering and marketplace businesses that take money on behalf of the sellers they host.

Frequently Asked Questions

What is Marketplace PayPal Payments?

It is a multiparty PayPal integration built on a restaurant ordering platform’s Parse Server back end. It lets restaurants connect their own PayPal accounts under the marketplace, so diners pay them directly and the platform’s 1% fee is collected automatically, alongside the platform’s existing Stripe Connect flow.

How does the platform collect its fee?

When a diner pays for an order, the back end creates the PayPal payment on behalf of the restaurant with the platform’s fee attached. The money reaches the restaurant and the 1% reaches the platform in the same transaction, so there is no separate invoicing step.

Why add PayPal when the platform already used Stripe Connect?

Stripe is not available in every country. The client is a member of PayPal’s partner programme and wanted restaurants to be able to choose PayPal and still get paid directly, which widens the regions where restaurants can accept online payment. PayPal sits beside Stripe Connect rather than replacing it.

How does a restaurant become payable?

The owner connects their own PayPal account from the admin panel through PayPal’s partner onboarding. PayPal confirms the result through a webhook, and only then is the restaurant marked active and able to accept PayPal payments, so nothing is trusted until PayPal confirms it.

Who built the diner-facing checkout?

We focused on the back end and the webhooks, the part that onboards restaurants and moves the money with the platform fee. The client’s own developer connected the payment flow to the diner-facing app, with a test payment button in the order-management screen used to prove the flow first.

Leave a Reply