Appery.io

The Appery.io Developer Hub

Welcome to the Apperyio developer hub. You'll find comprehensive guides and documentation to help you start working with apperyio as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides    Latest Updates

BitPay Sample App

Sample app that uses BitPay Cordova SDK.

This sample app demonstrates how to add secure Bitcoin payments to your Appery.io mobile app with the BitPay Cordova SDK.

Bitcoin Wallet

As a customer making purchases with BitPay App you’ll need a Bitcoin wallet installed on your phone. Bitcoin wallet is an app that lets you receive, hold, and spend bitcoins.

A list of Bitcoin wallets is maintained by BitPay. If you choose the BitPay Wallet app from this list, you’ll be able to create a Testnet wallet in it. Testnet wallets are a handy way to test Bitcoin purchases.

There should exist 2 Bitcoin wallets for the purchase to take a place, one for the customer and one for the merchant. You can create them within your BitPay Wallet and name the first one as Customer Test Wallet and the second one as Merchant Test Wallet. Be sure to set the Testnet option ON in "Additional options".

BitPay Account

To use the BitPay API you will need to sign up for an account. In this tutorial, we will use https://test.bitpay.com to create a merchant account on a BitPay test server. To make real payments, you will need to sign up for an account at https://bitpay.com.

  1. Go to https://test.bitpay.com.

  2. Click Sign Up, select Business Account, and then click the Sign Up button.

  3. Provide an Organization name that will be listed in your invoices and fill in the other fields before clicking Create Account.

  4. Click the link in the verification email sent to you and log in.

  5. Click Get Verified, fill in the form, and then click Verify.

  6. Click Add a Bank Account and provide the address of your Merchant Test Wallet. There are many ways to create a Testnet wallet.
    This Bitcoin wallet will be used by merchants to receive payments. You should also provide your Bank Account details to complete the BitPay Settlement. Any testing data can be provided here; test merchant account applications are automatically accepted in BitPay’s test environment.

  7. Click the Start accepting Bitcoin button.

Now, your test BitPay Account is ready.

Create the App

In this step, you are going to import a plug-in to make the app (client).

  1. From the App page, select Create new app. Enter "BitPayApp" for the app name.

  2. Select Ionic as the app type with a Blank template.

  3. Click the Create button.

  4. When the App Builder loads, select From Plugin in the Create new dropdown.

  5. Check BitPay App plug-in and press the Import selected plug-ins button.

  6. In the popup dialog that appears, set the start page to BitPay_Home and confirm.

BitPay Cordova Plug-in

Go to https://github.com/bitpay/cordova-sdk and save this repository as a ZIP file.

Next, upload the BitPay Cordova plug-in to Appery.io:

  1. From the platform main dashboard (not the App Builder), go to Resources > Cordova Plugins.

  2. Click Import Cordova plugin.

  3. Click Choose file and upload the plug-in file you had downloaded.

  4. Click Import plugin.

The plug-in will appear under Cordova plugins.

Next, enable the BitPay Cordova plug-in in your app:

  1. Inside an app, go to Project > App settings > Cordova plugins > Imported Cordova plugins.

  2. To enable the plug-in for the current app, check the box for the BitPay SDK.

More info about adding Cordova plugins into Appery.io can be found

BitPay API Token

  1. Go to https://test.bitpay.com/api-tokens
    (or Payment Tools > Integration Resources > Manage API Tokens in your BitPay Account).

  2. Click the Add New Token button and generate a token with the Point-of-Sale capability without client authentication.

  3. Inside an app, go to Services > BitPay_Settings and set bitpay_token to the provided value.

Add Certificate

For Android, add the distribution certificate on the Project > App settings > Android binary page; for iOS add the distribution certificate on the Project > App settings > iOS binary page.

Certificate management in Appery.io is described further :

Running the App

That’s all you need to do. You can now export your app as an .apk or .ipa file and install it on your device.

Select the amount of bitcoins you want to pay and click the Make payment button. You will be redirected to the BitPay_Invoice_Details page where the status of your invoice can be checked. Click the Open wallet button.

The Bitcoin wallet then opens, so you can transfer the requested funds. You can also switch back to your app, where you can see information about the status of your payment on the BitPay_Invoice_Details page.

Settlement payments from BitPay to merchant’s Bitcoin wallet are made automatically, every business day.

BitPay Sample App


Sample app that uses BitPay Cordova SDK.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.