Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.payven.com.tr/llms.txt

Use this file to discover all available pages before exploring further.

IBAN (International Bank Account Number) formatı mod-97 algoritmasıyla doğrulanır. Aynı zamanda banka kodu çözümlenir.

Endpoint

POST /api/v1/validation/iban

İstek

curl -X POST https://identity.payven.com.tr/api/v1/validation/iban \
  -H "Authorization: Bearer ..." \
  -H "Content-Type: application/json" \
  -d '{ "iban": "TR320010009999901234567890" }'

Yanıt

{
  "isSuccess": true,
  "data": {
    "isValid": true,
    "iban": "TR320010009999901234567890",
    "formattedIban": "TR32 0010 0099 9990 1234 5678 90",
    "country": "TR",
    "bank": {
      "id": "8e3f5c12-...",
      "code": "ZIRAAT",
      "name": "Ziraat Bankası",
      "branchCode": "0010"
    }
  }
}

Hata yanıtları

HTTPcodeAnlam
400VALIDATION_INVALID_IBAN_FORMATFormat yanlış (uzunluk, karakter)
400VALIDATION_INVALID_IBAN_CHECKSUMMod-97 checksum doğrulanamadı
400VALIDATION_UNSUPPORTED_COUNTRYTürkiye dışı IBAN — şu an TR desteklenmektedir

Tipik kullanım

Para Transferi entegrasyonunda alıcı hesabı kaydederken IBAN’ı doğrularsınız:
async function onIbanBlur(iban) {
  const cleaned = iban.replace(/\s/g, "").toUpperCase();

  const res = await fetch("/api/validation/iban", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ iban: cleaned }),
  });
  const { data, isSuccess, message } = await res.json();

  if (!isSuccess) {
    showError(message);
    return;
  }

  setRecipientBank(data.bank.name);
  setIbanFormatted(data.formattedIban);
}