creating users via custom program

hello everyone
:bulb: is there any way to create users for hotspot from a custom program made by php and change the credit of them .
i’ve seen this situation in a hotel that when operator check in for new customer automatically it made a user for customer.
the source code is ready but don’t know how to connect mikrotik ?is there something i should do in mikrotik ???

Look into User Manager. If your able to program in PHP, you won’t have too much trouble after that.