BytePayments is a self hosted crypto payment gateway for accepting crypto funds directly to your wallet. For now it only supports TRX.
- Accept TRX Payment.
- Create Payment.
- Cancel any created payment.
- List the available currencies (It's an array though but we have only trx for now, planned to add more in future).
- Check a created payment status (completed,pending,cancelled).
- Set the percentage of amount that is okay to be paid to mark the order as completed (eg : 95% payment marks the order as completed).
- Handle Overpaid and Underpaid senario.
- Send payment invoice directly to the users email after done.
- After payment done sweep the funds to your main master wallet (Gas Fees Auto Calculated).
- Go (the goat).
- Fiber (web framework based on fasthttp,net/http kinda slow)
- Gorm (ORM library).
- MySQL the OG DB.
- Swagger (for api docs).
- Air (for live reload)
The API documentation is available via Swagger UI and is automatically generated from the code comments.
- Development Mode: Swagger UI is available at
http://localhost:8080/swagger/whenAPP_ENV=development - Production Mode: Swagger UI is disabled for security reasons when
APP_ENV=production
To enable Swagger UI, set the following in your .env file:
APP_ENV=developmentFor production, set:
APP_ENV=productionIf you modify the API endpoints or add new ones, regenerate the Swagger documentation:
swag init -g cmd/main.goContributing Guide : Yeah it's open for contribution but for existing bug or security issue fix. We do not expect any major breaking change right now.For example a new currency, but if you want to do that first discuss in the issue thread.
Tip
For testing the gateway first change the enviroment to development APP_ENV=development and when
switching to production APP_ENV=production. For testing we will use grpc.shasta.trongrid.io:50051
and if you want to get trx for testing first generate a wallet and go to here to refill with test trx funds (it's not real btw) shasta
Note
Please do not open a issue like this "Hey, the project not following x and y framework guidelines, best practices" cause we don't care as long as it's performance effecient and works. Always open to take suggestion related to performance improvement. Thanks
Caution
This project has been tested internally and currently in alpha. Use at your own risk cause this can cause fund loss. Also if Crypto Currency maybe banned or not recognized in your country so use it at your own risk, we are not responsible for any loss or legal drama.