curl --request GET \
--url https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5 \
--header 'X-Access-Token: YOUR_API_KEY'
const response = await fetch(
"https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5",
{
method: "GET",
headers: {
"X-Access-Token": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log("Payment Status:", data.data.status);
console.log("Message:", data.data.message);
import requests
ref = "OCPL-A1B2C3-D4E5"
url = f"https://api.oneclickdz.com/v3/ocpay/checkPayment/{ref}"
headers = {
"X-Access-Token": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"Payment Status: {data['data']['status']}")
print(f"Message: {data['data']['message']}")
<?php
$ref = 'OCPL-A1B2C3-D4E5';
$url = "https://api.oneclickdz.com/v3/ocpay/checkPayment/{$ref}";
$headers = [
'X-Access-Token: YOUR_API_KEY'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Payment Status: " . $data['data']['status'] . "\n";
echo "Message: " . $data['data']['message'] . "\n";
?>
{
"success": true,
"data": {
"status": "CONFIRMED",
"message": "Payment confirmed successfully",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "PENDING",
"message": "Payment not yet initiated",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false
}
},
"meta": {
"timestamp": "2025-01-15T10:32:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "FAILED",
"message": "Payment failed",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_NOT_FOUND",
"message": "Payment link not found"
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_EXPIRED",
"message": "Payment link expired"
},
"meta": {
"timestamp": "2025-01-15T10:55:00Z",
"requestId": "req_abc123xyz"
}
}
Navio
Check Payment Status
Check the current status of a payment using its reference code
GET
/
v3
/
ocpay
/
checkPayment
/
:ref
curl --request GET \
--url https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5 \
--header 'X-Access-Token: YOUR_API_KEY'
const response = await fetch(
"https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5",
{
method: "GET",
headers: {
"X-Access-Token": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log("Payment Status:", data.data.status);
console.log("Message:", data.data.message);
import requests
ref = "OCPL-A1B2C3-D4E5"
url = f"https://api.oneclickdz.com/v3/ocpay/checkPayment/{ref}"
headers = {
"X-Access-Token": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"Payment Status: {data['data']['status']}")
print(f"Message: {data['data']['message']}")
<?php
$ref = 'OCPL-A1B2C3-D4E5';
$url = "https://api.oneclickdz.com/v3/ocpay/checkPayment/{$ref}";
$headers = [
'X-Access-Token: YOUR_API_KEY'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Payment Status: " . $data['data']['status'] . "\n";
echo "Message: " . $data['data']['message'] . "\n";
?>
{
"success": true,
"data": {
"status": "CONFIRMED",
"message": "Payment confirmed successfully",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "PENDING",
"message": "Payment not yet initiated",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false
}
},
"meta": {
"timestamp": "2025-01-15T10:32:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "FAILED",
"message": "Payment failed",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_NOT_FOUND",
"message": "Payment link not found"
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_EXPIRED",
"message": "Payment link expired"
},
"meta": {
"timestamp": "2025-01-15T10:55:00Z",
"requestId": "req_abc123xyz"
}
}
Overview
Check payment status in real-time using the payment reference. Essential for order processing, status polling, and payment verification.Automatic Environment Detection: This endpoint automatically checks both
production (SATIM) and sandbox transactions based on where the payment was
created.
Path Parameters
string
required
Payment reference code (format:
OCPL-XXXXXX-YYYY) Examples: -
OCPL-A1B2C3-D4E5 - OCPL-123456-7890This is the
paymentRef returned when you created the payment linkResponse
boolean
Indicates if the operation was successful
object
Payment status information
Show data properties
Show data properties
string
Current payment status -
PENDING - Payment not yet initiated or
processing - CONFIRMED - Payment successful - FAILED - Payment failed
or link expiredstring
Human-readable status description Examples: -
"Payment confirmed successfully" - "Payment not yet initiated" - "Payment failed"string
Payment reference code
object
Status Values Explained
PENDING
PENDING
When you see this:
- Customer hasn’t started the payment process yet
- Payment is currently being processed by the bank
- Link was just created and not yet used
- Continue polling for status updates
- Display “Payment pending” to customer
- Don’t fulfill the order yet
CONFIRMED
CONFIRMED
When you see this: - Payment completed successfully - Funds will be
credited to your OneClick balance What to do: - Mark order as paid in your
system - Fulfill the order/provide service - Send confirmation to customer
FAILED
FAILED
When you see this:
- Payment was declined or failed
- Payment link expired (20 minutes)
- Customer cancelled the payment
- Mark order as failed/cancelled
- Create a new payment link if customer wants to retry
- Don’t fulfill the order
Link Expiration
Payment links expire 20 minutes after creation if no payment is initiated.
After expiration, the status will be
FAILED.curl --request GET \
--url https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5 \
--header 'X-Access-Token: YOUR_API_KEY'
const response = await fetch(
"https://api.oneclickdz.com/v3/ocpay/checkPayment/OCPL-A1B2C3-D4E5",
{
method: "GET",
headers: {
"X-Access-Token": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log("Payment Status:", data.data.status);
console.log("Message:", data.data.message);
import requests
ref = "OCPL-A1B2C3-D4E5"
url = f"https://api.oneclickdz.com/v3/ocpay/checkPayment/{ref}"
headers = {
"X-Access-Token": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"Payment Status: {data['data']['status']}")
print(f"Message: {data['data']['message']}")
<?php
$ref = 'OCPL-A1B2C3-D4E5';
$url = "https://api.oneclickdz.com/v3/ocpay/checkPayment/{$ref}";
$headers = [
'X-Access-Token: YOUR_API_KEY'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Payment Status: " . $data['data']['status'] . "\n";
echo "Message: " . $data['data']['message'] . "\n";
?>
{
"success": true,
"data": {
"status": "CONFIRMED",
"message": "Payment confirmed successfully",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "PENDING",
"message": "Payment not yet initiated",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false
}
},
"meta": {
"timestamp": "2025-01-15T10:32:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": true,
"data": {
"status": "FAILED",
"message": "Payment failed",
"paymentRef": "OCPL-A1B2C3-D4E5",
"transactionDetails": {
"amount": 5000,
"currency": "DZD",
"isSandbox": false,
"createdDate": "2025-01-15T10:30:00Z"
}
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_NOT_FOUND",
"message": "Payment link not found"
},
"meta": {
"timestamp": "2025-01-15T10:35:00Z",
"requestId": "req_abc123xyz"
}
}
{
"success": false,
"error": {
"code": "PAYMENT_EXPIRED",
"message": "Payment link expired"
},
"meta": {
"timestamp": "2025-01-15T10:55:00Z",
"requestId": "req_abc123xyz"
}
}
Integration Example
Here’s how to implement status checking in your order system:async function checkOrderPayment(orderId) {
// Get payment ref from your database
const order = await db.orders.findOne({ id: orderId });
if (!order || !order.paymentRef) {
throw new Error("Order not found or no payment link");
}
// Check payment status
const response = await fetch(
`https://api.oneclickdz.com/v3/ocpay/checkPayment/${order.paymentRef}`,
{
headers: { "X-Access-Token": process.env.ONECLICK_API_KEY },
}
);
const data = await response.json();
// Update order status based on payment status
switch (data.data.status) {
case "CONFIRMED":
await db.orders.update(orderId, {
status: "paid",
paidAt: new Date(),
});
// Fulfill order
await fulfillOrder(orderId);
break;
case "FAILED":
await db.orders.update(orderId, {
status: "payment_failed",
});
break;
case "PENDING":
// Keep polling
break;
}
return data.data;
}
Next Steps
Create Payment Link
Learn how to create payment links
Integration Guide
Complete Navio integration guide

