Java SDK Introduction
Welcome to the Retorna SDK for Java. This SDK allows you to easily and securely integrate Retorna's B2B services into your Java applications.
What is the Retorna SDK?
The Retorna SDK is a library that enables businesses to make payments, collections, transaction queries, reconciliations, order creation, and financial flow automation through a unified and easy-to-use interface.
Key Features
- ✅ Automatic Authentication: The SDK automatically handles OAuth2 authentication and token renewal
- ✅ Digital Signatures: Full support for RSA signatures for additional security
- ✅ Error Handling: Robust error handling system with categorization
- ✅ Thread-Safe: The client is safe to use in multi-threaded environments
- ✅ Structured Logging: Configurable logging system for debugging
- ✅ Country Validation: Specific validators for each country/platform
Requirements
- Java 17 or higher
- Maven 3.6 or higher
Quick Start
import com.retorna.sdk.config.Environment;
import com.retorna.sdk.config.LoggingLevel;
import com.retorna.sdk.core.RetornaClient;
import com.retorna.sdk.core.RetornaClientOptions;
// Create client
RetornaClient client = RetornaClient.create(
RetornaClientOptions.builder()
.environment(Environment.DEVELOP)
.loggingLevel(LoggingLevel.INFO)
.clientId("YOUR_CLIENT_ID")
.clientSecret("YOUR_CLIENT_SECRET")
.privateKey("YOUR_PRIVATE_KEY_PEM")
.build()
);
// Get balance
BalanceResponse balance = client.account.getBalance();
System.out.println("Balance: " + balance.getTotalBalance());
Next Steps
- Installation - Learn how to install the SDK
- Configuration - Configure the SDK for your environment
- Account Guide - Work with account operations
- Quotation Guide - Create and query quotations
- Orders Guide - Create and manage payment orders



