ادمج PrivCards في تطبيقاتك. أصدر، اشحن، جمد وأدر البطاقات الافتراضية برمجياً عبر REST API الخاص بنا.
https://api.privcards.com/v1تتطلب جميع طلبات API رمز Bearer. أنشئ مفتاح API من لوحة التحكم → الإعدادات → مفاتيح API.
لا تكشف مفتاحك أبداً في كود جانب العميل. استخدم متغيرات البيئة. المفاتيح ببادئة sk_live_ هي إنتاج، sk_test_ هي sandbox.
Authorization: Bearer sk_live_your_api_key_here Content-Type: application/json X-Idempotency-Key: optional-unique-key-for-safe-retries
{
"error": "insufficient_funds",
"message": "Your wallet balance is too low to fund this card.",
"code": 400,
"request_id": "req_7f8a9b2c3d4e"
}أنشئ، أدر وتحكم في بطاقات Visa وMastercard الافتراضية. كل بطاقة معزولة برصيدها وحدودها ودورة حياتها الخاصة.
| Parameter | Type | Description | |
|---|---|---|---|
| bin_id | string | required | BIN identifier (e.g. 491653). Use GET /bins to list available BINs. |
| amount | number | required | Initial funding amount in USD. Min: $1.00, Max: $5,000.00 |
| label | string | optional | Custom label for the card (max 64 chars) |
| spending_limit | number | optional | Monthly spending limit in USD. Defaults to BIN maximum. |
| allowed_categories | string[] | optional | MCC categories to whitelist (e.g. ["advertising", "software"]) |
| auto_freeze_at | number | optional | Auto-freeze when balance drops below this amount |
| metadata | object | optional | Key-value pairs for your internal tracking (max 20 keys) |
curl -X POST https://api.privcards.com/v1/cards \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"bin_id": "491653",
"amount": 500,
"label": "Meta Ads Campaign #12",
"spending_limit": 2000,
"allowed_categories": ["advertising"],
"metadata": {"campaign": "spring_2026"}
}'{
"id": "card_8xK2m9Lp4q",
"bin_id": "491653",
"network": "visa",
"last4": "2039",
"status": "active",
"balance": 500.00,
"spending_limit": 2000.00,
"label": "Meta Ads Campaign #12",
"allowed_categories": ["advertising"],
"auto_freeze_at": null,
"metadata": { "campaign": "spring_2026" },
"created_at": "2026-04-15T12:00:00Z",
"expires_at": "2029-04-15T23:59:59Z"
}| Parameter | Type | Description | |
|---|---|---|---|
| status | string | optional | active, frozen, terminated |
| bin_id | string | optional | Filter by BIN |
| page | integer | optional | Page number. Default: 1 |
| per_page | integer | optional | Items per page (1-100). Default: 25 |
apiDocs.cards.getDesc
تُرجع PAN وCVV وتاريخ الانتهاء الكامل. حساس PCI — لا تسجل أو تخزن أبداً بدون تشفير. محدود بـ 30 req/min.
يعلق جميع المعاملات. الرصيد محفوظ. يمكن إلغاء تجميد البطاقة لاحقاً.
يعيد تفعيل المعاملات على بطاقة مجمدة. يُرجع كائن البطاقة بحالة status: "active".
إنهاء البطاقة دائم. يتم إرجاع الرصيد المتبقي إلى محفظتك فوراً.
أضف أو اسحب الأموال من البطاقات الفردية. تأتي الأموال من رصيد محفظتك.
| Parameter | Type | Description | |
|---|---|---|---|
| amount | number | required | Amount in USD to add. Min: $1.00, Max: $5,000.00 |
يُرجع أرصدة محدثة للبطاقة والمحفظة.
اعرض جميع المعاملات على بطاقاتك. يشمل التراخيص والتسويات والمبالغ المستردة والرفض.
| Parameter | Type | Description | |
|---|---|---|---|
| card_id | string | optional | Filter by card |
| type | string | optional | authorization, settlement, refund, decline |
| from | string | optional | Start date (ISO 8601) |
| to | string | optional | End date (ISO 8601) |
| page | integer | optional | Page number. Default: 1 |
أدر محفظة حسابك. أودع الكريبتو، تحقق من الأرصدة وتتبع الإيداعات الواردة.
{
"balance": 1312.50,
"currency": "USD",
"pending_deposits": 500.00,
"total_deposited": 15000.00,
"total_spent": 13687.50,
"cards_active": 8,
"cards_total_balance": 2450.00
}| Parameter | Type | Description | |
|---|---|---|---|
| currency | string | optional | btc, eth, sol, usdt. Omit to get all. |
سرد نطاقات BIN المتاحة مع قدراتها وحدودها ومعدلات القبول.
{
"data": [
{
"id": "491653",
"network": "visa",
"type": "advertising",
"3ds": true,
"apple_pay": true,
"google_pay": true,
"max_transaction": 5000.00,
"max_monthly": 50000.00,
"acceptance_rate": 97.2,
"best_for": ["meta_ads", "google_ads", "tiktok_ads"]
}
]
}استرد تحديات 3DS ورموز OTP. جميع البطاقات مسجلة تلقائياً في 3DS 2.0.
{
"data": [
{
"id": "3ds_m4n5o6p7",
"card_id": "card_8xK2m9Lp4q",
"merchant": "SPOTIFY",
"amount": 9.99,
"otp": "847291",
"status": "pending",
"expires_at": "2026-04-15T15:05:00Z"
}
]
}تلقي إشعارات في الوقت الفعلي عند وقوع الأحداث. الحمولات موقعة بـ HMAC-SHA256.
card.createdتم إصدار بطاقة جديدةcard.frozenتم تجميد بطاقةcard.unfrozenتم إلغاء تجميد بطاقةcard.terminatedتم إنهاء بطاقةcard.fundedتمت إضافة أموال إلى بطاقةtransaction.authorizedتم تفويض المعاملةtransaction.settledتم تسوية المعاملةtransaction.declinedتم رفض المعاملةtransaction.refundedتمت معالجة الاسترداد3ds.challengeمطلوب التحقق من 3DSdeposit.pendingتم اكتشاف إيداع كريبتوdeposit.confirmedتم تأكيد إيداع الكريبتوimport hmac, hashlib
def verify_webhook(payload, signature, secret):
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)| Parameter | Type | Description | |
|---|---|---|---|
| url | string | required | HTTPS endpoint URL to receive events |
| events | string[] | required | Event types to subscribe. Use ["*"] for all. |
| secret | string | optional | Custom signing secret. Auto-generated if omitted. |
مكتبات عميل رسمية لـ stack الخاص بك. جميع SDKs تدعم بيئات live وsandbox.
pip install privcards
npm i privcards
go get privcards
from privcards import Client
client = Client("sk_live_your_api_key")
# Create a card
card = client.cards.create(
bin_id="491653",
amount=500,
label="Ad Spend"
)
print(card.id, card.last4)
# Get full card details (PAN, CVV)
details = client.cards.details(card.id)
print(details.pan, details.cvv)
# Fund the card
client.cards.fund(card.id, amount=200)
# List transactions
txns = client.transactions.list(card_id=card.id)
for t in txns.data:
print(t.merchant.name, t.amount)const { privcards } = require('privcards');
const client = new privcards('sk_live_your_api_key');
// Create a card
const card = await client.cards.create({
binId: '491653',
amount: 500,
label: 'Ad Spend',
});
// Get 3DS OTPs
const challenges = await client.threeds.list({
cardId: card.id,
status: 'pending',
});
// Set up webhooks
await client.webhooks.create({
url: 'https://yourapp.com/hooks',
events: ['transaction.authorized', '3ds.challenge'],
});