التوثيق / مرجع الواجهة
التحقق من الآيبان
تتحقق من رقم الحساب المصرفي الدولي (IBAN) وتُرجع صيغه ومعلومات الدولة المصرفية.
نظرة عامة#
تفحص lookup/iban الآيبان الممرَّر في المعامل iban. تتأكد من رمز الدولة والطول وأرقام التحقق، ثم تُرجع isValid والآيبان بثلاث صيغ داخل formats (machine وhuman وobfuscated) وكائن country يضم الاسم ورموز ISO وIANA والعملة والبنك المركزي وهل الدولة في الاتحاد الأوروبي أو منطقة SEPA وطول الآيبان المتوقع وحالة SWIFT.
متى تستخدمه#
- لالتقاط الأخطاء الإملائية في نماذج السحب أو الاسترداد قبل فشل التحويل.
- للتأكد من توافق دولة البنك مع الدولة التي صرّح بها العميل.
- لتخزين آيبان منسّق ونظيف، أو عرض صيغة
obfuscatedفي واجهتك بدل الرقم الكامل.
قراءة النتيجة#
isValidهو الحكم. القيمة false تعني طولًا خاطئًا للدولة أو دولة غير معروفة أو فشل المجموع الاختباري، فاطلب من المستخدم إعادة الإدخال.formats.machineهي السلسلة المدمجة لقاعدة بياناتك وواجهات المصارف، وformats.humanتقسّمها إلى مجموعات من أربعة للعرض.country.isSEPAوcountry.isEUتساعدانك في تحديد قنوات التحويل والرسوم المنطبقة.- يحدد الحقل
bankالمصرف من رمز المصرف الوطني داخل الآيبان:codeوnameوnameArوswift(معmergedIntoإن كان المصرف قد اندمج لاحقًا في آخر، مثل سامبا في SNB). ويشمل السعودية والإمارات والكويت والبحرين وقطر والأردن، وقيمتهnullلبقية الدول وللرمز غير المعروف وللآيبان غير الصالح. - التحقق يعني ثلاثة أمور: سلامة الصيغة والطول للدولة، ونجاح المجموع الاختباري، والتعرف على رمز المصرف (حيث لدينا جدول). ولا يمكنه تأكيد وجود الحساب أو ملكيته للشخص؛ فلا نظام عام يستطيع ذلك لأنه يتطلب خدمة التحقق من الحسابات لدى المصرف نفسه. فأبقِ إجراءات التحقق المعتادة قبل الصرف.
ملاحظات#
- تُحتسب طلبًا واحدًا. وضع الاختبار يُرجع بيانات وهمية مجانًا دون أحداث.
- ليست ضمن الباقة القياسية؛ متاحة في التجربة والمميّزة والدفع حسب الاستخدام. وبدون صلاحية يصلك الخطأ 117 (
feature_not_available). - يمكن لـالقواعد المخصصة في مجموعة الآيبان اختبار الآيبان ودولته وصلاحيته وتعليمه كصالح أو غير صالح، وتُسرد النتيجة في
custom_rules_applied. - يُطلَق حدث
invalid_ibanللآيبان غير الصالح ويُرسل إلى الويب هوك. - القيمة المفقودة أو غير الصحيحة تُرجع الخطأ 122 (
invalid_iban) مع HTTP 200.
الطلب#
GET
https://gurdx.cretip.com/api/lookup/iban
- صادِق بمعامل key أو بترويسة Authorization: Bearer.
- تُحتسب طلباً واحداً.
- متاحة في: تجربة مجانية المميّزة الدفع حسب الاستخدام
المعاملات#
| الاسم | النوع | الوصف |
|---|---|---|
iban
مطلوب
استعلام |
string |
The International Bank Account Number (IBAN) you want to validate. Sample value: BE71096123456769, or BE71 0961 2345 6769.
|
تقبل كل خدمة أيضاً format, lang, mode, userID, callback. راجع الخيارات.
أمثلة برمجية#
curl -G "https://gurdx.cretip.com/api/lookup/iban" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "iban=SA0380000000608010167519"
<?php
$response = file_get_contents('https://gurdx.cretip.com/api/lookup/iban?'.http_build_query(['key' => 'YOUR_API_KEY', 'iban' => 'SA0380000000608010167519']));
$result = json_decode($response, true);
if ($result['status'] === 'success') {
print_r($result['data']);
} else {
echo $result['code'].': '.$result['description'];
}
const params = new URLSearchParams({"key":"YOUR_API_KEY","iban":"SA0380000000608010167519"});
const res = await fetch(`https://gurdx.cretip.com/api/lookup/iban?${params}`);
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.code, result.description);
}
import requests
res = requests.get("https://gurdx.cretip.com/api/lookup/iban", params={"key": "YOUR_API_KEY", "iban": "SA0380000000608010167519"})
result = res.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["code"], result["description"])
الاستجابة#
نجاح#
{
"data": {
"isValid": true,
"formats": {
"machine": "BE71096123456769",
"human": "BE71 0961 2345 6769",
"obfuscated": "BE** **** **** 6769"
},
"country": {
"name": "Belgium",
"IANA": "be",
"ISO3166": "BE",
"currency": "EUR",
"centralBank": {
"url": "http://www.nbb.be/",
"name": "National Bank of Belgium"
},
"membership": "eu_member",
"isEU": true,
"length": "16",
"isSEPA": true,
"swiftOfficial": true
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"bank": null
},
"status": "success",
"executionTime": 1
}خطأ#
تُسلَّم الأخطاء بحالة HTTP 200 — افحص دائماً حقل status.
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}حقول الاستجابة#
| الاسم | النوع | الوصف |
|---|---|---|
data.isValid |
boolean |
A boolean value that you can rely on to determine if the IBAN is valid or not. |
data.formats.machine |
string |
Machine format of the IBAN. |
data.formats.human |
string |
Human-readable format of the IBAN. |
data.formats.obfuscated |
string |
Obfuscated format of the IBAN. |
data.formats |
object |
— |
data.country.name |
string |
Country name where the issuing bank is located. |
data.country.IANA |
string |
The IANA of the country. |
data.country.ISO3166 |
string |
Country code in ISO3166 format.
|
data.country.currency |
string |
Currency of the country. |
data.country.centralBank.name |
string |
The name of the central bank of the issuing country. |
data.country.centralBank.url |
string |
The URL of the central bank of the issuing country. |
data.country.centralBank |
string |
— |
data.country.membership |
string |
Membership type of the bank. |
data.country.isEU |
boolean |
Determines whether the user is located within the European Union (EU) and is relevant for processing transactions or validations specific to EU countries. |
data.country.length |
string |
IBAN length in this country. |
data.country.isSEPA |
boolean |
Indicates whether the IBAN belongs to a country participating in the Single Euro Payments Area (SEPA) |
data.country.swiftOfficial |
boolean |
Typically indicates whether the IBAN corresponds to an official institution or entity that is part of the SWIFT network, which facilitates international financial transactions. |
data.country |
object |
— |
data.bank |
object|null |
The bank identified from the IBAN's national bank code (Saudi Arabia, UAE, Kuwait, Bahrain, Qatar, Jordan); null when unknown or the IBAN is invalid. |
data.bank.code |
string |
National bank code. |
data.bank.name |
string |
Bank name in English. |
data.bank.nameAr |
string |
Bank name in Arabic. |
data.bank.swift |
string|null |
SWIFT/BIC of the bank. |
data.bank.mergedInto |
string|null |
Set when the bank has merged into another one. |
data.custom_rules_applied.total |
integer |
The total number of custom rules applied to this request. |
data.custom_rules_applied.rules.id |
string |
The rule ID as shown in the dashboard (e.g: CR104).
|
data.custom_rules_applied.rules.title |
string |
The rule title you set when creating the rule. |
data.custom_rules_applied.rules |
object |
The custom rules applied to this request, learn more. |
data.custom_rules_applied |
object |
The custom rules applied to this request, learn more. |
data.status |
string |
The response status. Expected values: success, or error.
|
data.executionTime |
integer |
Time spent in milliseconds to process the data. |
data |
object |
— |
وجدت خطأ؟ أخبرنا عبر صفحة التواصل. تواصل معنا