> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/kotlin.md).

# Kotlin SDK

The official Kotlin / JVM SDK for the Crypto Chief crypto processing API — accept payments, send payouts, sign transactions, and verify webhooks across 25+ chains.

The official Kotlin / JVM client for the [Crypto Chief](https://crypto-chief.com/processing/) crypto processing API. One dependency gives you typed, coroutine-friendly access to payments, payouts, on-chain transactions, wallets, and webhooks across 25+ chains.

[![Maven Central](https://img.shields.io/maven-central/v/com.crypto-chief/cryptochief-crypto-processing-kotlin.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.crypto-chief/cryptochief-crypto-processing-kotlin)

## Requirements

* JDK **11+** at runtime, JDK **17+** to build
* A Crypto Chief **Merchant ID** and **API key** (Dashboard → Integration)

## Installation

{% tabs %}
{% tab title="Gradle (Kotlin DSL)" %}

```kotlin
dependencies {
    implementation("com.crypto-chief:cryptochief-crypto-processing-kotlin:0.7.0")
}
```

{% endtab %}

{% tab title="Gradle (Groovy)" %}

```groovy
dependencies {
    implementation 'com.crypto-chief:cryptochief-crypto-processing-kotlin:0.7.0'
}
```

{% endtab %}

{% tab title="Maven" %}

```xml
<dependency>
  <groupId>com.crypto-chief</groupId>
  <artifactId>cryptochief-crypto-processing-kotlin</artifactId>
  <version>0.7.0</version>
</dependency>
```

{% endtab %}
{% endtabs %}

The SDK is **coroutines-first**: every service method is a `suspend fun`, and DTOs are `@Serializable` data classes with `@SerialName` mapping camelCase Kotlin fields to the API's snake\_case wire format. No callback layer, no annotation processing.

## Quickstart

```kotlin
import com.cryptochief.processing.Chain
import com.cryptochief.processing.CryptoChiefClient
import com.cryptochief.processing.models.EstimatePayoutRequest
import kotlinx.coroutines.runBlocking

fun main() = runBlocking {
    CryptoChiefClient.create {
        merchantId = "MERCHANT_ID"
        apiKey     = "API_KEY"
    }.use { client ->
        val est = client.payouts.estimate(
            EstimatePayoutRequest(
                network   = Chain.ETH_SEPOLIA,
                coin      = "ETH",
                amount    = "0.0001",
                toAddress = "0xRecipient...",
            ),
        )
        println("amount to receive: ${est.amountToReceive}")
    }
}
```

{% hint style="success" %}
If `estimate` returns without throwing, your credentials and signing are working end-to-end.
{% endhint %}

## What you can do

| Domain                               | Service                                       | Key methods                                                                                                |
| ------------------------------------ | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Single & batch payouts               | `client.payouts`                              | `estimate`, `execute`, `batchExecute`, `info`, `history`                                                   |
| Sign / execute arbitrary txs         | `client.transactions`                         | `sign`, `execute`, `signEvmCall`, `jettonTransfer`                                                         |
| Accept payments                      | `client.payIns`                               | `create`, `selectAsset`, `cancel`, `info`, `history`                                                       |
| Wallets + RSA decrypt                | `client.wallets`                              | `generate`, `list`, `freeze`, `history`, `rebindMaster`, `setCallbackUrl`, `setLabel`, `decryptPrivateKey` |
| Treasury sweeps                      | `client.sweeps`                               | `force`, `history`, `walletHistory`, `settings`, `updateSettings`                                          |
| On-chain queries                     | `client.blockchain`                           | `contractsAvailable`, `contractsList`, `blockchainsList`, `walletBalance`, `transactionStatus`             |
| Fiat ↔ crypto rates & currency lists | `client.currencies`                           | `fiatToCrypto`, `cryptoToFiat`, `fiats`, `cryptos`                                                         |
| API credits                          | `client.credits`                              | `balance`, `topup`                                                                                         |
| Deposit & withdrawal records         | `client.staticDeposits`, `client.withdrawals` | `info`, `history`                                                                                          |

## Explore the guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔑 Authentication</strong></td><td>Credentials, client setup, and request signing.</td><td><a href="/processing/kotlin/authentication.md">Authentication</a></td></tr><tr><td><strong>💸 Send a payout</strong></td><td>Estimate, execute idempotently, and confirm.</td><td><a href="/processing/kotlin/guides/payouts.md">Send a payout</a></td></tr><tr><td><strong>📥 Accept payments</strong></td><td>Create PayIn invoices and read deposits.</td><td><a href="/processing/kotlin/guides/accept-payments.md">Accept crypto payments</a></td></tr><tr><td><strong>📡 Webhooks</strong></td><td>Verify signatures and handle typed events.</td><td><a href="/processing/kotlin/guides/webhooks.md">Webhooks</a></td></tr><tr><td><strong>🧩 Contract calls</strong></td><td>EVM / TRON ABI calls with no hand-encoded calldata.</td><td><a href="/processing/kotlin/guides/contract-calls.md">Contract calls (EVM / TRON)</a></td></tr><tr><td><strong>💎 TON transfers</strong></td><td>Jetton, NFT, and comment transfers in one call.</td><td><a href="/processing/kotlin/guides/ton.md">TON: Jetton, NFT &amp; comments</a></td></tr></tbody></table>
