GithubHelp home page GithubHelp logo

isabella232 / bitpay-go-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitpay/bitpay-go-cli

0.0 0.0 0.0 8.76 MB

The command line client for test driving the bitpay-go library

License: MIT License

Shell 3.75% Go 75.66% Python 20.59%

bitpay-go-cli's Introduction

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 <pairingcode> 

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 <price> <currency>

This returns an invoice id, which can be used in the next step:

$ gobitpay getinvoice <invoiceid>

bitpay-go-cli's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.