Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/falcucci/hedera-payments
A secure, flexible, and reliable open source payment system built on top of the Hedera Hashgraph distributed ledger providing a way to securely manage payments.
https://github.com/falcucci/hedera-payments
blockchain golang
Last synced: 3 days ago
JSON representation
A secure, flexible, and reliable open source payment system built on top of the Hedera Hashgraph distributed ledger providing a way to securely manage payments.
- Host: GitHub
- URL: https://github.com/falcucci/hedera-payments
- Owner: falcucci
- Created: 2019-08-08T18:17:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T22:10:43.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T02:59:49.824Z (12 days ago)
- Topics: blockchain, golang
- Language: Go
- Homepage:
- Size: 2.65 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Hedera Coin Payments API
This repository contains a simple API for integrating Hedera Coin payments into your application. With this API, you can easily send and receive payments using Hedera's native cryptocurrency, HBAR.
### Prerequisites
Before you can use this API, you will need to sign up for a Hedera account and obtain API keys. These keys will allow you to authenticate your API requests and access the payment functionality.
### Getting Started
To get started with the Hedera Coin Payments API, you will need to clone this repository and install the required dependencies.
```bash
git clone https://github.com/falcucci/hedera-coin-payments-api.git
cd hedera-coin-payments-api
npm install
```Next, you will need to configure the API by setting your Hedera API keys in the .env file.
```bash
# .env
HEDERA_PUBLIC_KEY=
HEDERA_PRIVATE_KEY=
```Once you have configured the API, you can start the server by running the following command:
```bash
npm start
```
The API will be running at http://localhost:3000.### API Endpoints
The Hedera Coin Payments API provides the following endpoints:
`POST /payment`: Send a payment to a specific address.
`GET /balance/:accountId`: Check the balance of a specific account.
`GET /transactions/:accountId`: Retrieve a list of transactions for a specific account.
Examples
Here are some examples of how to use the API:
##### Send a payment
```bash
curl -X POST -H "Content-Type: application/json" -d '{"to": "3f9a07d83c604dba400d13df4d3456", "amount": 100}' http://localhost:3000/payment
```##### Check the balance
```bash
curl http://localhost:3000/balance/3f9a07d83c604dba400d13df4d3456
```##### Get the transactions
```bash
curl http://localhost:3000/transactions/3f9a07d83c604dba400d13df4d3456
```### Contributing
If you would like to contribute to the development of this API, please fork the repository and submit a pull request.
### License
This project is licensed under the MIT License - see the LICENSE file for details.