OneClick for Developers

Build with OneClick APIs

Integrate mobile top-ups, internet recharge, digital products, and secure payments into your application using simple REST APIs.

RESTful APIs
Real-time tracking
Secure infrastructure
Sandbox environment
JavaScriptPHPPython
import { OCPay } from '@ocpay/node';
const client = new OCPay('sk_live_...');
await client.charges.create({
amount: 1500,
currency: 'DZD'
});
$ocpay = new \OCPay\Client('sk_live_...');
$ocpay->charges->create([
'amount' => 1500,
'currency' => 'DZD'
]);
import ocpay
ocpay.api_key = 'sk_live_...'
ocpay.Charge.create(
amount=1500,
currency='DZD'
)
200 OK — Response
{
  "id": "ch_9x3a",
  "status": "success",
  "amount": 1500,
  "created": 1680000000
}
Documentation

Explore Our Resources

Everything you need to build and scale your integration.

Quick Start

Get up and running in minutes.

Open Documentation
Quick Start

Integration Guides

Step-by-step tutorials for every platform.

Open Documentation
Integration Guides

Best Practices

Learn how to build for scale and reliability.

Open Documentation
Best Practices

Examples & Code

Pre-built code snippets and sample apps.

Open Documentation
Examples & Code
APIs

Available API Products

Browse the full catalogue of OneClick APIs. Each API follows the same authentication and asynchronous response pattern.

Mobile Top-Up API

Top up any Algerian operator , Djezzy, Ooredoo, Mobilis.

Capabilities

Query available plans, send top-ups, and verify transaction status using a unique order reference.

Sample Endpoints

GET/v3/mobile/plans
POST/v3/mobile/send
GET/v3/mobile/check-ref/:ref

Navio Payment API

Generate secure payment links and accept DZD payments via CIB/EDAHABIA.

Capabilities

Create payment links with a unique reference, redirect customers, and verify payment status.

Sample Endpoints

POST/v3/ocpay/createLink
GET/v3/ocpay/checkPayment/:ref

Gift Cards API

Distribute digital gift cards from international and local brands.

Capabilities

Fetch the full gift card catalog, place orders, and check order delivery by ID.

Sample Endpoints

GET/v3/gift-cards/catalog
POST/v3/gift-cards/placeOrder
GET/v3/gift-cards/checkOrder/:id

Internet Recharge API

Sell internet packages and data bundles for all operators.

Capabilities

Browse product catalogs, send recharges, and track delivery status with a unique order ID.

Sample Endpoints

GET/v3/internet/products
POST/v3/internet/send
GET/v3/internet/check-id/:id
Webhooks

Real-time Event Notifications

Stay updated on asynchronous events automatically.

Real-time Processing

Receive immediate updates when an order transitions state.

Automatic Retries

Built-in exponential backoff for failed webhook deliveries.

Security Validation

Verify webhook authenticity using signature headers.

async function pollStatus(checkFunction, options = {}) {
const {
maxAttempts = 60,
interval = 5000,
finalStates = ["FULFILLED", "REFUNDED"],
} = options;
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
const result = await checkFunction();
if (finalStates.includes(result.status)) {
return result;
}
if (attempt < maxAttempts) {
await new Promise((resolve) => setTimeout(resolve, interval));
}
}
throw new Error("Polling timeout");
}
// Usage
const result = await pollStatus(() => checkTopupStatus(topupId), {
maxAttempts: 60,
interval: 5000,
});
Sandbox

Test before you go live

OneClick provides a full sandbox environment where you can simulate transactions safely before deploying to production.

Test without real money
Simulate success or failure
Instant API responses
Safe development environment

Use these test phone numbers when calling the Mobile Top-Up API in sandbox mode.

test-numbers.txt
Sandbox Mode
0600000001
ScenarioRefund scenario
0600000002
ScenarioSuggested offers
0600000003
ScenarioUnknown error

Pro Tip:Sandbox API calls use the same endpoints and authentication as production. Set sandbox: true in your request body.

Logo

Your trusted partner for digital transformation and enterprise solutions.

© 2026 OneClick. All rights reserved.