The Android SDK allows you to accept Crypto payments from your Java Android app using the PayByte REST API. The SDK has been designed to act as a wrapper for all the main PayByte functionalities, allowing the developers to focus on the actual purchasing flow rather than on the API's implementation details.
PayBytepaybyte=newPayByte(true);Paymentpayment=newPayment();payment.setAmount(0.0332f);payment.setCoin("BTC");payment.setMerchantApiKey("[insert your API Key]");varpaymentResponse=payByte.createPayment(payment);The paymentResponse will contain the JSONObject representation of the payment response.
Simply provide the payment identifier to retrieve all data related to a transaction.
varpayByte=newPayByte(true);varpaymentId="cf565888-28f5-430e-85af-b34b945ce20f";JSONObjectpaymentStatus=payByte.GetPayment(paymentId);The SDK will return a JSONObject representation of the transaction data.
Get the exchange rates of all supported crypto currencies against the provided fiat currency code.
varpayByte=newPayByte(true);varrates=payByte.getRate("GBP");The SDK will return a JSONObject representation of exchange rate data against GBP fiat.
In order to use PayByte Android SDK, you will need to create a Merchant account on PayByte and get an API KEY. Just go to https://paybyte.io to register as a merchant and get your API KEY.
PayByte is released under the MIT License. Please refer to the License file that accompanies this project for more information including complete terms and conditions.
