NAV
cURL C# Java PHP Node.js Go Python Ruby

REST API

Overview

BitPay provides a standards-based REST interface which enables application developers to interact in a powerful, yet secure way with their BitPay account. Using the BitPay API, clients can create and manage invoices, issue refunds, manage bills, retrieve real-time rates information, view merchant ledger entries, and much more.

Developers may call the API directly over HTTPS using the language of their choice, or take advantage of BitPay's code libraries (Java, C#, PHP etc).

Concepts

Api Contracts

BitPay considers the following types of API changes to be non-breaking and backwards-compatible:

Identities

Authentication in BitPay's API utilizes a specialized identification scheme, BitAuth Identity Protocol.

BitAuth uses the same technology in Bitcoin. A public private key pair is created using elliptic curve secp256k1. The public SIN (System identification number), like a bitcoin address, is the RIPEMD 160, SHA256 hash of the public key. See the Bitcoin Wiki for complete details:

For your convenience, all client libraries available on BitPay's GitHub account support this functionality.

Environments

There are two environments available for merchants to use the following API.

To access these APIs, merchants need to combine the base URL + endpoint and make sure to have API credentials for the corresponding environments.

Environment Base URL API Credentials
Test https://test.bitpay.com test account
Production https://bitpay.com production account

API Tokens

Authorization in BitPay's API utilizes Capability-based Security principles. Each API call must be accompanied by an API Token which grants access to the requested capability. API Tokens are analagous to a real-world event ticket, which grants access to a specific event when presented at the door. Also like tickets, they may grant broad or narrow privileges (e.g. 'General Admission' vs. 'Seat 44B') as well as add bearer requirements (e.g. 'Must be over 21' or 'Non-transferrable, must show ID').

New tokens are provided with each response from the API. For example, creating a new Invoice with one token will provide a new, second token that grants access to view and interact with that Invoice exclusively. If not using BitPay's Client Libraries, you will need to keep track of these tokens on your own.

Facades

Facades named collections of capabilities that can be granted, such as the ability to create invoices or grant refunds. In the ticket analogy, this corresponds to the ticket 'level', where a 'VIP' ticket would confer broader access than a 'Standard' level ticket. When registering an Identity, it is against a specific facade. Best practices suggest that the requested facade should be limited to the minimum level that grants the required capabilities.

Facade Capabilities Description
public The implicit facade applied when no token is provided. Provides access to public methods for generating merchant applications, generating and claiming tokens, or checking exchange rates.
pos Limited to creating new invoice or bills and search specific invoices or bills based on their id for the merchant's organization
merchant The broadest set of capabilities against a merchant organization. Allows for create, search, and view actions for Invoices and Bills; ledger download, as well as the creation of new merchant or pos tokens associated with the account.
payout This is the facade which allows merchant to access the Payouts related resources and corresponding endpoints. Access to this facade is not enabled by default, for more information please contact our support channel.

Getting Access

To use any non-public facade a token will need to be sent with the API request. Tokens can require authentication, which would requiring cryptographically signing each request. You can either generate a token directly from an API client or via the My Account -> API Tokens page. To receive a token directly from an API client, send a POST request to bitpay.com/tokens with the following query parameters:

This will respond with a new token that will include a pairingCode. This pairing code can then be shared with a merchant organization administrator to approve access. This can be done by visiting My Account -> API Tokens and entering the pairing code, or by visiting the url format: bitpay.com/api-access-request?pairingCode=<pairingcode_goes_here>.

Alternatively, pairing codes can be generated directly at My Account -> API Tokens, and can then be claimed by API clients which associates a Client ID with the token, and will activate it for further usage. To claim a token from an API client, send a POST request to bitpay.com/tokens with the following parameters:

A token without a Client ID authentication restriction can be made, and a token can then be copied directly to make API calls, such as creating invoices.

Making Requests

Requests to the BitPay REST API follow a RESTful convention using standard HTTP verbs against various BitPay resources to return JSON formatted responses. Once again the mechanics of this exchange may be simplified through the use of one of the BitPay libraries.

Each request should include in the HTTP headers:

Depending on the facade used, API requests may need to be signed and include the following headers:

To make an API request send an HTTP request with a HTTP method to a resource URI and include in the body JSON parameters of the following (plus any additional parameters needed):

For more information about specific resource URIs and parameters, please visit the Resource section. The following statuses will be used in the resource description to inform you if a given parameter should be present in the request:

Presence
Mandatory M
Conditional C
Optional O

Signing your request

Depending on the facade used, API requests may need to be signed The X-Signature HTTP header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key. So if you are sending a request to:

https://bitpay.com/invoices

And your request body is:

{"price":500,"currency":"USD","token":"MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"}

The string you will sign is:

https://bitpay.com/invoices{"price":500,"currency":"USD","token":"MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"}

The result should be included as the value of the X-Signature request header.

Cross-Origin Resource Sharing

The BitPay REST API supports CORS, so that you may send requests directly from the client, however remember to never expose your private key. If your key becomes compromised, you will want to disable your old Client ID and register a new one.

Error Codes

An error code consists of 6 digits. The first two digits of an error code represent the HTTP method that was used to call it. The next two digits refer to the resource that was impacted. The last two digits refer to the specific error.

Error Response Format

Example response format

{
    "status": "error",
    "code": "010207",
    "data": null,
    "error": "Invalid invoice state for refund"
}
Name Type
status
Will always be “error” for an error response
string
code
6 digit error code
string
data
Will be null for an error response
string
error
The error message
string

HTTP Method - First two digits

Name Type
00xxxx
Generic, unmapped error
string
01xxxx
POST error
string
02xxxx
GET error
string
03xxxx
PUT error
string
04xxxx
DELETE error
string

Resource and Error - Last four digits

Unmapped Errors: xx00xx

These errors are not mapped to a specific resource

Name Type
xx0000
Generic server error
string
xx0001
Resource not found
string
xx0002
Invalid parameters
string
xx0003
Missing parameters
string
Invoice Errors: xx01xx

These errors are mapped to the invoice resource

Name Type
xx0100
Generic invoice error
string
xx0101
Invoice not found
string
xx0102
Invalid parameters
string
xx0103
Missing parameters
string
xx0108
Invoice is missing email or SMS
string
xx0109
SMS not verified
string
xx0110
Invoice price is below minimum threshold
string
xx0111
Invoice price is above maximum threshold
string
xx0112
Invalid SMS number
string
xx0113
Error verifying SMS
string
xx0114
Unable to update contact information on high value transaction
string
xx0115
Email already set on invoice
string
xx0116
Unable to perform action outside of demo environment
string
xx0117
Invalid invoice state
string
xx0118
Misconfigured account
string
Refund Errors: xx02xx

These errors are mapped to the refund resource

Name Type
xx0200
Generic refund error
string
xx0201
Refund not found
string
xx0202
Invalid parameters
string
xx0203
Missing parameters
string
xx0204
Active refund request already exists
string
xx0207
Invalid invoice state for refund
string
xx0208
Fees are greater than refund amount
string

Resources

Tokens

Resource

Tokens are API access identifiers which are associated with a set of capabilities. A capability may be very broad, for example, retrieve the list of all exchange rates. Or a capability may be very specific, for example, refund invoice RhHwkycGaDskrEhGfXWnRG.

Name Type returned via facade
public merchant
data array
policies object
policy
Can be "sin", "access", "events", "id", or "session"
string
method
Can be "requireSin", "requireFacadeAccess", "allowEventStream", "invalidated", "inactive", "unclaimed", "requireSession"
string
params
Can be "support", SIN value, or null
array
resource
Token identifier. This field can be ignored in merchant implementations.
string
token
API token for token resource
string
facade
Can be "merchant", "pos" or "payout"
string
dateCreated
UNIX time of creation, in milliseconds
string
pairingExpiration
UNIX time of expiration, in milliseconds
number
pairingCode
Access approval code. To be validated via the BitPay dashboard in order to activate the token returned in the same payload.
string

Request an API token

POST
https://bitpay.com/tokens
Facades

public merchant

HTTP Request

via the public facade (unsigned requests)

curl -X POST \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
--url "https://bitpay.com/tokens" \
-d @- <<'EOF'
{
"id":"Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW",
"label": "merchantwebsite.com",
"facade":"merchant"
}
EOF
var resourceUrl = "https://bitpay.com/tokens";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";

string json = "{" +
                  "\"id\": \"Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW\"," +
                  "\"label\": \"merchantwebsite.com\"," +
                  "\"facade\": \"merchant\"" +
              "}";

using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
    streamWriter.Write(json);
    streamWriter.Flush();
    streamWriter.Close();
}

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/tokens";
var json = "{" +
               "\"id\": \"Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW\"," +
               "\"label\": \"merchantwebsite.com\"," +
               "\"facade\": \"merchant\"" +
           "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .uri(URI.create(resourceUrl))
   .POST(HttpRequest.BodyPublishers.ofString(json))
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/tokens';

$postData = json_encode([
   'id' => 'Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW',
   'label' => 'merchantwebsite.com',
   'facade' => 'merchant'
]);

$curlCli = curl_init($resourceUrl);

curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json'
]);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curlCli, CURLOPT_POSTFIELDS, stripslashes($postData));

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/tokens';
let post_data = {
   "id": "Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW",
   "label": "merchantwebsite.com",
   "facade": "merchant"
};
let headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"};
let options = {
   url: resource_url,
   method: 'POST',
   json: post_data,
   headers: headers
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/tokens"
postData := []byte(`{
   "id": "Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW",
   "label": "merchantwebsite.com",
   "facade": "merchant"
 }`)

request, err := http.NewRequest("POST", resourceUrl, bytes.NewBuffer(postData))
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/tokens'
post_data = {
   'id': 'Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW',
   'label': 'merchantwebsite.com',
   'facade': 'merchant'
}
headers = {'X-Accept-Version': '2.0.0', 'Content-Type': 'application/json'}
response = requests.post(url=resource_url, data=json.dumps(post_data), headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/tokens"
post_data = {
 "id": "Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW",
 "label": "merchantwebsite.com",
 "facade": "merchant"
}
headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"}
uri = URI.parse(resource_url)
request = Net::HTTP::Post.new(uri.to_s, headers)
request.body = post_data.to_json

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
Headers
Fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key. This header is optional for this endpoint when using the public facade, and required when using a merchant facade token.
C
X-Signature
header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key. This header is optional for this endpoint when using the public facade, and required when using a merchant facade token.
C
Body
Parameter Type Presence
id
Client identity based on BitAuth identity protocol, also known as SIN (System Identification Number)
string M
facade
Can be merchant, pos or payout. If passed in the body of the request together with the id parameter, leave the pairingCode parameter out.
string C
label
Token label, may include spaces, underscores, and dashes. BitPay invites the merchants to pass their Business Name or website in this field.
string O
pairingCode
Access approval code:

  • Client Initiated Pairing: If you do not pass a pairing code in the body of the request, you need to send the id and facade parameters. This will allow you to request API tokens with higher privileges (merchant, or payout facades)
  • Server Initiated Pairing: If you pass a pairing code in the body of the request, leave the facade parameter out. The pairing code which can be generated from the BitPay dashboard (with "Require Authentication" enabled) only allows you to request a pos facade token with authentication, meaning it will be necessary to cryptographically sign every request using this token, just like the other facades with higher privileges.

string C
HTTP Response
{
  "data": [
    {
      "policies": [
        {
          "policy": "id",
          "method": "inactive",
          "params": [
            "Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW"
          ]
        }
      ],
      "token": "G7XM9fcM1gtCN7DUr8ZWtPGVFLTKiYWanHR4kvqsnjP3",
      "facade": "merchant",
      "label": "merchantwebsite.com",
      "dateCreated": 1621340364865,
      "pairingExpiration": 1621426764865,
      "pairingCode": "C4Lg7oW"
    }
  ]
}

On the right side, you will find an example of the token object returned in the response you will get from the BitPay server. A description of each field is available in the Tokens resource section.

Retrieve approved API tokens

This endpoint allows you to list the tokens approved for a given SIN/Private key

GET
https://bitpay.com/tokens
HTTP Request
Headers

The SIN is not explicitly used in the request. The public key from which a SIN is derived via a hash function is used in the request header, via the X-Identity parameter.

curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88" \
-H "X-Signature: 304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb" \
--url "https://bitpay.com/tokens"
var resourceUrl = "https://bitpay.com/tokens";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
    "X-Identity",
    "03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88"
);
httpWebRequest.Headers.Add(
    "X-Signature",
    "304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/tokens";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .header(
           "X-Identity",
           "03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88"
   )
   .header(
           "X-Signature",
           "304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb"
   )
   .uri(URI.create(resourceUrl))
   .GET()
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/tokens';

$curlCli = curl_init($resourceUrl);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json',
   'X-Identity: 03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88',
   'X-Signature: 304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');
let resource_url = 'https://bitpay.com/tokens';
let headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88",
   "X-Signature": "304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb"
};
let options = {
   url: resource_url,
   method: 'GET',
   headers: headers,
   json: true
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/tokens"

request, err := http.NewRequest("GET", resourceUrl, nil)
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88")
request.Header.Set("X-Signature", "304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/tokens'
headers = {
   'X-Accept-Version': '2.0.0',
   'Content-Type': 'application/json',
   'X-Identity': '03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88',
   'X-Signature': '304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb'
}
response = requests.get(url=resource_url, headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/tokens"
headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "03ca54352337e692bfcdad4ff6b166eeea56d53e74f35f040c61657899c26dfc88",
   "X-Signature": "304402201ccf3c4e9214b158719193e27901765380f2b6f20857fd7a358f8fb585b3bdb902205781181a1f4c62f5c99e7da5ab20426072c06753dfa1a7815beba40f3effe0bb"
}
uri = URI.parse(resource_url)
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
Fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key.
M
X-Signature
Header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key.
M
HTTP Response
{
  "data": [
    {
      "merchant": "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
    },
    {
      "payout": "3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU"
    }
  ]
}
Name Type
data
array of JSON objects listing the various tokens approved per facade, for the queried SIN.
array

View the SIN(s) linked to an approved token

This endpoint allows you to retrieve the SIN(s) linked to a merchant or payout API token.

GET
https://bitpay.com/tokens/:token/sins
HTTP Request
curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7" \
--url "https://bitpay.com/tokens/MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY/sins"
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + token + "/sins");

httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
    "X-Identity",
    "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
    "X-Signature",
    "3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .header(
           "X-Identity",
           "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
   )
   .header(
           "X-Signature",
           "3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7"
   )
   .uri(URI.create(resourceUrl + "/" + token + "/sins"))
   .GET()
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/tokens';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';

$curlCli = curl_init($resourceUrl . '/' . $token . '/sins');

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json',
   'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature: 3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/tokens';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7"
};
let options = {
   url: resource_url + '/' + token + '/sins',
   method: 'GET',
   headers: headers,
   json: true
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/tokens"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"

request, err := http.NewRequest("GET", resourceUrl + "/" + token + "/sins", bytes.NewBuffer(postData))
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/tokens'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'

headers = {
   'X-Accept-Version': '2.0.0',
   'Content-Type': 'application/json',
   'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature': '3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7'
}
response = requests.get(url=resource_url + '/' + token + '/sins', headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/tokens"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "3046022100b045fd40a2ba1824f5530d41f694c2aab68e340317e43732fc69375affa23a86022100d12127b7601492a9938fc702ae48e14a1d7b55f80ab36b884152064a3979ffc7"
}

uri = URI.parse(resource_url + "/" + token + "/sins")
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
URL Parameters
Parameter Type Presence
token
Approved API token for which you would like to view the linked SIN(s).
string M
Headers
Fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key.
M
X-Signature
Header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key.
M
HTTP Response
{
  "data": {
    "sins": [
      "Tf2yXsY49iFyDfxt3b2kf9VPRMwPxxAyCRW"
    ]
  }
}
Body
Name Type
data
data object
object
sins
Array containing the sins linked to the token used in the query.
array

This endpoint allows to link a new SIN (thus new key pair) to an existing approved API token.

POST
https://bitpay.com/tokens/:token/sins
curl -X POST \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702" \
--url "https://bitpay.com/tokens/MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY/sins" \
-d @- <<'EOF'
{
"sin":"Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
}
EOF
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + token + "/sins");

httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
    "X-Identity",
    "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
    "X-Signature",
    "3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";

string json = "{" +
                  "\"id\": \"Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d\"," +
              "}";

using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
    streamWriter.Write(json);
    streamWriter.Flush();
    streamWriter.Close();
}

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var json = "{" +
               "\"sin\": \"Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d\"," +
           "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .header(
           "X-Identity",
           "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
   )
   .header(
           "X-Signature",
           "3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702"
   )
   .uri(URI.create(resourceUrl + "/" + token + "/sins"))
   .POST(HttpRequest.BodyPublishers.ofString(json))
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/tokens';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';

$postData = json_encode([
   'sin' => 'Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d'
]);

$curlCli = curl_init($resourceUrl . '/' . $token . '/sins');

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json',
   'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature: 3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702'
]);

curl_setopt($curlCli, CURLOPT_POSTFIELDS, stripslashes($postData));

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/tokens';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let post_data = {
   "sin": "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
};
let headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702"
};
let options = {
   url: resource_url + '/' + token + '/sins',
   method: 'POST',
   json: post_data,
   headers: headers
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/tokens"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
postData := []byte(`{
   "sin": "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
 }`)

request, err := http.NewRequest("POST", resourceUrl + "/" + token + "/sins", bytes.NewBuffer(postData))
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/tokens'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
post_data = {
   'sin': 'Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d'
}

headers = {
   'X-Accept-Version': '2.0.0',
   'Content-Type': 'application/json',
   'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature': '3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702'
}
response = requests.post(url=resource_url + '/' + token + '/sins', data=json.dumps(post_data),
                        headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/tokens"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
post_data = {
 "id": "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
}
headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "3045022100903098ac2620dddd1d3f3e11ba9870c971b99b8b82443b2438b89d5856a3c58602203b0ce862791baea13f4ac4bd7d9cd2f9fd61f7d641d24acd94d297d0af59c702"
}

uri = URI.parse(resource_url + "/" + token + "/sins")
request = Net::HTTP::Post.new(uri.to_s, headers)
request.body = post_data.to_json

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
Parameter Type Presence
token
Approved API token for which you would like to link a new SIN.
string M
Fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key.
M
X-Signature
Header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key.
M
Name Type
sin
SIN value
string
{
  "data": {
    "success": true
  }
}
Name Type
data
data object
object
success
set to true once the new SIN is successfully link to the approved token
boolean

Remove a SIN from an approved token

This endpoint allows you to unlink a SIN (SIN1) from an approved API token, as long as another SIN (SIN2) has first been linked to this same token. Once executed, the private key corresponding to SIN1 removed cannot be used anymore in combination with the approved API token.

If you intend to remove SIN1 from a given token, this request would need to be authenticated using the public key pair corresponding to SIN2.

DELETE
https://bitpay.com/tokens/:token/sins/:sin
HTTP Request
curl -X DELETE \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768" \
--url "https://bitpay.com/tokens/MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY/sins/Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var sin = "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + token + "/sins" + sin);

httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
    "X-Identity",
    "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
    "X-Signature",
    "304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "DELETE";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/tokens";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var sin = "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .header(
           "X-Identity",
           "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
   )
   .header(
           "X-Signature",
           "304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768"
   )
   .uri(URI.create(resourceUrl + "/" + token + "/sins" + sin))
   .DELETE()
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/tokens';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
$sin = 'Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d';

$curlCli = curl_init($resourceUrl . '/' . $token . '/sins/' . $sin);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json',
   'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature: 304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/tokens';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let sin = 'Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d';
let headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768"
};
let options = {
   url: resource_url + '/' + token + '/sins/' + sin,
   method: 'DELETE',
   headers: headers,
   json: true
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/tokens"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
sin := "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"

request, err := http.NewRequest("DELETE", resourceUrl + "/" + token + "/sins/" + sin, nil)
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/tokens'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
sin = 'Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d'
headers = {
   'X-Accept-Version': '2.0.0',
   'Content-Type': 'application/json',
   'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature': '304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768'
}
response = requests.delete(url=resource_url + '/' + token + '/sins/' + sin, headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/tokens"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
sin = "Tf611u2bBZBe1GBEuUwxEaU2ia3oxFU9w7d"
headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "304402202bbce7daee2fff53232c36c475adb6a1612d48814196351dfbd5563a6092c9c602206bfa8a8cc718e32e9655caddf21e4edf61e46c21943e9bb51c1ed0421deeb768"
}
uri = URI.parse(resource_url + "/" + token + "/sins/" + sin)
request = Net::HTTP::Delete.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
URL Parameters
Parameter Type Presence
token
Approved API token from which you would like to unlink a SIN.
string M
sin
SIN to be unlinked.
string M
Headers
Fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key.
M
X-Signature
Header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key.
M
HTTP Response
{
  "data": {
    "success": true
  }
}
Body
Name Type
data
data object
object
success
set to true once the SIN is successfully unlinked from the approved token
boolean

Invoices

Resource

Example of invoice resource (fetched using the merchant facade)

{
  "facade": "merchant/invoice",
  "data": {
    "url": "https://bitpay.com/invoice?id=Hpqc63wvE1ZjzeeH4kEycF",
    "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
    "status": "complete",
    "price": 20,
    "currency": "USD",
    "itemDesc": "Item 12ad212",
    "orderId": "20210510_fghij",
    "invoiceTime": 1620669854224,
    "expirationTime": 1620670754224,
    "currentTime": 1620747087868,
    "guid": "payment#1234",
    "id": "Hpqc63wvE1ZjzeeH4kEycF",
    "lowFeeDetected": false,
    "amountPaid": 700700,
    "displayAmountPaid": "0.007007",
    "exceptionStatus": false,
    "targetConfirmations": 6,
    "transactions": [
      {
        "amount": 700700,
        "confirmations": 6,
        "receivedTime": "2021-05-10T18:05:12.472Z",
        "txid": "0bdcb930b91d63eb10ec11e27a060d4dd25380d229c4b28a29a1456e0aa60128",
        "exRates": {
          "BCH": 1,
          "USD": 1425.3300000000002,
          "BTC": 0.024940318948696607,
          "EUR": 1173.3,
          "ETH": 0.3433223013888689,
          "GUSD": 1425.3300000000002,
          "PAX": 1425.3300000000002,
          "BUSD": 1425.3300000000002,
          "USDC": 1425.3300000000002,
          "XRP": 951.2727418342967,
          "DOGE": 2956.4034562622046,
          "DAI": 1424.021324402874,
          "WBTC": 0.02496629892086482
        },
        "outputIndex": 1
      }
    ],
    "transactionSpeed": "medium",
    "buyer": {
      "name": "John Doe",
      "address1": "2630 Hegal Place",
      "address2": "Apt 42",
      "locality": "Alexandria",
      "region": "VA",
      "postalCode": "23242",
      "country": "US",
      "email": "john@doe.com",
      "phone": "555-123-456",
      "notify": true
    },
    "redirectURL": "https://merchantwebsite.com/shop/return",
    "autoRedirect": false,
    "closeURL": "https://merchantwebsite.com/shop/cancel",
    "refundAddresses": [
      {
        "bitcoincash:qr0fwvhrj0x803cmuyell55wqzpg6432euethcdp9z": {
          "type": "buyerSupplied",
          "date": "2021-05-11T08:59:55.146Z",
          "tag": null
        }
      }
    ],
    "refundAddressRequestPending": true,
    "buyerProvidedEmail": "john@doe.com",
    "buyerProvidedInfo": {
      "name": "John Doe",
      "phoneNumber": "555-123-456",
      "sms": "+12223334444",
      "smsVerified": true,
      "selectedWallet": "bitpay",
      "selectedTransactionCurrency": "BCH",
      "emailAddress": "john@doe.com"
    },
    "paymentSubtotals": {
      "BTC": 17500,
      "BCH": 700700,
      "ETH": 2406000000000000,
      "GUSD": 1000,
      "PAX": 10000000000000000000,
      "BUSD": 10000000000000000000,
      "USDC": 10000000,
      "XRP": 6668704,
      "DOGE": 2077327700,
      "DAI": 9990000000000000000,
      "WBTC": 17500
    },
    "paymentTotals": {
      "BTC": 29800,
      "BCH": 700700,
      "ETH": 2406000000000000,
      "GUSD": 1000,
      "PAX": 10000000000000000000,
      "BUSD": 10000000000000000000,
      "USDC": 10000000,
      "XRP": 6668704,
      "DOGE": 2077327700,
      "DAI": 9990000000000000000,
      "WBTC": 17500
    },
    "paymentDisplayTotals": {
      "BTC": "0.000298",
      "BCH": "0.007007",
      "ETH": "0.002406",
      "GUSD": "10.00",
      "PAX": "10.00",
      "BUSD": "10.00",
      "USDC": "10.00",
      "XRP": "6.668704",
      "DOGE": "20.773277",
      "DAI": "9.99",
      "WBTC": "0.000175"
    },
    "paymentDisplaySubTotals": {
      "BTC": "0.000175",
      "BCH": "0.007007",
      "ETH": "0.002406",
      "GUSD": "10.00",
      "PAX": "10.00",
      "BUSD": "10.00",
      "USDC": "10.00",
      "XRP": "6.668704",
      "DOGE": "20.773277",
      "DAI": "9.99",
      "WBTC": "0.000175"
    },
    "exchangeRates": {
      "BTC": {
        "USD": 57204.993195,
        "EUR": 47077.319565,
        "BCH": 39.966599499063804,
        "ETH": 13.755531957178825,
        "GUSD": 57204.993195,
        "PAX": 57204.993195,
        "BUSD": 57204.993195,
        "USDC": 57204.993195,
        "XRP": 38003.14441595195,
        "DOGE": 118682.55849585062,
        "DAI": 57120.83386098427,
        "WBTC": 1.0001084497591646
      },
      "BCH": {
        "USD": 1427.1930750000001,
        "EUR": 1173.9677250000002,
        "BTC": 0.024936271286002874,
        "ETH": 0.3431833281634361,
        "GUSD": 1427.1930750000001,
        "PAX": 1427.1930750000001,
        "BUSD": 1427.1930750000001,
        "USDC": 1427.1930750000001,
        "XRP": 948.1309499292485,
        "DOGE": 2960.981483402489,
        "DAI": 1425.0934048139654,
        "WBTC": 0.02495145570387066
      },
      "ETH": {
        "USD": 4156.600660000002,
        "EUR": 3418.000145000001,
        "BTC": 0.07262515738127348,
        "BCH": 2.904033102311154,
        "GUSD": 4156.600660000002,
        "PAX": 4156.600660000002,
        "BUSD": 4156.600660000002,
        "USDC": 4156.600660000002,
        "XRP": 2761.365509177756,
        "DOGE": 8623.652821576765,
        "DAI": 4150.4855164823275,
        "WBTC": 0.0726693809431983
      },
      "GUSD": {
        "USD": 1,
        "EUR": 0.822741,
        "BTC": 0.000017472247954960737,
        "BCH": 0.0006986557862672219,
        "ETH": 0.00024046033726966907,
        "PAX": 1,
        "BUSD": 1,
        "USDC": 1,
        "XRP": 0.664332644641825,
        "DOGE": 2.0746887966804977,
        "DAI": 0.9985288113971301,
        "WBTC": 0.000017482887312826024
      },
      "PAX": {
        "USD": 1,
        "EUR": 0.822741,
        "BTC": 0.000017472247954960737,
        "BCH": 0.0006986557862672219,
        "ETH": 0.00024046033726966907,
        "GUSD": 1,
        "BUSD": 1,
        "USDC": 1,
        "XRP": 0.664332644641825,
        "DOGE": 2.0746887966804977,
        "DAI": 0.9985288113971301,
        "WBTC": 0.000017482887312826024
      },
      "BUSD": {
        "USD": 1,
        "EUR": 0.822741,
        "BTC": 0.000017472247954960737,
        "BCH": 0.0006986557862672219,
        "ETH": 0.00024046033726966907,
        "GUSD": 1,
        "PAX": 1,
        "USDC": 1,
        "XRP": 0.664332644641825,
        "DOGE": 2.0746887966804977,
        "DAI": 0.9985288113971301,
        "WBTC": 0.000017482887312826024
      },
      "USDC": {
        "USD": 1,
        "EUR": 0.822741,
        "BTC": 0.000017472247954960737,
        "BCH": 0.0006986557862672219,
        "ETH": 0.00024046033726966907,
        "GUSD": 1,
        "PAX": 1,
        "BUSD": 1,
        "XRP": 0.664332644641825,
        "DOGE": 2.0746887966804977,
        "DAI": 0.9985288113971301,
        "WBTC": 0.000017482887312826024
      },
      "XRP": {
        "USD": 1.4995417500000001,
        "EUR": 1.2359324250000001,
        "BTC": 0.00002620036527481575,
        "BCH": 0.0010476635203867759,
        "ETH": 0.0003605803149549498,
        "GUSD": 1.4995417500000001,
        "PAX": 1.4995417500000001,
        "BUSD": 1.4995417500000001,
        "USDC": 1.4995417500000001,
        "DOGE": 3.111082468879668,
        "DAI": 1.4973356412678729,
        "WBTC": 0.000026216319436127937
      },
      "DOGE": {
        "USD": 0.48138770000000003,
        "EUR": 0.3960573976857,
        "BTC": 0.000008410925256868251,
        "BCH": 0.0003363243020428695,
        "ETH": 0.00011575464869947028,
        "GUSD": 0.48138770000000003,
        "PAX": 0.48138770000000003,
        "BUSD": 0.48138770000000003,
        "USDC": 0.48138770000000003,
        "XRP": 0.31980156383904546,
        "DAI": 0.4806794879021982,
        "WBTC": 0.0000084160469128805
      },
      "DAI": {
        "USD": 1.001472,
        "EUR": 0.8239520747519998,
        "BTC": 0.00001749796710395044,
        "BCH": 0.0006996842075846071,
        "ETH": 0.00024081429488613,
        "GUSD": 1.001472,
        "PAX": 1.001472,
        "BUSD": 1.001472,
        "USDC": 1.001472,
        "XRP": 0.6653105422947376,
        "DOGE": 2.0777427385892113,
        "WBTC": 0.000017508622122950502
      },
      "WBTC": {
        "USD": 57151.869999999995,
        "EUR": 47021.18667566999,
        "BTC": 0.9985716437296819,
        "BCH": 39.92948467149204,
        "ETH": 13.74275793579228,
        "GUSD": 57151.869999999995,
        "PAX": 57151.869999999995,
        "BUSD": 57151.869999999995,
        "USDC": 57151.869999999995,
        "XRP": 37967.85294332578,
        "DOGE": 118572.34439834024,
        "DAI": 57067.78882022329
      }
    },
    "minerFees": {
      "BTC": {
        "satoshisPerByte": 1,
        "totalFee": 100,
        "fiatAmount": 0.02
      },
      "BCH": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "ETH": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "GUSD": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "PAX": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "BUSD": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "USDC": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "XRP": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "DOGE": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "DAI": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      },
      "WBTC": {
        "satoshisPerByte": 0,
        "totalFee": 0,
        "fiatAmount": 0
      }
    },
    "shopper": {
      "user": "FeFc5a7hUwmrEnYwVPmrkp"
    },
    "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": false,
     "isCancelled": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
    "transactionCurrency": "BCH",
    "supportedTransactionCurrencies": {
      "BTC": {
        "enabled": true
      },
      "BCH": {
        "enabled": true
      },
      "ETH": {
        "enabled": true
      },
      "GUSD": {
        "enabled": true
      },
      "PAX": {
        "enabled": true
      },
      "BUSD": {
        "enabled": true
      },
      "USDC": {
        "enabled": true
      },
      "XRP": {
        "enabled": true
      },
      "DOGE": {
        "enabled": true
      },
      "DAI": {
        "enabled": true
      },
      "WBTC": {
        "enabled": true
      }
    },
    "paymentCodes": {
      "BTC": {
        "BIP72b": "bitcoin:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF",
        "BIP73": "https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "BCH": {
        "BIP72b": "bitcoincash:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF",
        "BIP73": "https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "ETH": {
        "EIP681": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "GUSD": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "PAX": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "BUSD": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "USDC": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "XRP": {
        "BIP72b": "ripple:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF",
        "BIP73": "https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF",
        "RIP681": "https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "DOGE": {
        "BIP72b": "dogecoin:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF",
        "BIP73": "https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "DAI": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      },
      "WBTC": {
        "EIP681b": "ethereum:?r=https://bitpay.com/i/Hpqc63wvE1ZjzeeH4kEycF"
      }
    },
    "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
    },
    "token": "Svbfdow1xXc6chtQB3GVKjdPFRTfSGKYyvRmm4Re6mzY7pT3AuN7g3bY9W3t5jHbN"
  }
}

Invoices are time-sensitive payment requests addressed to specific buyers. An invoice has a fixed price, typically denominated in fiat currency. It also has an equivalent price in the supported cryptocurrencies, calculated by BitPay, at a locked exchange rate with an expiration time of 15 minutes.

Name Type returned via facade
pos merchant
facade
This field indicates the facade from which the invoice is being requested:

  • "pos/invoice" if the pos facade is used to request an invoice resource
  • "merchant/invoice" if the merchant facade is used to request an invoice resource

string
data
Invoice data object. The following fields from the initial POST request will be passed in the response from the server, in addition to some other fields listed in this section
object
url
Web address of invoice, expires at expirationTime
string
posData
A passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order or other object in their system. This passthru variable can be a serialized object, e.g.: "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"".
string
status

Invoice status can have the following values:

  • "new": An invoice starts in this state. When in this state and only in this state, payments broadcasted by purchasers will be applied to the invoice (there is a 15 minute window for the purchaser to send a payment from their crypto wallet). If an invoice has received a partial payment, it will still reflect a status of new to the merchant. From a merchant system perspective, an invoice is either paid or not paid, partial payments are automatically refunded by BitPay to the consumer.
  • "paid" As soon as payment is received it is evaluated against the invoice requested amount. If the amount paid is equal to or greater than the amount expected then the invoice is marked as being paid. To detect whether the invoice has been overpaid consult the invoice exception status (exceptionStatus parameter). The overpaid amount on an invoice is automatically refunded by BitPay to the consumer.
  • "confirmed": This status can be used by merchants in order to fulfill orders placed by the consumer. Merchants can configure the timing at which BitPay sets this specific invoice status, depending on the number of confirmation achieved by the consumer's transaction in the selected cryptocurrency. This can be configured during invoice creation using the "transactionSpeed" parameter (section Create an invoice), or at account level via a dashboard setting.
  • "complete": When an invoice has the status complete, it means that BitPay has credited the merchant account, in the currency indicated in the settlement settings. For instance, with invoices paid in Bitcoin (BTC), 6 confirmation blocks on the bitcoin network are required for an invoice to be complete, this takes on average 1 hour.
  • "expired": An invoice reaches the expired status if no payment was received and the 15 minute payment window has elapsed.
  • "invalid" An invoice is considered invalid when it was paid, but the corresponding cryptocurrency transaction was not confirmed within 1 hour on the corresponding blockchain. It is possible that some transactions can take longer than 1 hour to be included in a block. If the transaction confirms after 1 hour, BitPay will update the invoice state from "invalid" to "complete" (6 confirmations for transactions on the bitcoin network for instance).

string
price
Fixed price amount for the checkout, in the "currency" of the invoice object.
number
currency
ISO 4217 3-character currency code. This is the currency associated with the price field, supported currencies are available via the Currencies resource
string
itemDesc
Invoice description - will be added as a line item on the BitPay checkout page, under the merchant name.
string
orderId
Can be used by the merchant to assign their own internal Id to an invoice. If used, there should be a direct match between an orderId and an invoice id.
string
invoiceTime
UNIX time of invoice creation, in milliseconds
number
expirationTime
UNIX time when invoice is last available to be paid, in milliseconds
number
currentTime
UNIX time of API call, in milliseconds
number
guid
A passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order ID in their system, which can be used as a lookup variable in Retrieve Invoice by GUID.
string
id
Invoice resource id
string
lowFeeDetected
Flag to indicate if the miner fee used by the buyer is too low. Initially set to false when the invoice is created.
boolean
amountPaid
Initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice, indicated in the smallest possible unit for the corresponding transactionCurrency
number
displayAmountPaid
Initially set to "0" when creating the invoice. It will be updated with the total amount paid to the invoice indicated in the base unit for the corresponding transactionCurrency
string
exceptionStatus
Initially a boolean false, this parameter will indicate if the purchaser sent too much ("paidOver") or not enough funds ("paidPartial") in the transaction to pay the BitPay invoice. Possible values are:

  • false: default value (boolean) unless an exception is triggered.
  • "paidPartial": (string) if the consumer did not send enough funds when paying the invoice.
  • "paidOver": (string) if the consumer sent to much funds when paying the invoice.

boolean | string
targetConfirmations
Indicates the number of block confirmation of the crypto currency transaction which are required to credit a paid invoice to the merchant accoun. Currently the value set is set to 6 by default for BTC/BCH/XRP, 40 for DOGE and 50 for ETH/GUSD/PAX/USDC/BUSD/DAI/WBTC
number
transactions
Initially empty when the invoice is created. This array will be populated with the crypto currency transaction hashes linked to the invoice. For instance the consumer's transaction hash if the invoice is paid, but also the refund transaction hash if the merchant decide to issue a refund to the purchaser
array
buyer
Allows merchant to pass buyer related information in the invoice object
object
name
Buyer's name
string
address1
Buyer's address
string
address2
Buyer's appartment or suite number
string
locality
Buyer's city or locality
string
region
Buyer's state or province
string
postalCode
Buyer's Zip or Postal Code
string
country
Buyer's Country code. Format ISO 3166-1 alpha-2
string
email
Buyer's email address. If provided during invoice creation, this will bypass the email prompt for the consumer when opening the invoice.
string
phone
Buyer's phone number
string
notify
Indicates whether a BitPay email confirmation should be sent to the buyer once he has paid the invoice
boolean
redirectURL
The shopper will be redirected to this URL when clicking on the Return button after a successful payment or when clicking on the Close button if a separate closeURL is not specified. Be sure to include "http://" or "https://" in the url.
string
closeURL
URL to redirect if the shopper does not pay the invoice and click on the Close button instead. Be sure to include "http://" or "https://" in the url.
string
autoRedirect

Set to false by default, merchant can setup automatic redirect to their website by setting this parameter to true. This will applied to the following scenarios:

  • When the invoice is paid, it automatically redirects the shopper to the redirectURL indicated
  • When the invoice expires, it automatically redirects the shopper to the closeURL if specified and to the redirectURL otherwise

Note: If automatic redirect is enabled, redirectURL becomes a mandatory invoice parameters.

boolean
refundAddresses
Initially empty when the invoice is created. This field will be populated with the refund address provided by the customer if you request a refund of the specific invoice.
array
refundAddressRequestPending
Initially set to false when the invoice is created, this field will be set to true once a refund request has been issued by the merchant. This flag is here to indicate that the refund request is pending action from the buyer to provide an address for the refund, via the secure link which has been automatically emailed to him
boolean
buyerProvidedEmail
Populated with the buyer's email address if passed in the buyer object by the merchant, otherwise this field is not returned for newly created invoices. If the merchant does not pass the buyer email in the invoice request, the bitpay invoice UI will prompt the user to enter his email address and this field will be populated with the email submitted.
string
buyerProvidedInfo
Information collected from the buyer during the process of paying an invoice. Initially this object is empty.
object
name
Populated with the buyer's name address if passed in the buyer object by the merchant
string
phoneNumber
Populated with the buyer's phone number if passed in the buyer object by the merchant
string
sms
SMS provided by user for communications. This is only used for instances where a buyers email (primary form of buyer communication) is can not be gathered.
string
smsVerified
Verification status of SMS (ie. have they passed the challenge).
boolean
selectedWallet
This field contains the name of the cryptocurrency wallet selected by the shopper to complete the payment.
string
selectedTransactionCurrency
This field will be populated with the cryptocurrency selected to pay the BitPay invoice, current supported values are "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". If not yet selected, this field will not be returned.
string
emailAddress
populated with the buyer's email address if passed in the buyer object, otherwise this field is not returned in the response.
string
paymentSubtotals
For internal use. This field can be ignored in merchant implementations.
object
paymentTotals
For internal use - This field can be ignored in merchant implementations.
object
paymentDisplayTotals
The total amount that the purchaser should pay as displayed on the invoice UI. This is like paymentDisplaySubTotals but with the minerFees included. The key is the currency and the value is an amount indicated in the base unit for each supported transactionCurrency.
object
paymentDisplaySubTotals
Equivalent to price for each supported transactionCurrency, excluding minerFees. The key is the currency and the value is an amount indicated in the base unit for each supported transactionCurrency.
object
exchangeRates
Exchange rates keyed by source and target currencies.
object
minerFees
The total amount of fees that the purchaser will pay to cover BitPay's UTXO sweep cost for an invoice. The key is the currency and the value is an object containing the satoshis per byte, the total fee, and the fiat amount. This is referenced as "Network Cost" on an invoice, see this support article for more information
object
nonPayProPaymentReceived
This boolean will be available on an invoice object once an invoice is paid and indicate if the transaction was made with a wallet using the payment protocol (true) or peer to peer (false).
boolean
shopper
This object will be available on the invoice if a shopper signs in on an invoice using his BitPay ID. See the following blogpost for more information.
object
user
If a shopper signs in on the invoice using his BitPay ID, this field will contain the unique ID assigned by BitPay to this shopper.
string
billId
This field will be in the invoice object only if the invoice was generated from a bill, see the Bills resource for more information
string
refundInfo
For a refunded invoice, this object will contain the details of executed refunds for the corresponding invoice.
object
supportRequest
For a refunded invoice, this field will contain the refund requestId once executed.
string
currency
For a refunded invoice, this field will contain the base currency selected for the refund. Typically the same as the invoice currency.
string
amounts
For a refunded invoice, this object will contain the crypto currency amount refunded by BitPay to the consumer (in the selected transactionCurrency) and the equivalent refunded amount from the invoice in the given currency (thus linked to the amount debited from the merchant account to cover the refund)
object
jsonPayProRequired
Boolean set to false by default. If set to true, this means that the invoice will only accept payments from wallets which have implemented the BitPay JSON Payment Protocol
boolean
merchantName
A display string for merchant identification (ex. Wal-Mart Store #1452, Bowling Green, KY).
string
bitpayIdRequired
BitPay ID is a verification process that is required when a user is making payments or receiving a refund over a given threshold, which may vary by region. This Boolean forces the invoice to require BitPay ID regardless of the price.
boolean
isCancelled
Indicates whether or not the invoice was cancelled.
boolean
itemizedDetails
Object containing line item details for display.
object
amount
The amount of currency.
number
description
Display string for the item.
string
isFee
Indicates whether or not the item is considered a fee/tax or part of the main purchase.
boolean
acceptanceWindow
Number of milliseconds that a user has to pay an invoice before it expires (0-900000). If not set, invoice will default to the account acceptanceWindow. If account acceptanceWindow is not set, invoice will default to 15 minutes (900,000 milliseconds).
number
transactionCurrency
The cryptocurrency used to pay the invoice. This field will only be available after a transaction is applied to the invoice. Possible values are currently "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC".
string
underpaidAmount
This parameter will be returned on the invoice object if the invoice was underpaid ("exceptionStatus": "paidPartial"). It equals to the absolute difference between amountPaid and paymentTotals for the corresponding transactionCurrency used.
number
overpaidAmount
This parameter will be returned on the invoice object if the invoice was overpaid ("exceptionStatus": "paidOver"). It equals to the absolute difference between amountPaid and paymentTotals for the corresponding transactionCurrency used.
number
supportedTransactionCurrencies
The currencies that may be used to pay this invoice. The object is keyed by currency code. The values are objects with an "enabled" boolean and option. An extra "reason" parameter is added in the object if a cryptocurrency is disabled on a specific invoice. If you disable a currency via the invoice parameter "paymentCurrencies", this parameter will be set to "merchantDisabledByParam"
object
paymentCodes
The URIs for sending a transaction to the invoice. The first key is the transaction currency. The transaction currency maps to an object containing the payment URIs. The key of this object is the BIP number and the value is the payment URI.

  • For "BTC", "BCH" and "DOGE" - BIP72b and BIP73 are supported.
  • For "ETH", "GUSD", "PAX", "BUSD", "USDC", "DAI" and "WBTC"- EIP681 is supported
  • For "XRP" - RIP681, BIP72b and BIP73 is supported

object
universalCodes
Object containing wallet-specific URLs for payment protocol.
object
paymentString
Payment protocol URL for selected wallet, defaults to BitPay URL if no wallet selected.
string
verificationLink
Link to bring user to BitPay ID flow, only present when bitpayIdRequired is true.
string
token
invoice resource token. This token is derived from the API token initially used to create the invoice and is tied to the specific resource id created.
string

Create an invoice

POST
https://bitpay.com/invoices
Facades

pos merchant

HTTP Request

via the pos facade (unsigned requests)

curl -X POST \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
--url "https://bitpay.com/invoices" \
-d @- <<'EOF'
{
"currency": "USD",
"price": 10,
"orderId": "20210511_abcde",
"notificationURL": "https://merchantwebsite.com/shop/notifications",
"redirectURL": "https://merchantwebsite.com/shop/return",
"buyer": {
"email": "john@doe.com"
},
"token": "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
}
EOF
var resourceUrl = "https://bitpay.com/invoices";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl);

httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";

string json = "{" +
     "\"currency\":\"USD\"," +
     "\"price\":10," +
     "\"orderId\":\"20210511_fghij\"," +
     "\"notificationURL\":\"https://merchantwebsite.com/shop/notifications\"," +
     "\"redirectURL\":\"https://merchantwebsite.com/shop/return\"," +
     "\"buyer\":{" +
          "\"email\":\"john@doe.com\"" +
     "}," +
     "\"token\":\"AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv\"" +
"}";

using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
     streamWriter.Write(json);
     streamWriter.Flush();
     streamWriter.Close();
}

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var json = "{" +
                 "\"currency\":\"USD\"," +
                 "\"price\":10," +
                 "\"orderId\":\"20210511_fghij\"," +
                 "\"notificationURL\":\"https://merchantwebsite.com/shop/notifications\"," +
                 "\"redirectURL\":\"https://merchantwebsite.com/shop/return\"," +
                 "\"buyer\":{" +
                      "\"email\":\"john@doe.com\"" +
                 "}," +
                 "\"token\":\"AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv\"" +
            "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .uri(URI.create(resourceUrl))
    .POST(HttpRequest.BodyPublishers.ofString(json))
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices';

$postData = json_encode([
    'currency' => 'USD',
    'price' => 10,
    'orderId' => '20210511_fghij',
    'notificationURL' => 'https://merchantwebsite.com/shop/notifications',
    'redirectURL' => 'https://merchantwebsite.com/shop/return',
    'buyer' => [
         'email' => 'john@doe.com'
    ],
    'token' => 'AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv'
]);

$curlCli = curl_init($resourceUrl);

curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json'
]);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curlCli, CURLOPT_POSTFIELDS, stripslashes($postData));

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/invoices';
let post_data = {
    "currency": "USD",
    "price": 10,
    "orderId": "20210511_fghij",
    "notificationURL": "https://merchantwebsite.com/shop/notifications",
    "redirectURL": "https://merchantwebsite.com/shop/return",
    "buyer": {
         "email": "john@doe.com"
    },
    "token": "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
};
let headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"};
let options = {
    url: resource_url,
    method: 'POST',
    json: post_data,
    headers: headers
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
postData := []byte(`{
      "currency": "USD",
      "price": 10,
      "orderId": "20210511_fghij",
      "notificationURL": "https://merchantwebsite.com/shop/notifications",
      "redirectURL": "https://merchantwebsite.com/shop/return",
      "buyer": {
            "email": "john@doe.com"
      },
      "token": "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
 }`)

request, err := http.NewRequest("POST", resourceUrl, bytes.NewBuffer(postData))
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
post_data = {
    'currency': 'USD',
    'price': 10,
    'orderId': '20210511_fghij',
    'notificationURL': 'https://merchantwebsite.com/shop/notifications',
    'redirectURL': 'https://merchantwebsite.com/shop/return',
    'buyer': {
         'email': 'john@doe.com'
    },
    'token': 'AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv'
}
headers = {'X-Accept-Version': '2.0.0', 'Content-Type': 'application/json'}
response = requests.post(url=resource_url, data=json.dumps(post_data), headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
post_data = {
    "currency": "USD",
    "price": 10,
    "orderId": "20210511_fghij",
    "notificationURL": "https://merchantwebsite.com/shop/notifications",
    "redirectURL": "https://merchantwebsite.com/shop/return",
    "buyer": {
         "email": "john@doe.com"
    },
    "token": "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
}
headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"}
uri = URI.parse(resource_url)
request = Net::HTTP::Post.new(uri.to_s, headers)
request.body = post_data.to_json

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body

via the merchant facade (signed requests)

curl -X POST \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3" \
--url "https://bitpay.com/invoices" \
-d @- <<'EOF'
{
"currency":"USD",
"price":10,
"orderId":"20210511_fghij",
"notificationURL":"https://merchantwebsite.com/shop/notifications",
"redirectURL":"https://merchantwebsite.com/shop/return",
"buyer":{
"email":"john@doe.com"
},
"token":"MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
}
EOF
var resourceUrl = "https://bitpay.com/invoices";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl);

httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
     "X-Identity",
     "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
     );
httpWebRequest.Headers.Add(
     "X-Signature",
     "304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3"
     );
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";

string json = "{" +
                     "\"currency\":\"USD\"," +
                     "\"price\":10," +
                     "\"orderId\":\"20210511_fghij\"," +
                     "\"notificationURL\":\"https://merchantwebsite.com/shop/notifications\"," +
                     "\"redirectURL\":\"https://merchantwebsite.com/shop/return\"," +
                     "\"buyer\":{" +
                          "\"email\":\"john@doe.com\"" +
                     "}," +
                     "\"token\":\"MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY\"" +
                  "}";

using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
     streamWriter.Write(json);
     streamWriter.Flush();
     streamWriter.Close();
}

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var json = "{" +
                 "\"currency\":\"USD\"," +
                 "\"price\":10," +
                 "\"orderId\":\"20210511_fghij\"," +
                 "\"notificationURL\":\"https://merchantwebsite.com/shop/notifications\"," +
                 "\"redirectURL\":\"https://merchantwebsite.com/shop/return\"," +
                 "\"buyer\":{" +
                      "\"email\":\"john@doe.com\"" +
                 "}," +
                 "\"token\":\"MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY\"" +
            "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .header(
         "X-Identity",
         "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
    )
    .header(
         "X-Signature",
         "304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3"
    )
    .uri(URI.create(resourceUrl))
    .POST(HttpRequest.BodyPublishers.ofString(json))
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices';

$postData = json_encode([
    'currency' => 'USD',
    'price' => 10,
    'orderId' => '20210511_fghij',
    'notificationURL' => 'https://merchantwebsite.com/shop/notifications',
    'redirectURL' => 'https://merchantwebsite.com/shop/return',
    'buyer' => [
         'email' => 'john@doe.com'
    ],
    'token' => 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
]);

$curlCli = curl_init($resourceUrl);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json',
    'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature: 304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3'
]);

curl_setopt($curlCli, CURLOPT_POSTFIELDS, stripslashes($postData));

$result = curl_exec($curlCli);
curl_close($curlCli);

echo $result;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/invoices';
let post_data = {
    "currency": "USD",
    "price": 10,
    "orderId": "20210511_fghij",
    "notificationURL": "https://merchantwebsite.com/shop/notifications",
    "redirectURL": "https://merchantwebsite.com/shop/return",
    "buyer": {
         "email": "john@doe.com"
    },
    "token": "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
};
let headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3"
};
let options = {
    url: resource_url,
    method: 'POST',
    json: post_data,
    headers: headers
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
postData := []byte(`{
      "currency": "USD",
      "price": 10,
      "orderId": "20210511_fghij",
      "notificationURL": "https://merchantwebsite.com/shop/notifications",
      "redirectURL": "https://merchantwebsite.com/shop/return",
      "buyer": {
            "email": "john@doe.com"
      },
      "token": "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
 }`)

request, err := http.NewRequest("POST", resourceUrl, bytes.NewBuffer(postData))
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
post_data = {
    'currency': 'USD',
    'price': 10,
    'orderId': '20210511_fghij',
    'notificationURL': 'https://merchantwebsite.com/shop/notifications',
    'redirectURL': 'https://merchantwebsite.com/shop/return',
    'buyer': {
         'email': 'john@doe.com'
    },
    'token': 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
}
headers = {
    'X-Accept-Version': '2.0.0',
    'Content-Type': 'application/json',
    'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature': '304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3'
}
response = requests.post(url=resource_url, data=json.dumps(post_data), headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
post_data = {
    "currency": "USD",
    "price": 10,
    "orderId": "20210511_fghij",
    "notificationURL": "https://merchantwebsite.com/shop/notifications",
    "redirectURL": "https://merchantwebsite.com/shop/return",
    "buyer": {
         "email": "john@doe.com"
    },
    "token": "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
}
headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304402201ee44e2d3df647f73ba7079f4dcfba9dff9e5ed352b2aeb3029654358538fafa0220337b38b26f85207c5f55cc24a5c6ff5e5ff151d5bff601bf4913e99fec740aa3"
}
uri = URI.parse(resource_url)
request = Net::HTTP::Post.new(uri.to_s, headers)
request.body = post_data.to_json

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
Headers
fields Presence
X-Accept-Version
must be set to 2.0.0 for requests to the BitPay API
M
Content-Type
must be set to application/json for requests to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key. This header is required when using tokens with higher privileges (merchant facade). When using standard pos facade token directly from the BitPay dashboard (with "Require Authentication" disabled), this header is not needed.
C
X-Signature
header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key. This header is required when using tokens with higher privileges (merchant facade). When using standard pos facade token directly from the BitPay dashboard (with "Require Authentication" disabled), this header is not needed.
C
Body
Name Type Presence
token
The API token can be retrieved from the dashboard (limited to pos facade) or using the Tokens resource to get access to the merchant facade. This is described in the section Request an API token).
string M
price
Fixed price amount for the checkout, in the "currency" of the invoice object.
number M
currency
ISO 4217 3-character currency code. This is the currency associated with the price field, supported currencies are available via the Currencies resource.
string M
bitpayIdRequired
Forces the invoice to require BitPay ID to be completed, regardless of price.
boolean O
merchantName
Display string for merchant identification (ex. Wal-Mart Store #1452, Bowling Green, KY).
string O
forcedBuyerSelectedTranscationCurrency
Merchant pre-selects transaction currency on behalf of buyer.
string O
forcedBuyerSelectedWallet
Merchant pre-selects wallet on behalf of buyer.
string O
orderId
Can be used by the merchant to assign their own internal Id to an invoice. If used, there should be a direct match between an orderId and an invoice id.
string O
itemDesc
Invoice description - will be added as a line item on the BitPay checkout page, under the merchant name.
string O
itemCode
"bitcoindonation" for donations, otherwise do not include the field in the request.
string O
itemizedDetails
Object containing line item details for display.
object array O
amount
Amount of currency for item
string M
description
Display string for the item
string M
isFee
Indicates whether or not the item is considered a fee/tax or part of the main purchase
boolean M
notificationEmail
Merchant email address for notification of invoice status change. It is also possible to configure this email via the account setting on the BitPay dashboard or disable the email notification
string O
notificationURL
URL to which BitPay sends webhook notifications. HTTPS is mandatory.
string O
redirectURL
The shopper will be redirected to this URL when clicking on the Return button after a successful payment or when clicking on the Close button if a separate closeURL is not specified. Be sure to include "http://" or "https://" in the url.
string O
closeURL
URL to redirect if the shopper does not pay the invoice and click on the Close button instead. Be sure to include "http://" or "https://" in the url.
string O
autoRedirect

Set to false by default, merchant can setup automatic redirect to their website by setting this parameter to true. This will applied to the following scenarios:

  • When the invoice is paid, it automatically redirects the shopper to the redirectURL indicated
  • When the invoice expires, it automatically redirects the shopper to the closeURL if specified and to the redirectURL otherwise

Note: If automatic redirect is enabled, redirectURL becomes a mandatory invoice parameters.

boolean O
posData
A passthru variable provided by the merchant during invoice creation and designed to be used by the merchant to correlate the invoice with an order or other object in their system. This passthru variable can be a serialized object, e.g.: "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"".
string O
guid
A passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order ID in their system, which can be used as a lookup variable in Retrieve Invoice by GUID.
string O
transactionSpeed
This is a risk mitigation parameter for the merchant to configure how they want to fulfill orders depending on the number of block confirmations for the transaction made by the consumer on the selected cryptocurrency.

  • high: The invoice is marked as "confirmed" by BitPay as soon as full payment is received but not yet validated on the corresponding blockchain. The invoice will go from a status of "new" to "confirmed", bypassing the "paid" status. If you want an immediate notification for a payment, you can use the high speed setting. However, it makes you more susceptible to receiving fraudulent payments, so it is not recommended.
  • medium: (Recommended for most merchants) The invoice is marked as "confirmed" after the transaction has received basic confirmation on the corresponding blockchain. For invoices paid in Bitcoin (BTC), this means 1 confirmation on the blockchain which takes on average 10 minutes. The invoice will go from a status of "new" to "paid" followed by "confirmed" and then "complete"
  • low: The invoice is marked as "confirmed" once BitPay has credited the funds to the merchant account. The invoice will go from a status of "new" to "paid" followed by "complete", thus bypassing the "confirmed" status. For invoices paid in Bitcoin (BTC), this means 6 confirmations on the blockchain which takes on average an hour

If not set on the invoice, transactionSpeed will default to the account-level Order Settings.

Note : orders are only credited to your BitPay Account Summary for settlement after the invoice reaches the status "complete" (regardless of this setting).

string O
fullNotifications
This parameter is set to true by default, meaning all standard notifications are being sent for a payment made to an invoice. If you decide to set it to false instead, only 1 webhook will be sent for each invoice paid by the consumer. This webhook will be for the "confirmed" or "complete" invoice status, depending on the transactionSpeed selected.
boolean O
extendedNotifications
Allows merchants to get access to additional webhooks. For instance when an invoice expires without receiving a payment or when it is refunded. If set to true, then fullNotifications is automatically set to true. When using the extendedNotifications parameter, the webhook also have a payload slightly different from the standard webhooks.
boolean O
physical
Indicates whether items are physical goods. Alternatives include digital goods and services.
boolean O
buyerSms
SMS phone number including country code i.e. “+12223334444.
string O
buyer
Allows merchant to pass buyer related information in the invoice object
object O
name
Buyer's name
string O
address1
Buyer's address
string O
address2
Buyer's appartment or suite number
string O
locality
Buyer's city or locality
string O
region
Buyer's state or province
string O
postalCode
Buyer's Zip or Postal Code
string O
country
Buyer's Country code. Format ISO 3166-1 alpha-2
string O
email
Buyer's email address. If provided during invoice creation, this will bypass the email prompt for the consumer when opening the invoice.
string O
phone
Buyer's phone number
string O
notify
Indicates whether a BitPay email confirmation should be sent to the buyer once he has paid the invoice
boolean O
paymentCurrencies
Allow the merchant to select the cryptocurrencies available as payment option on the BitPay invoice. Possible values are currently "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". For instance "paymentCurrencies": ["BTC"] will create an invoice with only XRP available as transaction currency, thus bypassing the currency selection step on the invoice.
array O
jsonPayProRequired
If set to true, this means that the invoice will only accept payments from wallets which have implemented the BitPay JSON Payment Protocol
boolean O
acceptanceWindow
Number of milliseconds that a user has to pay an invoice before it expires (0-900000). If not set, invoice will default to the account acceptanceWindow. If account acceptanceWindow is not set, invoice will default to 15 minutes (900,000 milliseconds).
number O
HTTP Response

for invoices created via the POS facade (unsigned requests)

{
  "facade": "pos/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=KSnNNfoMDsbRzd1U9ypmVH",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "new",
     "price": 20,
     "currency": "USD",
     "itemDesc": "Item 1",
     "orderId": "20210511_abcde",
     "invoiceTime": 1620734545366,
     "expirationTime": 1620735445366,
     "currentTime": 1620734545415,
     "guid": "payment#1234",
     "id": "KSnNNfoMDsbRzd1U9ypmVH",
     "lowFeeDetected": false,
     "amountPaid": 0,
     "displayAmountPaid": "0",
     "exceptionStatus": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "refundAddressRequestPending": false,
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BTC"
     },
     "paymentSubtotals": {
        "BTC": 18200,
        "BCH": 744500,
        "ETH": 2535000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7084249,
        "DOGE": 2068707100,
        "DAI": 9990000000000000000,
        "WBTC": 18100
     },
     "paymentTotals": {
        "BTC": 29800,
        "BCH": 744500,
        "ETH": 2535000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7084249,
        "DOGE": 2068707100,
        "DAI": 9990000000000000000,
        "WBTC": 18100
     },
     "paymentDisplayTotals": {
        "BTC": "0.000298",
        "BCH": "0.007445",
        "ETH": "0.002535",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.084249",
        "DOGE": "20.687071",
        "DAI": "9.99",
        "WBTC": "0.000181"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000182",
        "BCH": "0.007445",
        "ETH": "0.002535",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.084249",
        "DOGE": "20.687071",
        "DAI": "9.99",
        "WBTC": "0.000181"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55072.459995,
          "EUR": 45287.42496000001,
          "BCH": 40.884360403999914,
          "ETH": 13.953840617367156,
          "GUSD": 55072.459995,
          "PAX": 55072.459995,
          "BUSD": 55072.459995,
          "USDC": 55072.459995,
          "XRP": 38907.54307403195,
          "DOGE": 113694.39064944115,
          "DAI": 55018.486859390934,
          "WBTC": 0.9983514430763876
        },
        "BCH": {
          "USD": 1343.1537000000003,
          "EUR": 1104.481875,
          "BTC": 0.02437664632426631,
          "ETH": 0.34031805835672807,
          "GUSD": 1343.1537000000003,
          "PAX": 1343.1537000000003,
          "BUSD": 1343.1537000000003,
          "USDC": 1343.1537000000003,
          "XRP": 948.9100440136494,
          "DOGE": 2772.8748903518513,
          "DAI": 1341.8373575522414,
          "WBTC": 0.024348638771359274
        },
        "ETH": {
          "USD": 3944.6466899999996,
          "EUR": 3242.8077850000004,
          "BTC": 0.07159065804331831,
          "BCH": 2.9284029977060646,
          "GUSD": 3944.6466899999996,
          "PAX": 3944.6466899999996,
          "BUSD": 3944.6466899999996,
          "USDC": 3944.6466899999996,
          "XRP": 2786.8105223000134,
          "DOGE": 8143.529484384802,
          "DAI": 3940.7807840508463,
          "WBTC": 0.07150840394174397
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018148813739087574,
          "BCH": 0.0007423739634603535,
          "ETH": 0.0002533723864638336,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.7064791200096081,
          "DOGE": 2.0644509190212936,
          "DAI": 0.9990199614178492,
          "WBTC": 0.000018127961655735506
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018148813739087574,
          "BCH": 0.0007423739634603535,
          "ETH": 0.0002533723864638336,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.7064791200096081,
          "DOGE": 2.0644509190212936,
          "DAI": 0.9990199614178492,
          "WBTC": 0.000018127961655735506
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018148813739087574,
          "BCH": 0.0007423739634603535,
          "ETH": 0.0002533723864638336,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.7064791200096081,
          "DOGE": 2.0644509190212936,
          "DAI": 0.9990199614178492,
          "WBTC": 0.000018127961655735506
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018148813739087574,
          "BCH": 0.0007423739634603535,
          "ETH": 0.0002533723864638336,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.7064791200096081,
          "DOGE": 2.0644509190212936,
          "DAI": 0.9990199614178492,
          "WBTC": 0.000018127961655735506
        },
        "XRP": {
          "USD": 1.4115822,
          "EUR": 1.1595738,
          "BTC": 0.000025618542425211465,
          "BCH": 0.0010479218725640857,
          "ETH": 0.00035765595070386846,
          "GUSD": 1.4115822,
          "PAX": 1.4115822,
          "BUSD": 1.4115822,
          "USDC": 1.4115822,
          "DOGE": 2.9141421700640993,
          "DAI": 1.4101987949821229,
          "WBTC": 0.000025589107995518766
        },
        "DOGE": {
          "USD": 0.48339370000000004,
          "EUR": 0.3971920350538,
          "BTC": 0.000008773022223948377,
          "BCH": 0.0003588588969807651,
          "ETH": 0.00012247861537058246,
          "GUSD": 0.48339370000000004,
          "PAX": 0.48339370000000004,
          "BUSD": 0.48339370000000004,
          "USDC": 0.48339370000000004,
          "XRP": 0.3415075557941885,
          "DAI": 0.4829199555236314,
          "WBTC": 0.000008762942458224111
        },
        "DAI": {
          "USD": 1.000977,
          "EUR": 0.822476775498,
          "BTC": 0.00001816654513011066,
          "BCH": 0.0007430992628226543,
          "ETH": 0.0002536199312854088,
          "GUSD": 1.000977,
          "PAX": 1.000977,
          "BUSD": 1.000977,
          "USDC": 1.000977,
          "XRP": 0.7071693501098576,
          "DOGE": 2.066467887569177,
          "WBTC": 0.00001814567267427316
        },
        "WBTC": {
          "USD": 55122.38,
          "EUR": 45292.626464119996,
          "BTC": 1.0004058074752062,
          "BCH": 40.92141971596772,
          "ETH": 13.966488968166292,
          "GUSD": 55122.38,
          "PAX": 55122.38,
          "BUSD": 55122.38,
          "USDC": 55122.38,
          "XRP": 38942.81051523522,
          "DOGE": 113797.44804964097,
          "DAI": 55068.35794086002
        }
     },
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "jsonPayProRequired": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
     },
     "merchantName": "Test Merchant",
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "RIP681": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        }
     },
     "token": "8nPJSGgi7omxcbGGZ4KsSgqdi6juypBe9pVpSURDeAwx4VDQx1XfWPy5qqknDKT9KQ"
  }
}

For invoices created via the merchant facade (signed requests)

{
  "facade": "merchant/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "new",
     "price": 20,
     "currency": "USD",
     "itemDesc": "Item 1",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620733980807,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 0,
     "displayAmountPaid": "0",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BTC"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "shopper": {},
     "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
    ],
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
     },
     "token": "Svbfdow1xXc6chtQB3GVKqyRVhyLMqn3nhMhyTtf9T9vTCDKrVfdoA7n94nZUECZf"
  }
}

On the right side, you will find an example of the invoice object returned in the response you will get from the BitPay server. A description of all invoice fields is available in the resource section.

Update an invoice

PUT
https://bitpay.com/invoices/:invoiceId
Facades

merchant

HTTP Request

via the merchant facade (signed requests)

curl -X PUT \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223" \
--url "https://bitpay.com/invoices/G3viJEJgE8Jk2oekSdgT2A" \
-d @- <<'EOF'
{
"buyerSms":"+12223334444",
"token":"3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU"
}
EOF
<?php

$resourceUrl = 'https://bitpay.com/invoices';
$invoiceId = "G3viJEJgE8Jk2oekSdgT2A";

$postData = json_encode([
   'buyerSms' => '+12223334444',
   'token' => '3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU',
]);

$curlCli = curl_init($resourceUrl . '/' . $invoiceId);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
   'X-Accept-Version: 2.0.0',
   'Content-Type: application/json',
   'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature: 304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223'
]);

curl_setopt($curlCli, CURLOPT_POSTFIELDS, stripslashes($postData));

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + invoiceId);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
    "X-Identity",
    "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
    );
httpWebRequest.Headers.Add(
    "X-Signature",
    "304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223"
    );
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "PUT";

string json = "{" +
                  "\"buyerSms\":\"+12223334444\"," +
                  "\"token\":\"3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU\"" +
              "}";

using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
    streamWriter.Write(json);
    streamWriter.Flush();
    streamWriter.Close();
}

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
    var result = streamReader.ReadToEnd();
    Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";

var json = "{" +
                 "\"buyerSms\":\"+12223334444\"," +
                 "\"token\":\"3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU\"" +
           "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
   .header("Content-Type","application/json")
   .header("X-Accept-Version","2.0.0")
   .header(
           "X-Identity",
           "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
   )
   .header(
           "X-Signature",
           "304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223"
   )
   .uri(URI.create(resourceUrl + "/" + invoiceId))
   .PUT(HttpRequest.BodyPublishers.ofString(json))
   .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
let request = require('request');

let resource_url = 'https://bitpay.com/invoices';
let invoiceId = 'G3viJEJgE8Jk2oekSdgT2A';
let post_data = {
   "buyerSms": "+12223334444"
   "token": "3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU"
};
let headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223"
};
let options = {
   url: resource_url + '/' + invoiceId,
   method: 'PUT',
   json: post_data,
   headers: headers
};

request(options, function (error, response, body) {
   console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
invoiceId := "G3viJEJgE8Jk2oekSdgT2A"
postData := []byte(`{
   "buyerSms": "+12223334444",
   "token": "3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU"
}`)

request, err := http.NewRequest("PUT", resourceUrl + "/" + invoiceId, bytes.NewBuffer(postData))
if err != nil {
   log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
   log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
invoice_id = "G3viJEJgE8Jk2oekSdgT2A"
post_data = {
   'buyerSms': '+12223334444',
   'token': '3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU'
}
headers = {
   'X-Accept-Version': '2.0.0',
   'Content-Type': 'application/json',
   'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
   'X-Signature': '304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223'
}
response = requests.put(url=resource_url + '/' + invoice_id, data=json.dumps(post_data), headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
invoiceId = "G3viJEJgE8Jk2oekSdgT2A"
post_data = {
   "buyerSms": "+12223334444",
   "token": "3LKKrrNB2BcVAu2Y24QQ78GrKUk2ANLK4eLo85Q1a2HU"
}
headers = {
   "X-Accept-Version": "2.0.0",
   "Content-Type": "application/json",
   "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
   "X-Signature": "304402205725d948ebbc7af00c5132fbb9b959a90c67c4eae4549a75f481691cc0fd89a102206ebf3b4c055c75878dda498c478f146aed75b5a4e14106948d6bf9c3fe840223"
}
uri = URI.parse(resource_url + "/" + invoiceId)
request = Net::HTTP::Put.new(uri.to_s, headers)
request.body = post_data.to_json

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
   http.use_ssl = true
   http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
Headers
fields Presence
X-Accept-Version
Must be set to 2.0.0 for requests to the BitPay API.
M
Content-Type
Must be set to application/json for requests to the BitPay API.
M
X-Identity
TThe hexadecimal public key generated from the client private key.
M
X-Signature
Header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key.
M
Body
Name Type Presence
buyerEmail
Buyer email address (Updating an invoice will require EITHER an SMS or E-mail).
string C
buyerSms
SMS to use to process any payment exception if necessary, includes country code i.e. “+12223334444" (Updating an invoice will require EITHER an SMS or E-mail).
string C
smsCode
Verification code in order to complete the SMS verification process (smsCode required only when verifying SMS).
string C
token
Approved merchant facade token.
string M
autoVerify
If provided alongside a valid SMS, will bypass the need to complete an SMS challenge (only available in the test environment).
string O
HTTP Response

The updated invoice via the merchant facade (signed requests)

{
  "facade": "merchant/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620734253073,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 739100,
     "displayAmountPaid": "0.007391",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [
        {
          "amount": 739100,
          "confirmations": 1,
          "receivedTime": "2021-05-11T11:54:32.978Z",
          "txid": "0638edcce08856726135e4f464e603706bc12313fd9a9cd046a177e4ffce98dd",
          "exRates": {
             "BCH": 1,
             "USD": 1355.2800000000002,
             "BTC": 0.02446472581430398,
             "EUR": 1112.66,
             "ETH": 0.33972366494876377,
             "GUSD": 1355.2800000000002,
             "PAX": 1355.2800000000002,
             "BUSD": 1355.2800000000002,
             "USDC": 1355.2800000000002,
             "XRP": 948.9227925474189,
             "DOGE": 2725.466119299674,
             "DAI": 1353.985589776174,
             "WBTC": 0.024436520994387978
          },
          "outputIndex": 0
        }
     ],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "sms": "+12223334444",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH",
        "emailAddress": "john@doe.com"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "shopper": {
        "user": "FeFc5a7hUwmrEnYwVPmrkp"
     },
     "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": true,
     "isCancelled": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
        "verificationLink": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A?t=hv"
     },
     "token": "Svbfdow1xXc6chtQB3GVKqyRVhyLMqn3nhMhyTtf9T9vTCDKrVfdoA7n94nZUECZf"
  }
}

On the right side, you will find an example of the invoice object returned in the response you will get from the BitPay server. A description of all invoice fields is available in the resource section.

Retrieve an invoice

GET
https://bitpay.com/invoices/:invoiceId
Facades

pos merchant

HTTP Request

via the pos facade (unsigned requests)

curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
--url "https://bitpay.com/invoices/G3viJEJgE8Jk2oekSdgT2A?token=AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";
var token = "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + invoiceId + "?token=" + token);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";
var token = "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .uri(URI.create(resourceUrl + "/" + invoiceId + "?token=" + token))
    .GET()
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices';
$invoiceId = 'G3viJEJgE8Jk2oekSdgT2A';
$token = 'AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv';

$curlCli = curl_init($resourceUrl . '/' . $invoiceId . '?token=' . $token);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/invoices';
let invoice_id = 'G3viJEJgE8Jk2oekSdgT2A';
let token = 'AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv';
let headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"};
let options = {
    url: resource_url + '/' + invoice_id + '?token=' + token,
    method: 'GET',
    headers: headers,
    json: true
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
invoiceId := "G3viJEJgE8Jk2oekSdgT2A"
token := "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"

request, err := http.NewRequest("GET", resourceUrl + "/" + invoiceId + "?token=" + token, nil)
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
invoice_id = 'G3viJEJgE8Jk2oekSdgT2A'
token = 'AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv'
headers = {'X-Accept-Version': '2.0.0', 'Content-Type': 'application/json'}
response = requests.get(url=resource_url + '/' + invoice_id + '?token=' + token, headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
invoice_id = "G3viJEJgE8Jk2oekSdgT2A"
token = "AKnJyeLF1BjAfgfDbVUzHXk64N1WuDq3R9xtZouQFhSv"
headers = {"X-Accept-Version": "2.0.0", "Content-Type": "application/json"}
uri = URI.parse(resource_url + "/" + invoice_id + "?token=" + token)
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body

via the merchant facade (signed requests)

curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad" \
--url "https://bitpay.com/invoices/G3viJEJgE8Jk2oekSdgT2A?token=MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + invoiceId + "?token=" + token);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
     "X-Identity",
     "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
     "X-Signature",
     "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var invoiceId = "G3viJEJgE8Jk2oekSdgT2A";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .header(
              "X-Identity",
              "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
    )
    .header(
              "X-Signature",
              "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
    )
    .uri(URI.create(resourceUrl + "/" + invoiceId + "?token=" + token))
    .GET()
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices';
$invoiceId = 'G3viJEJgE8Jk2oekSdgT2A';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';

$curlCli = curl_init($resourceUrl . '/' . $invoiceId . '?token=' . $token);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json',
    'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature: 304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');
let resource_url = 'https://bitpay.com/invoices';
let invoice_id = 'G3viJEJgE8Jk2oekSdgT2A';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
};
let options = {
    url: resource_url + '/' + invoice_id + '?token=' + token,
    method: 'GET',
    headers: headers,
    json: true
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
invoiceId := "G3viJEJgE8Jk2oekSdgT2A"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"

request, err := http.NewRequest("GET", resourceUrl + "/" + invoiceId + "?token=" + token, nil)
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
invoice_id = 'G3viJEJgE8Jk2oekSdgT2A'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
headers = {
    'X-Accept-Version': '2.0.0',
    'Content-Type': 'application/json',
    'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature': '304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad'
}
response = requests.get(url=resource_url + '/' + invoice_id + '?token=' + token, headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
invoice_id = "G3viJEJgE8Jk2oekSdgT2A"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
}
uri = URI.parse(resource_url + "/" + invoice_id + "?token=" + token)
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
URL Parameters
Parameter Type Presence
invoiceId
The ID of the invoice being retrieved.
string M
?token=
When fetching an invoice via the merchant or the pos facade, pass the API token as a URL parameter - the same token used to create the invoice in the first place.
string C
Headers
fields Presence
X-Accept-Version
must be set to 2.0.0 for request to the BitPay API
M
Content-Type
must be set to application/json for request to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key. This header is required when using tokens with higher privileges (merchant facade). When using standard pos facade token directly from the BitPay dashboard (with "Require Authentication" disabled), this header is not needed.
C
X-Signature
header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key. This header is required when using tokens with higher privileges (merchant facade). When using standard pos facade token directly from the BitPay dashboard (with "Require Authentication" disabled), this header is not needed.
C
HTTP Response

For invoices fetched via the pos facade (unsigned requests)

{
  "facade": "pos/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620734669770,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 739100,
     "displayAmountPaid": "0.007391",
     "exceptionStatus": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "refundAddressRequestPending": false,
     "buyerProvidedInfo": {
        "emailAddress": "Pa4HyqpK24krqxKYdBrDcu",
        "sms": "3TMbmA7pBnShz6u2QF2dLE",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "jsonPayProRequired": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
     },
     "merchantName": "Test Merchant",
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "token": "8nPJSGgi7omxcbGGZ4KsSgdPFLVQGRDzRV9Yd4ZoNjDubzapTBtSLxgm3Vo6fTmGmF"
  }
}

For invoices fetched via the merchant facade (signed requests)

{
  "facade": "merchant/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620734253073,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 739100,
     "displayAmountPaid": "0.007391",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [
        {
          "amount": 739100,
          "confirmations": 1,
          "receivedTime": "2021-05-11T11:54:32.978Z",
          "txid": "0638edcce08856726135e4f464e603706bc12313fd9a9cd046a177e4ffce98dd",
          "exRates": {
             "BCH": 1,
             "USD": 1355.2800000000002,
             "BTC": 0.02446472581430398,
             "EUR": 1112.66,
             "ETH": 0.33972366494876377,
             "GUSD": 1355.2800000000002,
             "PAX": 1355.2800000000002,
             "BUSD": 1355.2800000000002,
             "USDC": 1355.2800000000002,
             "XRP": 948.9227925474189,
             "DOGE": 2725.466119299674,
             "DAI": 1353.985589776174,
             "WBTC": 0.024436520994387978
          },
          "outputIndex": 0
        }
     ],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "sms": "+12223334444",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH",
        "emailAddress": "john@doe.com"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "shopper": {
        "user": "FeFc5a7hUwmrEnYwVPmrkp"
     },
     "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": true,
     "isCancelled": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
        "verificationLink": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A?t=hv"
     },
     "token": "Svbfdow1xXc6chtQB3GVKqyRVhyLMqn3nhMhyTtf9T9vTCDKrVfdoA7n94nZUECZf"
  }
}

On the right side, you will find an example of the invoice object returned in the response you will get from the BitPay server. A description of all invoice fields is available in the resource section.

Retrieve an invoice by guid

GET
https://bitpay.com/invoices/guid/:guid
Facades

merchant

HTTP Request

via the merchant facade (signed requests)

curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad" \
--url "https://bitpay.com/invoices/guid/payment#1234?token=MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
var resourceUrl = "https://bitpay.com/invoices/guid";
var guid = "payment#1234";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(resourceUrl + "/" + guid + "?token=" + token);
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
     "X-Identity",
     "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
     "X-Signature",
     "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices/guid";
var guid = "payment#1234";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .header(
              "X-Identity",
              "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
    )
    .header(
              "X-Signature",
              "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
    )
    .uri(URI.create(resourceUrl + "/" + guid + "?token=" + token))
    .GET()
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices/guid';
$guid = 'payment#1234';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';

$curlCli = curl_init($resourceUrl . '/' . $guid . '?token=' . $token);

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json',
    'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature: 304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');
let resource_url = 'https://bitpay.com/invoices/guid';
let guid = 'payment#1234';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
};
let options = {
    url: resource_url + '/' + guid + '?token=' + token,
    method: 'GET',
    headers: headers,
    json: true
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices/guid"
guid := "payment#1234"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"

request, err := http.NewRequest("GET", resourceUrl + "/" + guid + "?token=" + token, nil)
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices/guid'
guid = 'payment#1234'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
headers = {
    'X-Accept-Version': '2.0.0',
    'Content-Type': 'application/json',
    'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature': '304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad'
}
response = requests.get(url=resource_url + '/' + guid + '?token=' + token, headers=headers).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices/guid"
guid = "payment#1234"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "304502207df9658861a0a2ce454b6e855752eab102a950f19107ab4e635b1f5f9e8d3f14022100b12a78a6ed9ac61d62afaed39fc5fd1473dcd881889981c55fb7c25c695248ad"
}
uri = URI.parse(resource_url + "/" + guid + "?token=" + token)
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
URL Parameters
Parameter Type Presence
guid
The guid of the refund request being retrieved.
string M
?token=
When fetching an invoice via the merchant facade, pass the API token as a URL parameter - the same token used to create the invoice in the first place.
string C
Headers
fields Presence
X-Accept-Version
must be set to 2.0.0 for request to the BitPay API
M
Content-Type
must be set to application/json for request to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key. This header is required when using tokens with higher privileges (merchant facade).
C
X-Signature
header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key. This header is required when using tokens with higher privileges (merchant facade).
C
HTTP Response

For invoices fetched via the pos facade (unsigned requests)

{
  "facade": "pos/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620734669770,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 739100,
     "displayAmountPaid": "0.007391",
     "exceptionStatus": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "refundAddressRequestPending": false,
     "buyerProvidedInfo": {
        "emailAddress": "Pa4HyqpK24krqxKYdBrDcu",
        "sms": "3TMbmA7pBnShz6u2QF2dLE",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "jsonPayProRequired": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
     },
     "merchantName": "Test Merchant",
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "token": "8nPJSGgi7omxcbGGZ4KsSgdPFLVQGRDzRV9Yd4ZoNjDubzapTBtSLxgm3Vo6fTmGmF"
  }
}

For invoices fetched via the merchant facade (signed requests)

{
  "facade": "merchant/invoice",
  "data": {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620734253073,
     "guid": "payment#1234",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 739100,
     "displayAmountPaid": "0.007391",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [
        {
          "amount": 739100,
          "confirmations": 1,
          "receivedTime": "2021-05-11T11:54:32.978Z",
          "txid": "0638edcce08856726135e4f464e603706bc12313fd9a9cd046a177e4ffce98dd",
          "exRates": {
             "BCH": 1,
             "USD": 1355.2800000000002,
             "BTC": 0.02446472581430398,
             "EUR": 1112.66,
             "ETH": 0.33972366494876377,
             "GUSD": 1355.2800000000002,
             "PAX": 1355.2800000000002,
             "BUSD": 1355.2800000000002,
             "USDC": 1355.2800000000002,
             "XRP": 948.9227925474189,
             "DOGE": 2725.466119299674,
             "DAI": 1353.985589776174,
             "WBTC": 0.024436520994387978
          },
          "outputIndex": 0
        }
     ],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "sms": "+12223334444",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH",
        "emailAddress": "john@doe.com"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "shopper": {
        "user": "FeFc5a7hUwmrEnYwVPmrkp"
     },
     "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": true,
     "isCancelled": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "RIP681": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
          "BIP73": "https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A"
        }
     },
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A",
        "verificationLink": "https://link.bitpay.com/i/G3viJEJgE8Jk2oekSdgT2A?t=hv"
     },
     "token": "Svbfdow1xXc6chtQB3GVKqyRVhyLMqn3nhMhyTtf9T9vTCDKrVfdoA7n94nZUECZf"
  }
}

On the right side, you will find an example of the invoice object returned in the response you will get from the BitPay server. A description of all invoice fields is available in the resource section.

Retrieve invoices filtered by query

GET
https://bitpay.com/invoices
Facades

merchant

HTTP Request

via the merchant facade (signed requests)

curl -X GET \
-H "X-Accept-Version: 2.0.0" \
-H "Content-Type: application/json" \
-H "X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e" \
-H "X-Signature: 3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd" \
--url "https://bitpay.com/invoices?token=MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY&status=complete&dateStart=2021-5-10&dateEnd=2021-5-12"
var resourceUrl = "https://bitpay.com/invoices";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

var dateStart = "2021-5-10";
var dateEnd = "2021-5-12";
var status = "complete";

var httpWebRequest = (HttpWebRequest)WebRequest.Create(
                                resourceUrl +
                                "?token=" + token +
                                "&status=" + status +
                                "&dateStart=" + dateStart +
                                "&dateEnd=" + dateEnd +
                          );
httpWebRequest.Headers.Add("X-Accept-Version", "2.0.0");
httpWebRequest.Headers.Add(
     "X-Identity",
     "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
);
httpWebRequest.Headers.Add(
     "X-Signature",
     "3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd"
);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";

var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
     var result = streamReader.ReadToEnd();
     Console.WriteLine(result);
}
var resourceUrl = "https://bitpay.com/invoices";
var token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY";

var dateStart = "2021-5-10";
var dateEnd = "2021-5-12";
var status = "complete";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request=HttpRequest.newBuilder()
    .header("Content-Type","application/json")
    .header("X-Accept-Version","2.0.0")
    .header(
              "X-Identity",
              "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e"
    )
    .header(
              "X-Signature",
              "3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd"
    )
    .uri(URI.create(
         resourceUrl +
         "?token=" + token +
         "&status=" + status +
         "&dateStart=" + dateStart +
         "&dateEnd=" + dateEnd +
    ))
    .GET()
    .build();

HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
<?php

$resourceUrl = 'https://bitpay.com/invoices';
$token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';

$dateStart = '2021-5-10';
$dateEnd = '2021-5-12';
$status = 'complete';

$curlCli = curl_init(
    $resourceUrl .
    '?token=' . $token .
    '&status=' . $status .
    '&dateStart=' . $dateStart .
    '&dateEnd=' . $dateEnd .

curl_setopt($curlCli, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curlCli, CURLOPT_HTTPHEADER, [
    'X-Accept-Version: 2.0.0',
    'Content-Type: application/json',
    'X-Identity: 02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature: 3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd'
]);

$result = curl_exec($curlCli);
$resultData = json_decode($result, TRUE);
curl_close($curlCli);

echo $resultData;

?>
let request = require('request');

let resource_url = 'https://bitpay.com/invoices';
let token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY';
let dateStart = '2021-5-10';
let dateEnd = '2021-5-12';
let status = 'complete';
let headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd"
};
let options = {
    url: resource_url +
         '?token=' + token +
         '&status=' + status +
         '&dateStart=' + dateStart +
         '&dateEnd=' + dateEnd +
    method: 'GET',
    headers: headers,
    json: true
};

request(options, function (error, response, body) {
    console.log(body);
});
resourceUrl := "https://bitpay.com/invoices"
token := "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
dateStart := "2021-5-10"
dateEnd := "2021-5-12"
status := "complete"

request, err := http.NewRequest(
    "GET",
    resourceUrl +
    "?token=" + token +
    "&status=" + complete +
    "&dateStart=" + dateStart +
    "&dateEnd=" + dateEnd +
    nil)
if err != nil {
    log.Fatal(err)
}

request.Header.Set("X-Accept-Version", "2.0.0")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Identity", "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e")
request.Header.Set("X-Signature", "3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd")

client := &http.Client{Timeout: time.Second * 10}

response, err := client.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

body, err := ioutil.ReadAll(response.Body)

fmt.Printf("%s\n", body)
resource_url = 'https://bitpay.com/invoices'
token = 'MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY'
dateStart = '2021-5-10'
dateEnd = '2021-5-12'
status = 'complete'
headers = {
    'X-Accept-Version': '2.0.0',
    'Content-Type': 'application/json',
    'X-Identity': '02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e',
    'X-Signature': '3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd'
}
response = requests.get(
    url=resource_url +
         '?token=' + token +
         '&status=' + complete +
         '&dateStart=' + dateStart +
         '&dateEnd=' + dateEnd +
    headers=headers
).content
print(response.decode(json.detect_encoding(response)))
resource_url = "https://bitpay.com/invoices"
token = "MqA2wX15qHCbG7FBtJZRAxQunrRjAvGBRVJedsiTnZY"
dateStart = "2021-5-10"
dateEnd = "2021-5-12"
status = "complete"
headers = {
    "X-Accept-Version": "2.0.0",
    "Content-Type": "application/json",
    "X-Identity": "02811dcd84bb5f436269ed070c27858f872196c90ce77cf869cf3516c82477d22e",
    "X-Signature": "3046022100b55d1e0fab0d91341bc3b079d2f609d970bc0202ca423259be21e6f7185e21720221008ff619310f5fe546b8c8b3de4620357468bf00c37ef60c976808e7be5473fbdd"
}
uri = URI.parse(
    resource_url +
    "?token=" + token +
    "&status=" + complete +
    "&dateStart=" + dateStart +
    "&dateEnd=" + dateEnd +
)
request = Net::HTTP::Get.new(uri.to_s, headers)

response = Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

puts response.request(request).body
URL Parameters
Parameter Type Presence
?token=
A merchant facade token can be retrieved using the Tokens resource. This is described in the section Request an API token).
string M
&dateStart=
the start of the date window to query for invoices. Format YYYY-MM-DD
string M
&dateEnd=
the end of the date window to query for invoices. Format YYYY-MM-DD
string M
&status=
the invoice status you want to query on
string O
&orderId=
the optional order id specified at time of invoice creation
string O
&limit=
maximum results that the query will return (useful for paging results)
number O
&offset=
number of results to offset (ex. skip 10 will give you results starting with the 11th result)
number O
Headers
fields Presence
X-Accept-Version
must be set to 2.0.0 for request to the BitPay API
M
Content-Type
must be set to application/json for request to the BitPay API
M
X-Identity
the hexadecimal public key generated from the client private key
M
X-Signature
header is the ECDSA signature of the full request URL concatenated with the request body, signed with your private key
M
HTTP Response
{
  "facade": "merchant/invoice",
  "data": [
    {
     "url": "https://bitpay.com/invoice?id=KSnNNfoMDsbRzd1U9ypmVH",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_abcde",
     "invoiceTime": 1620734545366,
     "expirationTime": 1620735445366,
     "currentTime": 1620744196444,
     "guid": "payment#1234",
     "id": "KSnNNfoMDsbRzd1U9ypmVH",
     "lowFeeDetected": false,
     "amountPaid": 744500,
     "displayAmountPaid": "0.007445",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [
        {
          "amount": 744500,
          "confirmations": 6,
          "receivedTime": "2021-05-11T12:03:01.526Z",
          "txid": "f35a1dff9ecf0e1cd87d6922eaa1d5e8faaca65efd84b2e5869e8ed7fcfb6fe4",
          "exRates": {
            "BCH": 1,
            "USD": 1346.5200000000002,
            "BTC": 0.0244377406759562,
            "EUR": 1107.25,
            "ETH": 0.34117098582128125,
            "GUSD": 1346.5200000000002,
            "PAX": 1346.5200000000002,
            "BUSD": 1346.5200000000002,
            "USDC": 1346.5200000000002,
            "XRP": 951.2882646753377,
            "DOGE": 2779.8244514805524,
            "DAI": 1345.2003584483623,
            "WBTC": 0.024409662928680975
          },
          "outputIndex": 1
        }
     ],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "sms": "+12223334444",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH",
        "emailAddress": "john@doe.com"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE": 110711.73652694612,
          "DAI": 55412.88491451783
        }
     },
     "minerFees": {
        "BTC": {
          "satoshisPerByte": 1,
          "totalFee": 100,
          "fiatAmount": 0.02
        },
        "BCH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "ETH": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "GUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "PAX": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "BUSD": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "USDC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "XRP": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DOGE": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "DAI": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        },
        "WBTC": {
          "satoshisPerByte": 0,
          "totalFee": 0,
          "fiatAmount": 0
        }
     },
     "shopper": {
        "user": "FeFc5a7hUwmrEnYwVPmrkp"
     },
     "jsonPayProRequired": false,
     "merchantName": "Test Merchant",
     "bitpayIdRequired": true,
     "isCancelled": false,
     "itemizedDetails": [
        {
            "amount": 5,
            "description": "Item 1",
            "isFee": false
        },
        {
            "amount": 15,
            "description": "Item 2",
            "isFee": false
        }
     ],
     "transactionCurrency": "BCH",
     "supportedTransactionCurrencies": {
        "BTC": {
          "enabled": true
        },
        "BCH": {
          "enabled": true
        },
        "ETH": {
          "enabled": true
        },
        "GUSD": {
          "enabled": true
        },
        "PAX": {
          "enabled": true
        },
        "BUSD": {
          "enabled": true
        },
        "USDC": {
          "enabled": true
        },
        "XRP": {
          "enabled": true
        },
        "DOGE": {
          "enabled": true
        },
        "DAI": {
          "enabled": true
        },
        "WBTC": {
          "enabled": true
        }
     },
     "paymentCodes": {
        "BTC": {
          "BIP72b": "bitcoin:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "BCH": {
          "BIP72b": "bitcoincash:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "ETH": {
          "EIP681": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "GUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "PAX": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "BUSD": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "USDC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "XRP": {
          "BIP72b": "ripple:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "RIP681": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "DOGE": {
          "BIP72b": "dogecoin:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
          "BIP73": "https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "DAI": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        },
        "WBTC": {
          "EIP681b": "ethereum:?r=https://bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH"
        }
     },
     "universalCodes": {
        "paymentString": "https://link.bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH",
        "verificationLink": "https://link.bitpay.com/i/KSnNNfoMDsbRzd1U9ypmVH?t=hv"
     },
     "token": "Svbfdow1xXc6chtQB3GVKqyRVhyLMqn3nhMhyTtf9T9vTCDKrVfdoA7n94nZUECZf"
    },
    {
     "url": "https://bitpay.com/invoice?id=G3viJEJgE8Jk2oekSdgT2A",
     "posData": "\"{ \"ref\" : 711454, \"item\" : \"test_item\" }\"",
     "status": "confirmed",
     "price": 20,
     "currency": "USD",
     "orderId": "20210511_fghij",
     "invoiceTime": 1620733980748,
     "expirationTime": 1620734880748,
     "currentTime": 1620744196460,
     "guid": "payment#5678",
     "id": "G3viJEJgE8Jk2oekSdgT2A",
     "lowFeeDetected": false,
     "amountPaid": 744500,
     "displayAmountPaid": "0.007445",
     "exceptionStatus": false,
     "targetConfirmations": 6,
     "transactions": [
        {
          "amount": 744500,
          "confirmations": 6,
          "receivedTime": "2021-05-11T12:03:01.526Z",
          "txid": "f35a1dff9ecf0e1cd87d6922eaa1d5e8faaca65efd84b2e5869e8ed7fcfb6fe4",
          "exRates": {
            "BCH": 1,
            "USD": 1346.5200000000002,
            "BTC": 0.0244377406759562,
            "EUR": 1107.25,
            "ETH": 0.34117098582128125,
            "GUSD": 1346.5200000000002,
            "PAX": 1346.5200000000002,
            "BUSD": 1346.5200000000002,
            "USDC": 1346.5200000000002,
            "XRP": 951.2882646753377,
            "DOGE": 2779.8244514805524,
            "DAI": 1345.2003584483623,
            "WBTC": 0.024409662928680975
          },
          "outputIndex": 1
        }
     ],
     "transactionSpeed": "medium",
     "buyer": {
        "email": "john@doe.com"
     },
     "redirectURL": "https://merchantwebsite.com/shop/return",
     "autoRedirect": false,
     "closeURL": "https://merchantwebsite.com/shop/cancel",
     "refundAddresses": [],
     "refundAddressRequestPending": false,
     "buyerProvidedEmail": "john@doe.com",
     "buyerProvidedInfo": {
        "emailAddress": "john@doe.com",
        "sms": "+12223334444",
        "smsVerified": true,
        "selectedWallet": "bitpay",
        "selectedTransactionCurrency": "BCH",
        "emailAddress": "john@doe.com"
     },
     "paymentSubtotals": {
        "BTC": 18000,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentTotals": {
        "BTC": 29600,
        "BCH": 739100,
        "ETH": 2505000000000000,
        "GUSD": 1000,
        "PAX": 10000000000000000000,
        "BUSD": 10000000000000000000,
        "USDC": 10000000,
        "XRP": 7015685,
        "DOGE": 1998865000,
        "DAI": 9990000000000000000,
        "WBTC": 18000
     },
     "paymentDisplayTotals": {
        "BTC": "0.000296",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "paymentDisplaySubTotals": {
        "BTC": "0.000180",
        "BCH": "0.007391",
        "ETH": "0.002505",
        "GUSD": "10.00",
        "PAX": "10.00",
        "BUSD": "10.00",
        "USDC": "10.00",
        "XRP": "7.015685",
        "DOGE": "19.988650",
        "DAI": "9.99",
        "WBTC": "0.000180"
     },
     "exchangeRates": {
        "BTC": {
          "USD": 55413.609335,
          "EUR": 45540.39841,
          "BCH": 40.84109737914668,
          "ETH": 13.870219975470258,
          "GUSD": 55413.609335,
          "PAX": 55413.609335,
          "BUSD": 55413.609335,
          "USDC": 55413.609335,
          "XRP": 38758.09372049268,
          "DOGE": 110606.00665668662,
          "DAI": 55359.96552840298,
          "WBTC": 0.9981333606461704
        },
        "BCH": {
          "USD": 1352.90925,
          "EUR": 1111.2150000000001,
          "BTC": 0.02440102556111244,
          "ETH": 0.33863791096704754,
          "GUSD": 1352.90925,
          "PAX": 1352.90925,
          "BUSD": 1352.90925,
          "USDC": 1352.90925,
          "XRP": 946.2690507998013,
          "DOGE": 2700.4176646706587,
          "DAI": 1351.599550036015,
          "WBTC": 0.024369173431532262
        },
        "ETH": {
          "USD": 3992.672665000001,
          "EUR": 3278.9696950000002,
          "BTC": 0.0720117094001833,
          "BCH": 2.9426910658087726,
          "GUSD": 3992.672665000001,
          "PAX": 3992.672665000001,
          "BUSD": 3992.672665000001,
          "USDC": 3992.672665000001,
          "XRP": 2792.6060619837313,
          "DOGE": 7969.406516966069,
          "DAI": 3988.807510522304,
          "WBTC": 0.07191770817497412
        },
        "GUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "PAX": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "PAX": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "BUSD": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "BUSD": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "USDC": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "USDC": {
          "USD": 1,
          "EUR": 0.821674,
          "BTC": 0.000018035966241721267,
          "BCH": 0.0007370228698196506,
          "ETH": 0.0002503034929852446,
          "GUSD": 1,
          "PAX": 1,
          "BUSD": 1,
          "XRP": 0.6994327600316144,
          "DOGE": 1.9960079840319362,
          "DAI": 0.9990319380520276,
          "WBTC": 0.000018012422807762058
        },
        "XRP": {
          "USD": 1.4253776249999999,
          "EUR": 1.17088545,
          "BTC": 0.00002570806272620483,
          "BCH": 0.0010505359077542177,
          "ETH": 0.0003567769983605121,
          "GUSD": 1.4253776249999999,
          "PAX": 1.4253776249999999,
          "BUSD": 1.4253776249999999,
          "USDC": 1.4253776249999999,
          "DOGE": 2.845065119760479,
          "DAI": 1.423997771159746,
          "WBTC": 0.00002567450444222371
        },
        "DOGE": {
          "USD": 0.5002839,
          "EUR": 0.4110702732486,
          "BTC": 0.000009023103531676658,
          "BCH": 0.0003687206757025671,
          "ETH": 0.00012522280765428083,
          "GUSD": 0.5002839,
          "PAX": 0.5002839,
          "BUSD": 0.5002839,
          "USDC": 0.5002839,
          "XRP": 0.3499149489763802,
          "DAI": 0.49979959419322684,
          "WBTC": 0.000009011325130716152
        },
        "DAI": {
          "USD": 1.000968,
          "EUR": 0.822469380432,
          "BTC": 0.000018053425057043255,
          "BCH": 0.0007377363079576361,
          "ETH": 0.00025054578676645436,
          "GUSD": 1.000968,
          "PAX": 1.000968,
          "BUSD": 1.000968,
          "USDC": 1.000968,
          "XRP": 0.7001098109433249,
          "DOGE": 1.9979401197604791,
          "WBTC": 0.000018029858833039973
        },
        "WBTC": {
          "USD": 55466.58,
          "EUR": 45575.44665492,
          "BTC": 1.000393364423732,
          "BCH": 40.88013797068123,
          "ETH": 13.883478717945511,
          "GUSD": 55466.58,
          "PAX": 55466.58,
          "BUSD": 55466.58,
          "USDC": 55466.58,
          "XRP": 38795.14313891434,
          "DOGE"