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:

  • label (e.g. My BitPay Client)
  • id (e.g. TfALHhgU5duM4PAtFWgNqNgYZkLhfwnf2Tj)
  • facade (e.g. merchant)

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:

  • label (e.g. My BitPay Client)
  • id (e.g. TfALHhgU5duM4PAtFWgNqNgYZkLhfwnf2Tj)
  • pairingCode (e.g. As retrieved from My Account -> API Tokens)

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.

📘

Note

It is also important to note that pairing codes will expire after 24 hours, however once a token is approved or claimed the expiration is cleared.

Getting Access to Test.BitPay.com

To access the BitPay test environment, you'll need to sign up for a BitPay test account at test.bitpay.com. You will not be required to enter real business information just be sure to enter a username and password you'll remember. The test environment allows you to simulate payments and test your integration without risking real money.

Obtaining Test Cryptocurrency and Testing Your Integration

To test your integration with BitPay, you'll need to obtain test cryptocurrency in a BitPay or Metamask wallet. Instructions can be found in the BitPay Testing Guide. The guide provides detailed instructions for setting up your test environment, testing your integration, ensuring that your application or website is ready to accept payments, and details supported and unsupported features of the test environment.