Skip to content

Commit 406eb31

Browse files
author
Andy Phillipson
committed
Minor updates
1 parent 1e048be commit 406eb31

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You must have a BitPay merchant account to use this SDK. It's free to [sign-up
1010
Getting Started
1111
---------------
1212

13-
This SDK provides a convenient abstration of BitPay's [cryptographically-secure API](https://bitpay.com/api) and allows payment gateway developers to focus on payment flow/e-commerce integration rather than on the specific details of client-server interaction using the API. This SDK optionally provides the flexibility for developers to have control over important details, including the handling of private keys needed for client-server communication.
13+
This SDK provides a convenient abstraction of BitPay's [cryptographically-secure API](https://bitpay.com/api) and allows payment gateway developers to focus on payment flow/e-commerce integration rather than on the specific details of client-server interaction using the API. This SDK optionally provides the flexibility for developers to have control over important details, including the handling of private keys needed for client-server communication.
1414

1515
This SDK implements BitPay's remote client authentication and authorization strategy. No private or shared-secret information is ever transmitted over the wire.
1616

@@ -19,7 +19,7 @@ Each client paired with the BitPay server requires a ECDSA key. This key provid
1919

2020
The private key should be stored in the client environment such that it cannot be compromised. If your private key is compromised you should revoke the compromised client identity from the BitPay server and re-pair your client, see the [API tokens](https://bitpay.com/api-tokens) for more information.
2121

22-
This Java SDK provides the capability of internally storing the private key on the client local file system. If the local file system is secure then this is a good option. It is also possible to generate the key yourself (using the SDK) and store the key as required. It is not recommended to transmit the private key over any public or unsecure networks.
22+
This SDK provides the capability of internally storing the private key on the client local file system. If the local file system is secure then this is a good option. It is also possible to generate the key yourself (using the SDK) and store the key as required. It is not recommended to transmit the private key over any public or unsecure networks.
2323

2424
```java
2525
// Let the SDK store the private key on the clients local file system.
@@ -40,10 +40,10 @@ this.bitpay = new BitPay(key);
4040
```
4141

4242
####Pair your client with BitPay
43-
Your Java client must be paired with the BitPay server. The pairing initializes authentication and authorization for your client to communicate with BitPay for your specific merchant account. There are two pairing modes available; client initiated and server initiated.
43+
Your client must be paired with the BitPay server. The pairing initializes authentication and authorization for your client to communicate with BitPay for your specific merchant account. There are two pairing modes available; client initiated and server initiated.
4444

4545
#####Client initiated pairing
46-
Pairing is accomplished by having your Java client request a pairing code from the BitPay server. The pairing code is then entered into the BitPay merchant dashboard for the desired merchant. Your interactive authentication at https://bitpay.com/login provides the authentication needed to create finalize the client-server pairing request.
46+
Pairing is accomplished by having your client request a pairing code from the BitPay server. The pairing code is then entered into the BitPay merchant dashboard for the desired merchant. Your interactive authentication at https://bitpay.com/login provides the authentication needed to create finalize the client-server pairing request.
4747

4848
```java
4949
String clientName = "server 1";
@@ -86,21 +86,7 @@ String invoiceUrl = invoice.getURL();
8686
String status = invoice.getStatus();
8787
```
8888

89-
####Retreive an invoice
90-
```java
91-
invoice = bitpay.getInvoice(invoice.getId());
92-
```
93-
####Exchange Rates
94-
95-
You can retrieve BitPay's [BBB exchange rates](https://bitpay.com/bitcoin-exchange-rates).
96-
```java
97-
Rates rates = this.bitpay.getRates();
98-
99-
double rate = rates.getRate("USD");
100-
101-
rates.update();
102-
```
103-
####Advanced Invoices
89+
####Create an invoice (extended)
10490

10591
You can add optional attributes to the invoice. Atributes that are not set are ignored or given default values.
10692
```java
@@ -117,6 +103,21 @@ invoice.setPosData("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
117103
invoice = this.bitpay.createInvoice(invoice);
118104
```
119105

106+
####Retreive an invoice
107+
```java
108+
invoice = bitpay.getInvoice(invoice.getId());
109+
```
110+
####Get exchange Rates
111+
112+
You can retrieve BitPay's [BBB exchange rates](https://bitpay.com/bitcoin-exchange-rates).
113+
```java
114+
Rates rates = this.bitpay.getRates();
115+
116+
double rate = rates.getRate("USD");
117+
118+
rates.update();
119+
```
120+
120121
# Support
121122

122123
* https://github.com/bitpay/java-bitpay-client/issues

0 commit comments

Comments
 (0)