Clients
SDKs
Eight languages, one API surface. Automatic idempotency, webhook signature verification, sensible errors.
Official clients with automatic idempotency, webhook signature verification and sensible errors. All SDKs talk to the same REST API, so features ship to all of them at the same time.
| Language | Install | Import |
|---|---|---|
Node.js / TS | npm install @balanced/sdk | import { BalancedClient } from '@balanced/sdk' |
Python | pip install balanced | from balanced import BalancedClient |
PHP | composer require balanced/sdk | use Balanced\BalancedClient; |
Ruby | gem install balanced | require 'balanced' |
Java | ru.balanced:balanced-sdk:0.1.0 | import ru.balanced.sdk.BalancedClient; |
.NET | dotnet add package Balanced.Sdk | using Balanced; |
Go | go get github.com/balanced/sdk-go | import "github.com/balanced/sdk-go/balanced" |
Dart / Flutter | flutter pub add balanced | import 'package:balanced/balanced.dart'; |
API comparison
The surface is identical; the idioms are native to each language:
import { BalancedClient } from '@balanced/sdk'
const client = new BalancedClient({ apiKey: process.env.PSP_API_KEY })
const { payment, payment_url } = await client.createPayment({
amount: 150_000, currency: 'RUB', method: 'sbp',
order_id: 'ORDER-1042',
return_url: 'https://shop.example/orders/1042/done',
})Your language isn’t listed
Generate a client from the OpenAPI spec via openapi-generator (50+ targets: Rust, Kotlin, Swift, Elixir, Crystal, Clojure, Scala, …):
openapi-generator-cli generate \ -i https://api.balancedpay.pro/openapi.yaml \ -g rust \ -o ./balanced-rust