این API برای تطبیق شماره موبایل ارسال شده با شماره …
POST
استعلام
IBAN National Code Birthday Validation API
This API verifies whether an IBAN belongs to a person who has the provided national code and Jalali birth date. On success the wallet tariff is deducted and a match flag is returned from Sepal Yar.
The IBAN National Code Birthday Validation API checks whether a given IBAN belongs to a user identified by a national code and Jalali birth date. It is useful for preventing fraud, validating bank payouts, and enforcing KYC regulations.
On successful calls the wallet is charged, the Sepal Yar match flag is returned, and the request is logged with a unique reference.
Authentication
Authentication
This endpoint requires both the API token and the user's unique code.
The birth date must be Jalali (yyyyMMdd). Convert from Gregorian before calling the API.
Response Format
Response Format
Successful responses include a match flag plus Sepal Yar metadata:
request_ref: Unique request identifier
amount: Charged tariff (rial)
response_data.match: True when IBAN ownership is confirmed
response_time_ms: Upstream latency
Failures contain success: false and detailed error information.
Error Handling
Error Handling
Typical HTTP status codes:
400 Bad Request: Invalid payload (e.g. wrong Jalali format)
401 Unauthorized: Missing authentication headers
402 Payment Required: Insufficient wallet balance
422 Unprocessable Entity: The service rejected the parameters
502 Bad Gateway: Sepal Yar service outage or timeout
Best Practices
Best Practices
Validate national code and convert birth dates to Jalali yyyyMMdd on the client.
Cache successful matches when business rules allow to reduce repeated lookups.
Log the returned request_ref for auditing and dispute resolution.
Monitor wallet balance to prevent 402 responses.
Implement retry logic with exponential backoff for transient 5xx errors.
پارامترهای درخواست
پارامتر
نوع
اجباری
توضیحات
مثال
iban
String
اجباری
Iranian IBAN (Sheba) number. Must begin with IR and contain 26 characters when spaces are removed.
اعتبارسنجی: Must start with IR and contain 24 numeric characters afterwards.
IR110170000000219950976002
national_code
String
اجباری
National code / legal entity code / foreigner ID. Personal codes are 10 digits, legal entities 11 digits, and foreign IDs 12-15 digits.
اعتبارسنجی: Numeric only. Length 10, 11 or 12-15 digits depending on person type.
4640229534
birth_date
String
اجباری
Jalali birth date in yyyyMMdd format (for example 13790514). Client must convert from Gregorian if needed.
اعتبارسنجی: Numeric only. 8 digits. Valid Jalali month/day range.
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Token YOUR_AUTH_TOKEN");
client.DefaultRequestHeaders.Add("X-Unique-Code", "YOUR_UNIQUE_CODE");
var payload = new
{
iban = "IR110170000000219950976002",
national_code = "4640229534",
birth_date = "13790514"
};
var json = JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://inquiry.sepal.ir/api/services/iban-national-code-birthday-validation/",
content
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}