starkbank 0.0.2

There is a newer version of this package available.
See the version list below for details.
Install-Package starkbank -Version 0.0.2
dotnet add package starkbank --version 0.0.2
<PackageReference Include="starkbank" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add starkbank --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: starkbank, 0.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install starkbank as a Cake Addin
#addin nuget:?package=starkbank&version=0.0.2

// Install starkbank as a Cake Tool
#tool nuget:?package=starkbank&version=0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Stark Bank .NET SDK Beta

Welcome to the Stark Bank .NET SDK! This tool is made for .NET developers who want to easily integrate with our API. This SDK version is compatible with the Stark Bank API v2.

If you have no idea what Stark Bank is, check out our website and discover a world where receiving or making payments is as easy as sending a text message to your client!

Supported .NET Versions

This library supports the following .NET versions:

  • .NET Standard 2.1+

Stark Bank API documentation

If you want to take a look at our API, follow this link.


This project adheres to the following versioning pattern:

Given a version number MAJOR.MINOR.PATCH, increment:

  • MAJOR version when the API version is incremented. This may include backwards incompatible changes;
  • MINOR version when breaking changes are introduced OR new functionalities are added in a backwards compatible manner;
  • PATCH version when backwards compatible bug fixes are implemented.


1. Install our SDK

StarkBank`s .NET SDK is available on NuGet as starkbank 0.0.2.

1.1 To install the Package Manager:

Install-Package starkbank -Version 0.0.2

1.2 To install the .NET CLI:

dotnet add package starkbank --version 0.0.2

1.3 To install by PackageReference:

<PackageReference Include="starkbank" Version="0.0.2" />

1.4 To install with Paket CLI:

paket add starkbank --version 0.0.2

2. Create your Private and Public Keys

We use ECDSA. That means you need to generate a secp256k1 private key to sign your requests to our API, and register your public key with us so we can validate those requests.

You can use one of following methods:

2.1. Check out the options in our tutorial.

2.2. Use our SDK:

(string privateKey, string publicKey) = StarkBank.Key.Create();

# or, to also save .pem files in a specific path
(string privateKey, string publicKey) = StarkBank.Key.Create("file/keys");

NOTE: When you are creating a new Project, it is recommended that you create the keys inside the infrastructure that will use it, in order to avoid risky internet transmissions of your private-key. Then you can export the public-key alone to the computer where it will be used in the new Project creation.

3. Create a Project

You need a project for direct API integrations. To create one in Sandbox:

3.1. Log into Starkbank Sandbox

3.2. Go to Menu > Usuários (Users) > Projetos (Projects)

3.3. Create a Project: Give it a name and upload the public key you created in section 2.

3.4. After creating the Project, get its Project ID

3.5. Use the Project ID and private key to create the object below:

// Get your private key from an environment variable or an encrypted database.
// This is only an example of a private key content. You should use your own key.
string privateKeyContent = "-----BEGIN EC PARAMETERS-----\nBgUrgQQACg==\n-----END EC PARAMETERS-----\n-----BEGIN EC PRIVATE KEY-----\nMHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK\noUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1\nIF16ZoTVt1FzZ8WkYQ3XomRD4HS13A==\n-----END EC PRIVATE KEY-----"

StarkBank.Project project = new StarkBank.Project(
    environment: "sandbox",
    id: "5656565656565656",
    privateKey: privateKeyContent

NOTE 1: Never hard-code your private key. Get it from an environment variable or an encrypted database.

NOTE 2: We support 'sandbox' and 'production' as environments.

NOTE 3: The project you created in sandbox does not exist in production and vice versa.

4. Setting up the user

There are two kinds of users that can access our API: Project and Member.

  • Member is the one you use when you log into our webpage with your e-mail.
  • Project is designed for integrations and is the one meant for our SDK.

There are two ways to inform the user to the SDK:

4.1 Passing the user as argument in all functions:

StarkBank.Balance balance = StarkBank.Balance.Get(user: project);

4.2 Set it as a default user in the SDK:

StarkBank.User.Default = project;

StarkBank.Balance balance = StarkBank.Balance.Get();

Just select the way of passing the project user that is more convenient to you. On all following examples we will assume a default user has been set.

Testing in Sandbox

Your initial balance is zero. For many operations in Stark Bank, you"ll need funds in your account, which can be added to your balance by creating a Boleto.

In the Sandbox environment, 90% of the created Boletos will be automatically paid, so there"s nothing else you need to do to add funds to your account. Just create a few and wait around a bit.

In Production, you (or one of your clients) will need to actually pay this Boleto for the value to be credited to your account.

To see the full README, check out our GitHub page.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.6.0 136 9/4/2021
2.5.0 182 7/27/2021
2.4.0 248 1/21/2021
2.3.0 129 1/16/2021
2.2.4 133 12/29/2020
2.2.3 503 11/18/2020
2.2.2 253 11/17/2020
2.2.1 119 11/17/2020
2.2.0 126 11/16/2020
2.2.0-beta 164 11/11/2020
2.1.0 193 10/28/2020
2.0.0 154 10/20/2020
0.10.3-beta 133 9/10/2020
0.10.2-beta 174 9/7/2020
0.10.1-beta 295 8/15/2020
0.10.0-beta 238 8/12/2020
0.9.0 307 8/12/2020
0.8.0 210 6/5/2020
0.7.0 176 5/27/2020
0.6.0 169 5/13/2020
0.5.1 166 5/12/2020
0.5.0 166 5/12/2020
0.4.0 182 5/5/2020
0.3.1 191 4/29/2020
0.3.0 180 4/29/2020
0.2.0 191 4/18/2020
0.1.0 184 4/17/2020
0.0.3 189 4/17/2020
0.0.2 182 4/16/2020
0.0.1 175 4/15/2020