SDKs & Libraries

Production-ready SDKs and libraries for every platform and programming language. Build powerful payment experiences with minimal code.

11.7K

Total Downloads

305

GitHub Stars

420+

Active Developers

10+

Languages Supported

🐍

Python SDK

Python

stable

Pythonic SDK with smart transport selection (REST for sandbox, gRPC for production) and support for Django, Flask, and FastAPI frameworks

1.8K
64
v1.0.0

Installation

pip install swiftdime-python

Key Features

Smart transport selection (REST/gRPC)
Django, Flask, and FastAPI integration
SwiftDime-style .charge() API
Async/await support with asyncio

Quick Start

Python SDK Example
import swiftdime
import time

# Server-side β€” secret key only, never expose in client code
client = swiftdime.Client('fl_sk_test_your-sandbox-secret-key')

payment = client.payments.create(
    tx_ref=f'ORDER-{int(time.time())}',
    amount=100.00,
    currency='ZMW',
    customer: {
        email: 'customer@example.com',
        name: 'John Doe',
        phone_number: +260971234567
  }
    payment_methods=['mobile_money', 'card'],
    callback_url='https://yoursite.com/webhook',
    redirect_url='https://yoursite.com/success',
    metadata={'order_id': 'ORD-12345'}
)

print(f"Checkout URL: {payment.data.checkout_url}")
🐘

PHP Laravel SDK

PHP

stable

Pure gRPC client for Laravel with enterprise-grade performance (100k+ RPS capable) and dual environment support

2.1K
58
v1.0.0

Installation

composer require swiftdime/laravel-sdk

Key Features

Pure gRPC communication (100k+ RPS)
Laravel 9.x - 12.x support
Service Provider and Facade
Smart transport selection

Quick Start

PHP Laravel SDK Example
<?php
use SwiftDime\Laravel\SwiftDimeClient;

// Server-side β€” secret key only, stored in config/swiftdime.php
$client = new SwiftDimeClient(config('swiftdime.secret_key'));

$payment = $client->payments->create([
    'tx_ref'          => 'ORDER-' . uniqid(),
    'amount'          => 100.00,
    'currency'        => 'ZMW',
    customer:         => {
        email: 'customer@example.com',
        name: 'John Doe',
        phone_number: +260971234567
    }
    'payment_methods' => ['mobile_money', 'card'],
    'callback_url'    => route('payment.webhook'),
    'redirect_url'    => route('transaction.completed'),
]);

return redirect($payment['data']['checkout_url']);
πŸ”·

Go SDK

Go

stable

High-performance Go SDK with smart transport selection (REST for sandbox, gRPC for production) and context support

892
34
v1.0.0

Installation

go get github.com/swiftdime/go-sdk

Key Features

Smart transport (REST/gRPC)
SwiftDime-style .Charge() API
Context-aware API calls
Connection pooling

Quick Start

Go SDK Example
package main

import (
    "context"
    "fmt"
    "log"
    "time"
    "github.com/swiftdime/go-sdk"
)

func main() {
    // Server-side β€” secret key only, loaded from environment
    client := swiftdime.NewClient(swiftdime.Config{
        SecretKey:   "fl_sk_test_your-sandbox-secret-key",
        Environment: swiftdime.EnvironmentSandbox,
    })

    ctx := context.Background()
    payment, err := client.Payments.Create(ctx, swiftdime.CreatePaymentRequest{
        TxRef:         fmt.Sprintf("ORDER-%d", time.Now().Unix()),
        Amount:        100.0,
        Currency:      "ZMW",
        CustomerEmail: "customer@example.com",
        CustomerName:  "John Doe",
        PaymentMethods: []string{"mobile_money", "card"},
        CallbackURL:   "https://yoursite.com/webhook",
        RedirectURL:   "https://yoursite.com/success",
    })
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Checkout URL: %s\n", payment.Data.CheckoutURL)
}
βš›οΈ

React SDK

React

stable

Modern hook-based React SDK with SwiftDime-style API and smart transport selection

1.4K
52
v1.0.0

Installation

npm install @swiftdime/react-sdk

Key Features

React Hooks (useSwiftDime)
SwiftDime-style .charge() API
Smart transport (REST/gRPC-Web)
TypeScript support

Quick Start

React SDK Example
import React from 'react';
import { useSwiftDime } from '@swiftdime/react-sdk';

// Client-side: only the public key goes in browser code
function CheckoutButton({ txRef, amount }) {
  const { openCheckout, loading } = useSwiftDime({
    publicKey: process.env.NEXT_PUBLIC_SWIFTDIME_PUBLIC_KEY, // fl_pk_test_...
  });

  return (
    <button
      onClick={() => openCheckout({ txRef, amount, currency: 'ZMW' })}
      disabled={loading}
    >
      {loading ? 'Opening...' : 'Pay Now'}
    </button>
  );
}
πŸ’š

Vue SDK

Vue.js

stable

Modern Composition API-based Vue 3 SDK with SwiftDime-style API and reactive composables

986
31
v1.0.0

Installation

npm install @swiftdime/vue-sdk

Key Features

Vue 3 Composition API (useSwiftDime)
SwiftDime-style .charge() API
Smart transport (REST/gRPC-Web)
TypeScript support

Quick Start

Vue SDK Example
<script setup>
import { useSwiftDime } from '@swiftdime/vue-sdk';

// Client-side: only the public key goes in browser code
const { openCheckout, loading } = useSwiftDime({
  publicKey: import.meta.env.VITE_SWIFTDIME_PUBLIC_KEY, // fl_pk_test_...
});

async function handlePayment() {
  // Your server creates the payment first and returns a txRef
  const res = await fetch('/api/payments', { method: 'POST' });
  const { txRef } = await res.json();

  openCheckout({
    txRef,
    amount: 100.00,
    currency: 'ZMW',
    customer: {
        email: 'customer@example.com',
        name: 'John Doe',
        phone_number: +260971234567
      }
  });
}
</script>

<template>
  <button @click="handlePayment" :disabled="loading">
    {{ loading ? 'Opening...' : 'Pay ZMW 100.00' }}
  </button>
</template>

Ready to start building?

Get started with SwiftDime SDKs today. Join thousands of developers building amazing payment experiences with our tools.

🚧 Development Notice

This payment gateway is currently under development and not authorized for commercial use. We are actively working on:

  • Regulatory compliance and licensing
  • Payment gateway aggregator registration
  • Security audits and certifications
  • Production infrastructure setup
Sandbox Mode Available: Test our payment system without real transactions