Kobana

Official SDKs for every Kobana product

Node.js, Python, Ruby and PHP libraries to integrate each product's API with less code. The Banking Gateway ones are live; the rest are coming soon.

Node.jsPythonRubyPHP
Official SDKs for every Kobana product

Common features

Simple authentication

Configure once, use in all requests.

Error handling

Typed exceptions for each API error type.

Multiple clients

Create one client per token to serve several Kobana accounts from the same application.

Pagination

Listings with filters and page/per_page pagination.

Complete typing

TypeScript definitions, type hints (Python), PHPDoc.

Integrated logging

Debug mode to inspect requests and responses.

SDKs by product

Pick the product and the language. Packages marked β€œComing soon” are still being built; until then, use the product's REST API, MCP server or CLI.

Banking Gateway

Bank slips, Pix, payments and transfers across several banks.

The packages are simply named kobana (PHP: kobana/kobana-php-client).

Available

Node.js / TypeScript

npm
npm install kobana

or: yarn add kobana

Python

PyPI
pip install kobana

Ruby

RubyGems
gem install kobana

or: gem 'kobana'

PHP

Packagist
composer require kobana/kobana-php-client:dev-main

Automatic Billing

Subscriptions, invoices, tax documents and proposals.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Dunning

Automatic collection from due date to payment.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Smart Finance

Accounts payable and receivable, reconciliation and cash flow.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Magic Dashboard

Customer portal with your data and your brand.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Autonomous Inbox

Inboxes with AI agents that read and process emails.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Kadu Agent

Tasks, executions and pending items of an AI agent for finance.

Coming soon

Node.js / TypeScript

npm
Coming soon

Python

PyPI
Coming soon

Ruby

RubyGems
Coming soon

PHP

Packagist
Coming soon

Banking Gateway: setup and examples

How to configure the SDK (production or sandbox) and create and list bank slips in each language.

Node.js / TypeScript

Configuration

import { KobanaClient } from 'kobana';

const client = new KobanaClient({
  apiToken: process.env.KOBANA_API_TOKEN,
  environment: 'production', // or 'sandbox'
});

Usage example

// Create bank slip
const billet = await client.charge.bankBillet.create({
  bankBilletAccountId: 123,
  amount: 150.50,
  expireAt: '2026-12-31',
  customerPersonName: 'John Smith',
  customerCnpjCpf: '12345678901',
  customerZipcode: '01310100',
  customerAddress: 'Av. Paulista, 1000',
  customerNeighborhood: 'Bela Vista',
  customerCityName: 'SΓ£o Paulo',
  customerState: 'SP',
  description: 'December/2026 monthly fee',
});

console.log(billet.id, billet.status);

// List bank slips
const billets = await client.charge.bankBillet.all({
  status: 'opened',
  perPage: 50,
});

billets.forEach((b) => console.log(b.id, b.get('amount')));

Python

Configuration

import os
from kobana import KobanaClient

client = KobanaClient(
    api_token=os.environ['KOBANA_API_TOKEN'],
    environment='production',  # or 'sandbox'
)

Usage example

# Create bank slip
billet = client.charge.bank_billet.create(
    bank_billet_account_id=123,
    amount=150.50,
    expire_at='2026-12-31',
    customer_person_name='John Smith',
    customer_cnpj_cpf='12345678901',
    customer_email='john@example.com',
    customer_zipcode='01310100',
    customer_address='Av. Paulista, 1000',
    customer_neighborhood='Bela Vista',
    customer_city_name='SΓ£o Paulo',
    customer_state='SP',
    description='December/2026 monthly fee',
)

print(billet.id, billet.status)

# List bank slips
billets = client.charge.bank_billet.all(status='opened', per_page=50)
print(f'Total: {billets.total_count}')
for b in billets:
    print(f'{b.id}: R$ {b.amount}')

Ruby

Configuration

require 'kobana'

Kobana.configure do |config|
  config.api_token = ENV['KOBANA_API_TOKEN']
  config.environment = :production # or :sandbox
end

Usage example

# Create bank slip
billet = Kobana::Resources::Charge::BankBillet.create(
  bank_billet_account_id: 123,
  amount: 150.50,
  expire_at: '2026-12-31',
  customer_person_name: 'John Smith',
  customer_cnpj_cpf: '12345678901',
  customer_zipcode: '01310100',
  customer_address: 'Av. Paulista, 1000',
  customer_neighborhood: 'Bela Vista',
  customer_city_name: 'SΓ£o Paulo',
  customer_state: 'SP',
  description: 'December/2026 monthly fee'
)

puts billet.id
puts billet.status

# List bank slips
billets = Kobana::Resources::Charge::BankBillet.all(status: 'opened', per_page: 50)
billets.each { |b| puts "#{b.id}: R$ #{b.amount}" }

PHP

Configuration

<?php
require 'vendor/autoload.php';

use Kobana\Kobana;

Kobana::configure([
    'apiToken' => getenv('KOBANA_API_TOKEN'),
    'environment' => 'production', // or 'sandbox'
]);

Usage example

// Create bank slip
$billet = Kobana::charge()->bankBillet()->create([
    'bankBilletAccountId' => 123,
    'amount' => 150.50,
    'expireAt' => '2026-12-31',
    'customerPersonName' => 'John Smith',
    'customerCnpjCpf' => '12345678901',
    'customerZipcode' => '01310100',
    'customerAddress' => 'Av. Paulista',
    'customerAddressNumber' => '1000',
    'customerNeighborhood' => 'Bela Vista',
    'customerCityName' => 'SΓ£o Paulo',
    'customerState' => 'SP',
    'description' => 'December/2026 monthly fee',
]);

echo $billet->id . PHP_EOL;
echo $billet->getBarcode() . PHP_EOL;

// List bank slips
$billets = Kobana::charge()->bankBillet()->all([
    'status' => 'opened',
    'perPage' => 50,
]);

foreach ($billets as $b) {
    echo "{$b->id}: R$ {$b->amount}" . PHP_EOL;
}

Need another way to integrate?

Every product has a REST API (OpenAPI), an MCP server and a CLI, for when there is no SDK in your language yet.

See every product's API

Ready to get started?

Create your sandbox account and test the integration in minutes.