Answer the question
In order to leave comments, you need to log in
How to make payment to dynamic accounts?
Hello, I'm working on creating a marketplace for establishments (cafes, restaurants, food delivery services)
On the part of the establishments, they can place any goods
And customers should be able to order these goods and pay
The problem is how to make a payment to the establishment's account without knowing secret keys from the account of the institution
For example, we take paypal, if you look at the sdk, then when you initialize it, you need to enter client_id client_secret to do any actions with the sdk
, but in my case I will not have a client_secret and the client_id will be dynamic, depending on which institution the payment is intended for
I searched a lot and have a couple of theories on how this can be done, but since I have never worked with payments, I don’t know how adequate it is
1 I saw that you can just use the link https://www.npmjs.com/package/react-paypal-button-... on the front and specify the client_id and amount there, that is, dynamically substitute this data on the front, and as a result send payment to the backend that the payment was made, but there are a couple of snags, I don’t know how safe it is and I understand that I won’t be able to see how much the user paid (the user can just change the amount directly in the code and pay less), in this case I you will have to check the account every time whether the payment went through and whether as much money has passed as it should have been
2 well, or the second option is to create an intermediate paypal account (an account of our platform comes out), use access from this account for sdk and accept all payments first to the account of the platform account, check whether everything has arrived correctly, whether the amount is correct and then send from your account to opening an account through sdk (for some reason I doubt that you can send money through sdk)
For now I focus on stripe paypal
I would be very grateful for any help, links to resources, etc.
Please answer only the essence of the issue, and do not waste your time and mine)
Answer the question
In order to leave comments, you need to log in
in which country are your establishments located? judging by stripe paypal, you are not in Russia?
creating a payment account for each establishment is terribly inconvenient, a lot of bureaucracy for connecting each partner
The most standard way is to open a company, connect the acceptance of payments to it, conclude an agency agreement with many establishments of companies, the acquiring bank sends all payments to your company's account, then you through your Internet bank (some banks even have an API, by the way), you send money to many of your partner institutions.
In the scheme, when you pass money through yourself, the main thing is not to screw up with taxes. At a minimum, an agency agreement is needed with all the final beneficiaries. Otherwise, it will turn out that you have a huge profit and you have to pay tax on it ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question