Sofizpay

Developer Documentation

Integrate Algeria's leading payment gateway in minutes

Developer-first

One SDK. Easy Payment Links.

Drop our SDK into your codebase and start charging customers in minutes. Sandbox testing environment and automatic retries are fully built-in.

Official open-source SDK and REST API for merchants. Accept Dahabia, EDahabia, and CIB payments from your website, mobile app, or e-commerce store — with libraries for JavaScript, TypeScript, PHP, Python, Node.js, React and Next.js.

npm install @sofizpay/sdk
import { SofizPay } from '@sofizpay/sdk';

const sofiz = new SofizPay({
  apiKey: 'sp_live_55a2b8...',
});

// Create a quick CIB/Dahabia payment
const payment = await sofiz.payments.create({
  amount: 1500, // DZD
  currency: 'DZD',
  description: 'Order #1042',
  customer: {
    email: 'customer@email.com',
    phone: '+213670011093'
  },
  successUrl: 'https://yoursite.com/success',
  cancelUrl: 'https://yoursite.com/cancel'
});

// Redirect customer to secure checkout page
window.location.href = payment.checkoutUrl;

Available SDKs

Pick the language your team uses. All SDKs are open-source on GitHub.

JavaScript
TypeScript
Node.js
PHP
Python
React
Next.js
REST API
docs.sofizpay.com

Looking for the full documentation?

To review all parameters, response payloads, and advanced implementation guides, please head over to our official developer docs portal. It contains complete reference materials and everything you need for integration.

Why SofizPay is the #1 Payment API for Developers & Startups?

Clean REST API

RESTful endpoints with predictable JSON response payloads, pagination, and standardized HTTP status codes.

Instant Test Sandbox

A 100% free sandbox environment with virtual Dahabia and CIB card testing numbers to build and test before going live.

Easy Payment Links

Generate payment links and share them instantly with your customers via email, SMS, or social media to collect payments in seconds.

Full Developer Docs

Quickstarts, step-by-step tutorials, SDK documentation, and copy-paste code recipes for your stack.

0% Transaction Commission

Save thousands of Dinars. Pay 0% fee on all sales, with daily payouts processed in 24 hours at a flat 1% withdrawal fee.

Idempotency Protection

Cryptographic protection that guarantees safe API retries and prevents double-charging customers during connection timeouts.

Gateway Comparison: Why SofizPay wins for Developers?

Compare SofizPay, other local gateways, and traditional bank integrations to choose the best payment infrastructure for your startup.

FeatureSofizPayOther Local GatewaysTraditional Bank Integration
Transaction & Sales Commission0% (Totally Free)Up to 3.5% commission per transactionCharged percentage + annual setup fees
Withdrawal & Payout Fee1% only upon withdrawing fundsUp to 1.5% or higher per payoutSubject to custom bank contract negotiations
Payout Settlement Speed24 Hours (Daily payouts)48 to 72 business hours or weekly cyclesSeveral business days depending on bank bureaucracy
API & SDK Integration EaseExtremely Easy (Live SDKs in 5 mins)Moderate (SDKs limited for some stacks)Very Complex (requires months of bureaucracy)
Marketplace Split PaymentsFully Supported nativelyNot supported by default (requires custom build)Not supported
Instant Test Sandbox Environment100% Free & instant access for devsAvailable (may require manual activation approvals)Requires security clearances & complex tests
Open-source

Start integrating in 5 minutes

Generate an API key, install the SDK, and process your first test payment today.

Free for developers • Open-source SDKs • Production-ready sandbox