Categorygithub.com/ngenohkevin/paybutton
modulepackage
0.0.0-20241221161519-925c129219a4
Repository: https://github.com/ngenohkevin/paybutton.git
Documentation: pkg.go.dev

# README

Bitcoin Payment Button

The Bitcoin Payment Button is a simple Go-based backend application that generates a dynamic Bitcoin address and corresponding QR code for accepting payments. It integrates with a chosen Bitcoin payment processing system to facilitate seamless transactions.

Features

  • Generates a unique Bitcoin address for each payment request
  • Creates a QR code for easy scanning of the Bitcoin address
  • Integrates with a chosen Bitcoin payment processing system
  • Provides an API endpoint for retrieving the payment details and QR code URL

Prerequisites

  • Go 1.16 or later
  • Dependencies managed using Go modules

Installation

  1. Clone the repository:
git clone https://github.com/ngenohkevin/paybutton.git
cd paybutton
  1. Install the required dependencies:
go mod download

Configuration

  1. Create a .env file.
  2. Name it to BLOCKONOMICS_API_KEY=
  3. Save the file.

Usage

  1. Start the Go server:
go run main.go
  1. The server will be running on http://localhost:8080 by default.

API Endpoints

Generate Payment

  • URL: /payment
  • Method: POST
  • Request Body:
{
  "email": "[email protected]",
  "price": 100.0
}
  • Response:
{
  "address": "bc1qnmhyc7kqu4tlzfmtkwhtjlg2zfzl95fkgc2p29",
  "qrCodeURL": "/bc1qnmhyc7kqu4tlzfmtkwhtjlg2zfzl95fkgc2p29.png",
  "email": "[email protected]",
  "priceInBTC": 0.0037451640569115133,
  "priceInUSD": 100
}

Dependencies

Contributing

Contributions to the Bitcoin Payment project are welcome! If you find a bug or have suggestions for improvement, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.


# Packages

No description provided by the author
No description provided by the author

# Structs

No description provided by the author