Check Order Status
curl --request GET \
--url https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "<string>",
"quantity": 123,
"fulfilled_quantity": 123,
"fulfilled_amount": 123,
"price_per_card": 123,
"cards": [
{
"value": "<string>",
"serial": "<string>"
}
]
}
}Gift Cards
Check Order Status
Get order status and retrieve cards when fulfilled
GET
/
v3
/
gift-cards
/
checkOrder
/
{orderId}
Check Order Status
curl --request GET \
--url https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/gift-cards/checkOrder/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "<string>",
"quantity": 123,
"fulfilled_quantity": 123,
"fulfilled_amount": 123,
"price_per_card": 123,
"cards": [
{
"value": "<string>",
"serial": "<string>"
}
]
}
}Overview
Check order status and retrieve card codes when order is fulfilled.Path Parameters
string
required
Order ID from
/placeOrder responseResponse
object
Show properties
Show properties
string
- HANDLING: Processing - FULFILLED: Complete, cards available ✅ - PARTIALLY_FILLED: Some cards delivered ⚠️ - REFUNDED: Failed and refunded ❌
number
Original order quantity
number
Number of cards delivered
number
Total amount charged
number
Price per card
Examples
curl https://api.oneclickdz.com/v3/gift-cards/checkOrder/6901616fe9e88196b4eb64b3 \
-H "X-Access-Token: YOUR_API_KEY"
const orderId = "6901616fe9e88196b4eb64b3";
const response = await fetch(
`https://api.oneclickdz.com/v3/gift-cards/checkOrder/${orderId}`,
{ headers: { "X-Access-Token": "YOUR_API_KEY" } }
);
const { data } = await response.json();
if (data.status === "FULFILLED") {
console.log("Cards:", data.cards);
}
response = requests.get(
f'https://api.oneclickdz.com/v3/gift-cards/checkOrder/{order_id}',
headers={'X-Access-Token': 'YOUR_API_KEY'}
)
data = response.json()['data']
if data['status'] == 'FULFILLED':
for card in data['cards']:
print(f"Code: {card['value']}, Serial: {card['serial']}")
<?php
$orderId = '6901616fe9e88196b4eb64b3';
$ch = curl_init("https://api.oneclickdz.com/v3/gift-cards/checkOrder/{$orderId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Access-Token: YOUR_API_KEY']);
$response = curl_exec($ch);
$result = json_decode($response, true);
$data = $result['data'];
if ($data['status'] === 'FULFILLED') {
foreach ($data['cards'] as $card) {
echo "Code: " . $card['value'] . ", Serial: " . $card['serial'] . "\n";
}
}
?>
Handling Response
{
"success": true,
"data": {
"_id": "6901616fe9e88196b4eb64b3",
"status": "HANDLING",
"quantity": 2,
"product": "507f1f77bcf86cd799439011",
"type": "type_001",
"time": "2025-10-29T01:00:00.000Z"
}
}
Fulfilled Response
{
"success": true,
"data": {
"_id": "6901616fe9e88196b4eb64b3",
"status": "FULFILLED",
"quantity": 2,
"fulfilled_quantity": 2,
"fulfilled_amount": 980,
"price_per_card": 490,
"cards": [
{
"value": "XXXX-XXXX-XXXX-XXXX",
"serial": "123456789"
},
{
"value": "YYYY-YYYY-YYYY-YYYY",
"serial": "987654321"
}
],
"time": "2025-10-29T01:00:00.000Z"
}
}
Polling Example
async function pollOrder(orderId) {
const maxAttempts = 60;
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`https://api.oneclickdz.com/v3/gift-cards/checkOrder/${orderId}`,
{ headers: { "X-Access-Token": process.env.API_KEY } }
);
const { data } = await response.json();
if (["FULFILLED", "PARTIALLY_FILLED", "REFUNDED"].includes(data.status)) {
return data;
}
await new Promise((resolve) => setTimeout(resolve, 5000));
}
throw new Error("Timeout");
}
Status Handling
FULFILLED
FULFILLED
All cards delivered successfully
fulfilled_quantity === quantity- All cards available in
cardsarray - Deliver to customer
PARTIALLY_FILLED
PARTIALLY_FILLED
Some cards delivered, rest cancelled
fulfilled_quantity < quantity- Partial refund issued
- Deliver available cards
- Refund difference to customer
REFUNDED
REFUNDED
Order completely failed
fulfilled_quantity === 0- Full refund issued
- Notify customer of failure
Secure Card Delivery
Handle cards securely. Never log card codes in plain text.
// Good: Secure delivery
async function deliverCards(userId, cards) {
// Store encrypted
await db.deliveredCards.insertMany(
cards.map((c) => ({
userId,
value: encrypt(c.value),
serial: encrypt(c.serial),
deliveredAt: new Date(),
}))
);
// Send via secure channel
await sendSecureEmail(userId, cards);
// Log without sensitive data
logger.info("Cards delivered", { userId, count: cards.length });
}
Related
Place Order
Create new order
List Orders
View all orders
⌘I

