{"openapi":"3.1.0","info":{"title":"First Kasa API","version":"1.1.0","description":"Yatırım ve çekim talepleri, durum sorgulama ve imzalı callback. Ayrıntılar: https://firstapi.duckdns.org/docs"},"servers":[{"url":"https://firstapi.duckdns.org"}],"paths":{"/api/deposit-start":{"post":{"summary":"Yatırım başlat","operationId":"depositStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["Process","MethodKey","UserId","NameSurname","Amount","Currency","Reference","HashCode"],"properties":{"Process":{"const":"DepositStart"},"MethodKey":{"type":"string","description":"Ödeme yöntemi anahtarı","maxLength":64},"UserId":{"type":"string","description":"Sitenizdeki kullanıcı kimliği","maxLength":80},"NameSurname":{"type":"string","description":"Kullanıcının adı soyadı","maxLength":120},"Amount":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},{"type":"number"}],"description":"En fazla 2 ondalık; imzadaki metinle aynı olmalı. Metin önerilir.","example":"150.50"},"Currency":{"type":"string","description":"ISO 4217 para birimi","pattern":"^[A-Z]{3}$","example":"TRY"},"Reference":{"type":"string","description":"Benzersiz işlem numaranız","maxLength":80},"ReturnUrl":{"type":"string","description":"Sonuç ekranındaki dönüş adresi","format":"uri"},"HashCode":{"type":"string","description":"md5(FirmaKodu + UserId + Reference + Amount), küçük harf hex","pattern":"^[0-9a-f]{32}$"}}}}}},"responses":{"200":{"description":"ApiStatus ok ise IframeUrl ve Token döner","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ApiStatus":{"const":"ok"},"ApiCode":{"const":"3001"},"Message":{"type":"string"},"IframeUrl":{"type":"string","format":"uri"},"Token":{"type":"string"}}},{"type":"object","properties":{"ApiStatus":{"const":"error"},"ApiCode":{"enum":["5010","5011"]},"Message":{"type":"string"}}}]}}}},"400":{"description":"Geçersiz JSON"},"429":{"description":"Hız sınırı aşıldı"}}}},"/api/withdrawal-start":{"post":{"summary":"Çekim başlat","operationId":"withdrawalStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["Process","MethodKey","UserId","NameSurname","AccountNumber","Amount","Currency","Reference","HashCode"],"properties":{"Process":{"const":"WithdrawalStart"},"MethodKey":{"type":"string","description":"Ödeme yöntemi anahtarı","maxLength":64},"UserId":{"type":"string","description":"Sitenizdeki kullanıcı kimliği","maxLength":80},"NameSurname":{"type":"string","description":"Kullanıcının adı soyadı","maxLength":120},"Amount":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},{"type":"number"}],"description":"En fazla 2 ondalık; imzadaki metinle aynı olmalı. Metin önerilir.","example":"150.50"},"Currency":{"type":"string","description":"ISO 4217 para birimi","pattern":"^[A-Z]{3}$","example":"TRY"},"Reference":{"type":"string","description":"Benzersiz işlem numaranız","maxLength":80},"AccountNumber":{"type":"string","description":"Müşterinin hesabı: IBAN (TR+24), cüzdan (8-20 rakam) veya kripto adresi (20-128)"},"HashCode":{"type":"string","description":"md5(FirmaKodu + UserId + Reference + Amount), küçük harf hex","pattern":"^[0-9a-f]{32}$"}}}}}},"responses":{"200":{"description":"ApiStatus ok ise Token döner","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ApiStatus":{"const":"ok"},"ApiCode":{"const":"3001"},"Message":{"type":"string"},"Token":{"type":"string"}}},{"type":"object","properties":{"ApiStatus":{"const":"error"},"ApiCode":{"enum":["5010","5011"]},"Message":{"type":"string"}}}]}}}},"400":{"description":"Geçersiz JSON"},"429":{"description":"Hız sınırı aşıldı"}}}},"/api/transaction-status":{"post":{"summary":"İşlem durumu sorgula","operationId":"transactionStatus","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["Process","MethodKey","Type","Reference","HashCode"],"properties":{"Process":{"const":"StatusQuery"},"MethodKey":{"type":"string","description":"Ödeme yöntemi anahtarı","maxLength":64},"Type":{"enum":["Deposit","Withdrawal"]},"Reference":{"type":"string","description":"Benzersiz işlem numaranız","maxLength":80},"HashCode":{"type":"string","description":"md5(FirmaKodu + Reference), küçük harf hex","pattern":"^[0-9a-f]{32}$"}}}}}},"responses":{"200":{"description":"Güncel durum","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ApiStatus":{"const":"ok"},"ApiCode":{"const":"3001"},"Type":{"enum":["Deposit","Withdrawal"]},"Reference":{"type":"string"},"UserId":{"type":"string"},"Amount":{"type":"string"},"Currency":{"type":"string"},"Status":{"enum":["Pending","Successful","Unsuccessful"]},"Message":{"type":"string"},"CreatedAt":{"type":"string"},"DecidedAt":{"type":["string","null"]},"Token":{"type":"string"}}},{"type":"object","properties":{"ApiStatus":{"const":"error"},"ApiCode":{"enum":["5010","5011"]},"Message":{"type":"string"}}}]}}}}}}}},"webhooks":{"callback":{"post":{"summary":"Sonuç bildirimi (callback adresinize gönderilir)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"Process":{"enum":["DepositReturn","WithdrawalReturn"]},"MethodKey":{"type":"string"},"UserId":{"type":"string"},"NameSurname":{"type":"string"},"Amount":{"description":"Yatırımda sayı, çekimde metin","oneOf":[{"type":"number"},{"type":"string"}]},"Currency":{"type":"string"},"Reference":{"type":"string"},"Status":{"enum":["Successful","Unsuccessful"]},"Message":{"type":"string"},"Date":{"type":"string","description":"YYYY-MM-DD HH:mm:ss, İstanbul"},"Token":{"type":"string"},"HashCode":{"type":"string","description":"md5(FirmaKodu + UserId + Reference + Amount (talepteki metin)), küçük harf hex","pattern":"^[0-9a-f]{32}$"},"Test":{"type":"boolean","description":"Yalnızca panelden gönderilen testte true"}}}}}},"responses":{"200":{"description":"10 saniye içinde 2xx dönün"}}}}}}