Simple.Bullring
0.7.1
dotnet add package Simple.Bullring --version 0.7.1
NuGet\Install-Package Simple.Bullring -Version 0.7.1
<PackageReference Include="Simple.Bullring" Version="0.7.1" />
<PackageVersion Include="Simple.Bullring" Version="0.7.1" />
<PackageReference Include="Simple.Bullring" />
paket add Simple.Bullring --version 0.7.1
#r "nuget: Simple.Bullring, 0.7.1"
#:package Simple.Bullring@0.7.1
#addin nuget:?package=Simple.Bullring&version=0.7.1
#tool nuget:?package=Simple.Bullring&version=0.7.1
Simple.BullringAPI
A simple C# client library for interacting with the Bullring Finance API, enabling developers to manage subaccounts, payments, withdrawals, bank verifications, and more.
Official Documentation: https://docs.bullring.finance/en/introduction
Getting Started
- You must have an active account with BullRing Finance
- Familiarize yourself with BullRing Finance official documentation
- Ensure you have a valid Bullring Finance API key for production or staging environments.
Installation
NuGet link:
PM> NuGet\Install-Package Simple.Bullring
Initializing the Client
Create a BullringClient
instance for either production or staging environments using your API key.
using Simple.Bullring;
// Production environment
var client = new BullringClient("your-production-api-key");
// Staging environment
var stagingClient = BullringClient.FromStagingEnviroment("your-staging-api-key");
Key Features
Below are examples demonstrating common operations with the BullringClient class.
1. Retrieve All Subaccounts
Fetch a paginated list of all subaccounts associated with the authenticated merchant.
var subaccounts = await client.SubAccount_GetAllMerchants();
foreach (var merchant in subaccounts.Data)
{
Console.WriteLine($"Merchant ID: {merchant.Id}, Name: {merchant.Name}");
}
2. Get Subaccount Details
Retrieve details for a specific subaccount using its UUID.
var subaccountId = Guid.Parse("123e4567-e89b-12d3-a456-426614174000");
var merchant = await client.SubAccount_GetMerchant(subaccountId);
Console.WriteLine($"Subaccount Name: {merchant.Name}, Status: {merchant.Status}");
3. Get KYB Verification URL
Obtain a KYB verification URL for a subaccount to share with them.
var subaccountId = Guid.Parse("123e4567-e89b-12d3-a456-426614174000");
var kybUrl = await client.Verification_GetKybUrl(subaccountId);
Console.WriteLine($"KYB URL: {kybUrl.Url}");
4. Verify and Add a Pix Key
Verify a Pix key and add it to a subaccount�s bank details.
var subaccountId = Guid.Parse("123e4567-e89b-12d3-a456-426614174000");
var pixKey = "667.136.083-96" // documentation example
// Verify Pix key
var verificationResult = await client.Bank_VerifyPixKey(subaccountId, pixKey);
Console.WriteLine($"Pix Key Verified: {verificationResult.IsValid}");
// Add verified Pix key
await client.Bank_AddPixKey(subaccountId, pixKey);
Console.WriteLine("Pix Key added successfully.");
5. Retrieve All Payments
Fetch all payments for a specific subaccount.
var subaccountId = Guid.Parse("123e4567-e89b-12d3-a456-426614174000");
var payments = await client.Payments_GetAllPayments(subaccountId);
foreach (var payment in payments)
{
Console.WriteLine($"Payment ID: {payment.Id}, Amount: {payment.Amount}");
}
6. Retrieve Withdrawal Details
Get details for a specific withdrawal request.
var subaccountId = Guid.Parse("123e4567-e89b-12d3-a456-426614174000");
var withdrawalId = Guid.Parse("987fcdeb-1234-5678-9012-426614174000");
var withdrawal = await client.Withdrawals_GetWithdrawal(subaccountId, withdrawalId);
Console.WriteLine($"Withdrawal ID: {withdrawal.Id}, Status: {withdrawal.Status}");
Error Handling
All methods throw exceptions if the API request fails. Use try-catch blocks to handle errors gracefully.
try
{
var subaccounts = await client.SubAccount_GetAllMerchants();
// Process subaccounts
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
API Compliance: 9/15
Current API Compliance state
Sub Account:
- Get all merchants
- Create merchant
- Get one merchant by ID
Verification:
- Get KYB url
Bank:
- Verify Pix Key
- Add Pix Key
Payments:
- Get all payments
- Create payment
- Get one payment by ID
Withdrawals:
- Get all withdrawals
- Initiate withdrawal
- Get one withdrawal by ID
- Set daily withdrawal schedule
Webhook:
- Add Webhook
- Delete Webhook
Contributing
Contributions are welcome! Please submit issues or pull requests to the repository
License
This library is licensed under the MIT License. See the LICENSE file for details
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Simple.API (>= 1.9.3)
-
net8.0
- Simple.API (>= 1.9.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See project page at
https://github.com/RafaelEstevamReis/Simple.BullringAPI