Skip to content

brody-0125/bolta-java-sdk

Repository files navigation

Bolta Java SDK (Unofficial)

한국어 | English

⚠️ This is an UNOFFICIAL SDK for the Bolta e-tax invoice API. This SDK is not officially maintained or endorsed by Bolta. Use at your own risk.

A developer-friendly Java SDK for integrating with the Bolta e-tax invoice API.

License

Requirements

  • Java 8 or higher
  • Gradle or Maven

Installation

Gradle

Add to your build.gradle or build.gradle.kts:

dependencies {
    implementation 'io.bolta:bolta-java-sdk:0.0.1'
}

Maven

Add to your pom.xml:

<dependency>
    <groupId>io.bolta</groupId>
    <artifactId>bolta-java-sdk</artifactId>
    <version>0.0.1</version>
</dependency>

Quick Start

Initialize the SDK

import io.bolta.BoltaApp;

import io.bolta.BoltaApp;
import io.bolta.BoltaConfig;

BoltaConfig config = BoltaConfig.builder()
    .apiKey("your-api-key-here")
    .build();

BoltaApp app = BoltaApp.builder()
    .config(config)
    .build();

Issue E-Tax Invoice

import io.bolta.model.*;
import java.util.List;

TaxInvoice invoice = TaxInvoice.builder()
    .date("2024-01-15")
    .purpose(IssuancePurpose.RECEIPT)
    .supplier(Supplier.builder()
        .identificationNumber("1234567890")
        .organizationName("Supplier Corp")
        .representativeName("John Doe")
        .manager(Manager.builder()
            .email("manager@supplier.com")
            .name("Manager Name")
            .telephone("02-1234-5678")
            .build())
        .address("123 Business St, Seoul")
        .businessItem("Manufacturing")
        .businessType("Electronics")
        .build())
    .supplied(Supplied.builder()
        .identificationNumber("0987654321")
        .organizationName("Customer Corp")
        .representativeName("Jane Smith")
        .address("456 Commerce Rd, Seoul")
        .businessItem("Retail")
        .businessType("Electronics Sales")
        .managers(List.of(
            Manager.builder()
                .email("billing@customer.com")
                .name("Billing Manager")
                .telephone("02-9876-5432")
                .build()
        ))
        .build())
    .taxInvoiceLineItems(List.of(
        TaxInvoiceLineItem.builder()
            .date("2024-01-15")
            .name("Product Name")
            .quantity(10)
            .unitPrice(100000L)
            .supplyCost(1000000L)
            .tax(100000L)
            .build()
    ))
    .description("Monthly delivery")
    .build();

IssuanceKey key = app.taxInvoices().issue(invoice);
System.out.println("Issued invoice: " + key.getValue());

Query E-Tax Invoice

TaxInvoice invoice = app.taxInvoices().get("ISSUANCE_KEY_HERE");
System.out.println("Supplier: " + invoice.getSupplier().getOrganizationName());

Customer Management

// Create customer
Customer customer = Customer.builder()
    .identificationNumber("1234567890")
    .organizationName("Customer Company")
    .representativeName("Representative Name")
    .address("Business Address")
    .businessItem("Business Item")
    .businessType("Business Type")
    .email1("customer@example.com")
    .build();

app.customers().create(customer);

// Retrieve customer
Customer retrieved = app.customers().get("1234567890");

// Unregister customer certificate
app.customers().delete("1234567890");

Multi-Customer Platform

For platforms managing multiple customers:

RequestOptions options = RequestOptions.builder()
    .customerKey("customer-specific-key")
    .build();

IssuanceKey key = app.taxInvoices().issue(invoice, options);

Request Tracking with Client Reference ID

Track requests with your own reference identifier:

RequestOptions options = RequestOptions.builder()
    .clientReferenceId("ABC_123")  // Your unique reference ID
    .build();

IssuanceKey key = app.taxInvoices().issue(invoice, options);

Combine with customer key for platform scenarios:

RequestOptions options = RequestOptions.builder()
    .customerKey("customer-001")
    .clientReferenceId("ORDER_2024_001")
    .build();

IssuanceKey key = app.taxInvoices().issue(invoice, options);

Async Operations

import java.util.concurrent.CompletableFuture;

CompletableFuture<IssuanceKey> future = app.taxInvoices().issueAsync(invoice);

future.thenAccept(key -> {
    System.out.println("Issued: " + key.getValue());
}).exceptionally(error -> {
    error.printStackTrace();
    return null;
});

Error Handling

import io.bolta.exception.*;

try {
    IssuanceKey key = app.taxInvoices().issue(invoice);
} catch (BoltaApiException e) {
    System.err.println("API Error: " + e.getMessage());
    System.err.println("Status Code: " + e.getStatusCode());
    System.err.println("Response Body: " + e.getResponseBody());
} catch (BoltaException e) {
    System.err.println("SDK Error: " + e.getMessage());
}

Advanced Configuration

BoltaConfig config = BoltaConfig.builder()
    .apiKey("your-api-key")
    .baseUrl("https://xapi.bolta.io")
    .connectTimeoutMillis(10000)
    .readTimeoutMillis(30000)
    .writeTimeoutMillis(30000)
    .build();

BoltaApp app = BoltaApp.builder()
    .config(config)
    .build();

Documentation

Building from Source

git clone https://github.com/yourusername/bolta-java-sdk.git
cd bolta-java-sdk
./gradlew build

Testing

./gradlew test

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Disclaimer

⚠️ IMPORTANT: This is an unofficial SDK and is not affiliated with, maintained by, or endorsed by Bolta.

  • This SDK is provided "as is" without warranty of any kind
  • Use at your own risk in production environments
  • For official support, please contact Bolta directly

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Support


Note: Bolta and all related trademarks are property of their respective owners.

About

Unofficial Bolta API SDK https://api-docs.bolta.io/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages