https://github.com/bitpay/bitpay-go-cli
The command line client for test driving the bitpay-go library
https://github.com/bitpay/bitpay-go-cli
Last synced: 8 months ago
JSON representation
The command line client for test driving the bitpay-go library
- Host: GitHub
- URL: https://github.com/bitpay/bitpay-go-cli
- Owner: bitpay
- License: mit
- Created: 2015-03-23T14:53:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T17:05:23.000Z (about 6 years ago)
- Last Synced: 2025-04-06T08:03:03.107Z (about 1 year ago)
- Language: Go
- Size: 8.56 MB
- Stars: 6
- Watchers: 7
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BitPay Command Line Tool for Go
This is an example library for integration of the bitpay-go library with a go project. It provides a command line tool that can authenticate with a bitpay server, create invoices, and retrieve invoices.
## Installation and Configuration
Clone this repository and run `source helpers/envioro.sh`
## Basic Usage
The gobitpay tool allows authenticating with BitPay, creating invoices, and retrieving invoices.
### Pairing with Bitpay.com
Before pairing with BitPay.com, you'll need to log in to your BitPay account and navigate to /api-tokens. Generate a new pairing code and use it in the next step.
First you will want to create a client. Creating a client will save some variables in the ~/.bp/ folder. Only one client can be stored at one time. The stored values are a PEM file, the intended api endpoint, and the ssl security preference. To use the bitpay.com test server (test.bitpay.com) the command is:
$ gobitpay new test
Once you have created the client preferences, log in to the endpoint you specificied (in this case test.bitpay.com) and navigate to `dashboard/merchant/api-tokens`. Create a new api token and copy the pairing code displayed. You will use this in the next step.
$ gobitpay pair
This will save a token in the ~/.bp/folder.
### Creating and retrieving invoices
If you have completed the previous step, you can create and retrieve invoices.
$ gobitpay createinvoice
This returns an invoice id, which can be used in the next step:
$ gobitpay getinvoice