Skip to content

fabiomaistro/checkout-net-library

 
 

Repository files navigation

Checkout.com

Checkout .NET Standard Library

Build Status NuGet

Checkout.com is a software platform that has integrated 100% of the value chain to create payment infrastructures that truly make a difference.


Target Frameworks

The library targets the following frameworks:

  • .NET Standard 1.3 or higher (that includes .NET Core)
  • .NET Framework 4.5

Installation

In order to use the Checkout.com .NET Standard Library you have two installation options:

  1. Either install the library through NuGet by searching for the NuGet package name Checkout.ApiClient and installing it;
  2. Or download the source code from our master branch on GitHub and reference it in your solution.

Initial Setup

Pre Requirements

  • PCI Logo It is a requirement that all Checkout.com merchants validate their PCI DSS (Payment Card Industry Data Security Standard) compliance annually. Details about your required level of compliance depend on the Checkout.com solution you want to use. Read on in our Docs for the details. The PCI Security Standard Council maintains, evolves and promotes the PCI DSS.
  • Before using the Checkout.ApiClient SDK, you require your Secret Key that you can get here from your Merchant Account a.k.a The Hub;

    If you do not have access to The Hub yet, simply go to https://checkout.com and click the "Get Sandbox" button to create a Sandbox Account.

  • You have the Checkout.ApiClient SDK installed either from NuGet or from our master branch on GitHub and you have referenced it in your project.

Adding the SDK to your Solution

Add the library namespace Checkout to your solution like this:

using Checkout;

If you get class name conflicts please add a namespace alias as shown below:

using CheckoutEnvironment = Checkout.Helpers.Environment;

Configuration

Once you are done with the Initial Setup, you are only a few lines of code away from tapping into the power of Checkout.com.

  1. Create a CheckoutConfiguration object with your Secret Key obtained from The Hub
  2. Initialize the ApiClient by passing it the CheckoutConfiguration object

Initialize the ApiClient


Here's the code for the demo from above:

// Adding the Checkout namespace
using Checkout;

namespace Tests
{
	public class BaseServiceTests
	{
		protected ApiClient CheckoutClient;

		public void Init()
		{
			// Creating an instance of CheckoutConfiguration with configurations for Sandbox
			CheckoutConfiguration configuration = new CheckoutConfiguration()
			{
				SecretKey = "sk_test_{your_secret_key}",
				DebugMode = true
			};
			// Initializing the ApiClient using the Sandbox configuration
			CheckoutClient = new ApiClient(configuration);
		}
	}
}

Congratulations for installing and configuring the Checkout .NET Standard Library! 🎉
From here on you may explore all Services and their Methods in our Wiki.


How to use the SDK

After initializing the ApiClient, you can make any API Calls by simply writing {ApiClient_instance}.{Service}.{Method}.

e.g.:

...
// Making an API Call to find details about the bank with Bank Identification Number (BIN) 465945
string bin = "465945";
var response = CheckoutClient.LookupService.GetBinLookup(bin);
...

The full example is available on our How to use the SDK Wiki entry.


Going Live

Once you are set with your integration on Sandbox you are ready to switch it to Live.

  1. Contact your Account Manager to kick-off the switch from Sandbox to Live.
    • If you are not already in contact with an Account Manager, you may contact our Sales Team.
  2. Provide the necessary Documentation for your onboarding. That includes the PCI SAQ (Payment Card Industry Self-Assessment Questionnaire).
  3. You will be provided with access to The Hub where you can find your Live Secret Key. Place this Live Secret Key in your solution and you are ready to go live!

    Remember to ensure that DebugMode is no longer set to true when going live.


Reference

You can find our complete Documentation here.

Useful URIs


If you would like to get an account manager, please contact us at sales@checkout.com
For help during the integration process you can contact us at integration@checkout.com
For support, you can contact us at support@checkout.com

Checkout.com is authorised and regulated as a Payment institution by the UK Financial Conduct Authority.

About

Checkout.com API .NET Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%