Introducing the BitPay Test Environment

Today, we're making it easier than ever to get started with the BitPay API with the introduction of the BitPay test environment. The BitPay test environment is a scalable, production-like environment that exactly mirrors our world-class payment-processing platform.


The software development organization of an enterprise is responsible for the requirements, architecture, design, implementation, and testing of software systems. While there have been many processes, methodologies, and practices that have been made popular for running the business of software development (e.g., waterfall, iterative, lean, agile) none have adequately addressed the key elements of risk associated with the deployment and use of software systems. This often results in incompatibilities between software systems implementation and business processes where the human-computer interface demands a high degree of efficiency and effectiveness. The solution is to implement a DevOps strategy.

DevOps is the contraction of Development and Operations and refers to an enterprise capability for continuous software delivery where rapid stakeholder feedback is used to balance speed, quality, cost, and risk for the deployment of software systems. One of the key attributes supporting an effective DevOps strategy is the presence of a release process that includes a continuous delivery pipeline. The most effective continuous delivery pipelines employ production like characteristics at the earliest possible stage, allowing for few to no architecture or configuration changes being made prior to deployment in the final production environment. BitPay has developed a simple and easy to use environment architecture that meets the demands of enterprise organizations needing to achieve flow through a continuous delivery pipeline and also providing smaller businesses the ideal test environment for validating their implementation.

The BitPay Test Environment

The BitPay test server environment is a scalable, production-like environment that exactly mirrors our world-class payment-processing platform. Our test server environment runs BitPay production software on hardware with the same specifications as those used in production. The most notable difference between the BitPay test environment and production environment is the use of the Bitcoin testnet block chain in the test server environment. Using the Bitcoin testnet block chain provides early pipeline stage environments maximum flexibility for experimentation, innovation, and validation.

The following diagram illustrates an example of a continuous delivery pipeline using the BitPay test and production environments. In this example each of the environments preceding the Production environment make use of the BitPay test environment, each using its own BitPay merchant account. This arrangement of using different BitPay merchant accounts for each environment provides for isolation of the account settings (e.g., settlement settings) and ledger data between environments allowing for configuration management and control of each environment. Notice that only the production environment requires use of the BitPay production server.

Using the BitPay test environment for small-scale development efforts is illustrated below. In this example a single test environment merchant account is used for development and testing.

The reconfiguration of a software system implementation between the BitPay test and production environments is straightforward and should not require any source code changes. The following configuration settings specify the target environment.

| Setting | Test Environment | Production Environment | | -------------- |-------------| -----| | Server URL | https://test.bitpay.com | https://bitpay.com | | API Key | Must be created using a test environment merchant account. | Must be created using a production environment merchant account. |

Test Server Capabilities

Prior to the availability of the BitPay test environment all development and test activities had to be conducted using the BitPay production server. While this generally works well it does have some limitations and constraints that may not be suitable in all cases. For instance, processing test transactions on the production server with settlement options set to deposit USD to a bank account presents developers the challenge of obtaining access to company bank deposit account and routing information. Furthermore, coordination of testing settlement deposits would likely involve coordination with stakeholders from the business finance group. While this scenario may require full business process testing (including live deposits) at later stages in the pipeline, it is likely not required during early developer testing where ledger reconciliation testing is prioritized over live deposit testing.

The following table identifies specific capabilities of the BitPay platform and how the test and production environments handle each of these capabilities.

| Capability | Test Environment | Production Environment | | ------------- | ------------------- | ------------------- | | Block chain | Testnet block chain | Bitcoin block chain | | Onboarding | Account approved and created immediately; the BitPay KYC compliance process is not engaged in the approving of merchant accounts.| The account application is validated through the BitPay KYC compliance process. Accounts are only created if the application is determined to meet BitPay KYC compliance requirements.| | API Keys | API keys provide access to only the test server API. | API keys provide access to only the production server API. | | Pricing | The selected plan affects the ledger exactly as with the production environment. | The selected plan is applied to the ledger. | | Settlement |

  • Testnet bitcoin - Settled each day at 10:22 GMT. Testnet bitcoins are sent to the testnet wallet address specified in the account.
  • Fiat currencies - A simulated settlement is performed each business day at 10:22 GMT. The BitPay test server simulates settlement of qualifying ledger amounts. Each bank or wire transfer settlement is simulated by sending an email to the merchant account email address. The email identifies the exact amount of settlement.
|
  • bitcoin - Settled each day at 10:22 GMT. Bitcoins are sent to the Bitcoin wallet address specified in the account.
  • Fiat currencies - Settlement is performed each business day beginning at 10:22 GMT. The bank account and routing information is used to deposit the exact amount.
| | Refund Processing | The BitPay Client Operations team does not provide refund processing or other ledger adjustment operations. | The BitPay Client Operations team responds to all merchant requests. |


The BitPay test server exposes all of the features of the BitPay payment processing platform including:

  • Merchant payment processing
    • Bitcoin Payment Gateway API interaction
    • Billing
    • Mobile checkout
    • Hosted checkout
    • Catalog items
    • Donations
  • Payroll payment processing
    • Bitcoin Payroll API interaction1

Using the BitPay Test Server

The BitPay test server is open and available for anyone to use. Simply submit an application at https://test.bitpay.com/start to have your merchant account instantly approved and available for use.

Since the BitPay test server is processing transactions exclusively on the Bitcoin testnet you must have a wallet configured for testnet including a few testnet bitcoins with which to pay test transactions. For testing, the Bitcoin Core software wallet is an excellent choice. You can download Bitcoin Core from https://bitcoin.org/en/choose-your-wallet. After you have installed the Bitcoin Core wallet it must be configured to use the Bitcoin testnet block chain. Follow these steps to configure the Bitcoin Core wallet for testnet.

  1. Create a Bitcoin.conf file
  2. Set the testnet configuration variable; “testnet=1”
  3. Start Bitcoin Core
  4. Generate a Bitcoin testnet receive address
  5. Send yourself testnet bitcoins to use for paying test transactions

See https://en.bitcoin.it/wiki/Running_Bitcoin for detailed instructions for creating the Bitcoin.conf file (use the sample configuration file provided on the page).

Bitcoin testnet bitcoins are available from a number of testnet faucets including http://faucet.xeno-genesis.com/ and https://tpfaucet.appspot.com/.


1Please contact BitPay to enable your test server account for payroll API interaction.

Get the latest updates to your inbox