You will require 4 things from the TBC Bank - 1) .pfx certificate, 2) Username, 3) Password and 4) certificate_password
Service Documentation by the TBC Bank is here - https://developers.tbcbank.ge/docs/dbi-overview
dotnet add package AppifySheets.TBC.IntegrationService.Client- Import Single Payment Orders - Execute various types of payment transfers
- Get Account Movements - Retrieve account transaction history
- Get Payment Order Status - Check status of submitted payment orders
- Change Password - Change API user password
// Create API credentials with validation
var credentialsResult = TBCApiCredentials.Create("Username", "Password");
if (credentialsResult.IsFailure)
return credentialsResult.Error;
// Add certificate authentication
var credentialsWithCertResult = TBCApiCredentialsWithCertificate.Create(
credentialsResult.Value,
"TBCIntegrationService.pfx",
"certificate_password");
// Create SOAP caller
var soapCallerResult = TBCSoapCaller.Create(credentialsWithCertResult.Value);
var tbcSoapCaller = soapCallerResult.Value;
// Create bank accounts
var ownAccountGEL = BankAccount.Create("GE00TB0000000000000001", "GEL").Value;
var ownAccountUSD = BankAccount.Create("GE00TB0000000000000002", "USD").Value;
// Or create components separately
var ibanResult = Iban.Create("GE00TB0000000000000001");
var accountResult = BankAccount.Create(ibanResult.Value, Currency.GEL);
if (accountResult.IsFailure)
return accountResult.Error;Get Account Movements
// Get account movements for a specific period
var accountMovements = await GetAccountMovementsHelper.GetAccountMovement(
new Period(new DateTime(2023, 9, 1), new DateTime(2023, 9, 26)),
tbcSoapCaller);
// The helper method handles pagination automatically
// Returns all movements within the specified periodGet Payment Order Status
// Check status of a specific payment order by its ID
var paymentOrderId = 1632027071; // The ID returned when creating a payment order
var checkStatus = await tbcSoapCaller.GetDeserialized(
new GetPaymentOrderStatusRequestIo(paymentOrderId));
// Returns status information including:
// - Current status (pending, completed, rejected, etc.)
// - Processing details
// - Error messages if anyChange Password
// Change API user password (requires digipass code)
var newPassword = "NewSecurePassword123!";
var digipassCode = "123456"; // One-time code from your digipass device
var passwordChangeResult = await tbcSoapCaller.GetDeserialized(
new ChangePasswordRequestIo(newPassword, digipassCode));
// Note: After successful password change, update your credentials// Common parameters for all transfer types
var bankTransferCommonDetails = new BankTransferCommonDetails
{
DocumentNumber = 123,
Amount = 0.01m,
BeneficiaryName = "TEST",
SenderAccountWithCurrency = ownAccountGEL,
Description = "TEST"
};Internal Transfers (Within TBC Bank)
var withinBankGel = await tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo(
new TransferWithinBankPaymentOrderIo
{
RecipientAccountWithCurrency = BankAccount.Create("GE00TB0000000000000003", "GEL").Value,
BankTransferCommonDetails = bankTransferCommonDetails
}));var withinBankCurrency = await tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo(
new TransferWithinBankPaymentOrderIo
{
BankTransferCommonDetails = bankTransferCommonDetails with
{
SenderAccountWithCurrency = ownAccountUSD
},
RecipientAccountWithCurrency = BankAccount.Create("GE00TB0000000000000004", "USD").Value,
}));External Transfers (To Other Banks)
var toAnotherBankGel = await tbcSoapCaller.GetDeserialized(
new ImportSinglePaymentOrdersRequestIo(
new TransferToOtherBankNationalCurrencyPaymentOrderIo(
BankAccount.Create("GE00BG0000000000000001", "GEL").Value,
"123456789") // Beneficiary tax code
{
BankTransferCommonDetails = bankTransferCommonDetails
}));var toAnotherBankCurrency = await tbcSoapCaller.GetDeserialized(
new ImportSinglePaymentOrdersRequestIo(
new TransferToOtherBankForeignCurrencyPaymentOrderIo(
"Beneficiary Bank Name",
"BANKSWIFT", // Bank SWIFT/BIC code
"SHA", // Charge type: SHA (shared), OUR (sender pays), BEN (beneficiary pays)
"Payment Reference",
BankAccount.Create("GE00BG0000000000000002", "USD").Value)
{
BankTransferCommonDetails = bankTransferCommonDetails with
{
SenderAccountWithCurrency = ownAccountUSD
}
}));var toChina = await tbcSoapCaller.GetDeserialized(
new ImportSinglePaymentOrdersRequestIo(
new TransferToOtherBankForeignCurrencyPaymentOrderIo(
"China",
"ICBKCNBJSZN", // Bank SWIFT code
"INDUSTRIAL AND COMMERCIAL BANK OF CHINA SHENZHEN BRANCH", // Bank name
"SHA", // Charge type
BankAccount.Create("CN0000000000000000001", "USD").Value)
{
BankTransferCommonDetails = bankTransferCommonDetails with
{
SenderAccountWithCurrency = ownAccountUSD,
BeneficiaryName = "Shenzhen Example Company Ltd"
}
}));Treasury Transfers
// Transfer to Georgian Treasury
var toTreasury = await tbcSoapCaller.GetDeserialized(
new ImportSinglePaymentOrdersRequestIo(
new TreasuryTransferPaymentOrderIo(101001000) // Treasury code
{
BankTransferCommonDetails = bankTransferCommonDetails
}));All operations return a Result<T> type from CSharpFunctionalExtensions:
var result = await tbcSoapCaller.GetDeserialized(request);
if (result.IsSuccess)
{
var response = result.Value;
// Process successful response
}
else
{
var error = result.Error;
// Handle error
Console.WriteLine($"Operation failed: {error}");
}- All monetary amounts are in decimal format
- IBAN accounts must be valid Georgian IBANs (starting with GE)
- Document numbers must be unique per day
- Digipass codes are required for sensitive operations like password changes
- Certificate authentication is mandatory for all API calls