Uses nodejs version 20 or greater.
If you see error
> node --no-warnings --env-file=.env stripe.js
it means you need to use version 20 or greater (nvm use 20
).
Notes
- Stripe can go to
reauth
URL even when creation succeeded. Need to check requirements on the account.
Fondy marketplaces are implemented as a hack. Fondy uses their base database representation of merchant accounts, and then manually adds flags like "this account is a marketplace fee distributor" to achieve the desired legal and programmatic behavior.
npm install
npm run fondy
Then, follow the payment flows to put a hold on a card, and then click the "Accept Booking" or "Reject Booking" to do those actions.
A "FOP" (фоп) is a Ukrainian LLC for small businesses, with low total effective tax rate(~5%). They're intended for businesses that make under $200K/year or so.
They do require registration, but it's a fairly streamlined procedure. Most Ukrainian stylists who do moderate volume should use this.
Stylist registers their Ukrainian bank account number with us (looks like a credit card number; Ukrainian accounts use debit cards as account ids and cards, dual purpose).
- Client pays our merchant account (or we pre-authorize)
- Our merchant account sees successful payment or preauth
- Upon completion of service, we initiate payment to the stylist's card.
Explanation in fondy.js
:
runInteractionB()
. This calls back to theresponse_url
endpoint in the Express server, which prints the payment status.- We save that response
- Use the code from
payoutStylistCard
orcaptureForStylistCard
to pay the stylist.