C# Lite SDK (Retired)

BitPay .NET light client

This SDK provides a convenient abstraction of BitPay's cryptographically-secure API and allows payment gateway developers to focus on payment flow/e-commerce integration rather than on the specific details of client-server interaction using the API. This SDK optionally provides the flexibility for developers to have control over important details, including the handling of private tokens needed for client-server communication.

Dependencies

You must have a BitPay merchant account to use this SDK. It's free to sign-up for a BitPay merchant account.

This library implements .NET Standard which is supported on MS Frameworks 4.6.1 and higher and .NET Core 2 and higher.

Usage

Getting your client token

First of all, you need to generate a new POS token on your BitPay's account which will be required to securely connect to the BitPay's API.
For testing purposes use:
https://test.bitpay.com/dashboard/merchant/api-tokens

For production use:
https://bitpay.com/dashboard/merchant/api-tokens

Click on 'Add New Token', give a name on the Token Label input, leave the 'Require Authentication' checkbox unchecked and click on 'Add Token'.
The new token will appear and ready to use.

Getting Started

Initializing your BitPay light client

Once you have the token, you can initialize the client for the desired environment:

// Testing
using BitPayLight;

BitPay bitpay = new BitPay(token: "H78Yiu78uh78Gjht6g67gjh6767ghj", environment: Env.Test);
// Production [The environment is selected by default]
using BitPayLight;

BitPay bitpay = new BitPay(token: "uh78Gjht6g67gjH78Yiu78h6767ghj");