{
  "info": {
    "_postman_id": "a1b2c3d4-0000-4000-8000-000000000001",
    "name": "api-yos (YÖS / TPP)",
    "description": "api-yos public REST API — koddan birebir üretilmiş koleksiyon (controller'lar SSoT).\n\nKimlik doğrulama: JWT Bearer. Token yok — 'Auth > Register' UserKey+CustomerNo + 'X-App-Key' header ile çağrılır ve accessToken/refreshToken döner (aynı UserKey/CustomerNo ile tekrar çağırınca kullanıcı upsert edilir, yeni token verilir → login yerine geçer). Test script token'i environment'a yazar. Koleksiyon seviyesinde Bearer {{accessToken}} tanımlı.\n\nAkış: 1) Auth > Register (X-App-Key set et; token yazılır). 2) HHS connections > Create ile rıza başlat; dönen authorizationUrl'i onayla (HHS onay ekranı / admin). Bağlantı 'connected' olunca. 3) Accounts/Cards/Payments uçlarını çağır. ?fresh=true → canlı senkron (kullanıcı-present).\n\nCallback query paramları ÖHVPS TR wire adlarıdır: drmKod (state), rizaDrm (consentStatus), rizaNo (consentReference), rizaTip (consentType), yetKod (authorizationCode), rizaIptDtyKod (cancelDetailCode). Callback'ler AllowAnonymous (banka çağırır).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{accessToken}}",
        "type": "string"
      }
    ]
  },
  "event": [],
  "variable": [],
  "item": [
    {
      "name": "Auth",
      "description": "Kayıt / token yenileme / çıkış / profil. Register X-App-Key header ister ve accessToken+refreshToken yazar (login yerine de geçer).",
      "item": [
        {
          "name": "Register (token al)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-App-Key",
                "value": "{{appKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "tr"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/register",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "register"
              ]
            },
            "description": "AllowAnonymous. X-App-Key header ZORUNLU. userKey + customerNo ZORUNLU (email/şifre YOK). Kullanıcı (application, userKey, customerNo) ile upsert edilir; her çağrı yeni accessToken+refreshToken üretir — bu yüzden aynı zamanda 'login' işlevi görür.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userKey\": \"{{userKey}}\",\n  \"customerNo\": \"{{customerNo}}\",\n  \"displayName\": \"Postman User\",\n  \"preferredLocale\": \"tr\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.accessToken) pm.environment.set('accessToken', j.accessToken);",
                  "if (j.refreshToken) pm.environment.set('refreshToken', j.refreshToken);",
                  "pm.test('token alindi', () => pm.expect(j.accessToken).to.be.a('string'));"
                ]
              }
            }
          ]
        },
        {
          "name": "Refresh",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/refresh",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "refresh"
              ]
            },
            "description": "AllowAnonymous. Yenileme token'i ile yeni accessToken+refreshToken (eski refresh token'lar iptal edilir).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refreshToken\": \"{{refreshToken}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.accessToken) pm.environment.set('accessToken', j.accessToken);",
                  "if (j.refreshToken) pm.environment.set('refreshToken', j.refreshToken);"
                ]
              }
            }
          ]
        },
        {
          "name": "Logout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/logout",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "logout"
              ]
            },
            "description": "Bearer gerekir. Kullanıcının tüm yenileme token'lerini iptal eder. 204 döner.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refreshToken\": \"{{refreshToken}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Me",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/auth/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "auth",
                "me"
              ]
            },
            "description": "Oturumdaki kullanicinin bilgileri (UserResponse)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "HHS (bankalar)",
      "description": "Baglanilabilir banka registry. Bearer gerekir.",
      "item": [
        {
          "name": "List HHS",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs"
              ]
            },
            "description": "Etkin bankalar (HhsListResponse)."
          },
          "response": []
        },
        {
          "name": "Get HHS by code",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs/{{hhsCode}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs",
                "{{hhsCode}}"
              ]
            },
            "description": "Tek banka (HhsResponse). Route param: hhsCode."
          },
          "response": []
        }
      ]
    },
    {
      "name": "HHS connections (rizalar)",
      "description": "Banka baglama (riza) akisi. Bearer gerekir (callback HARIC).",
      "item": [
        {
          "name": "List connections",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections"
              ]
            },
            "description": "Kullanicinin baglantilari (HhsConnectionListResponse)."
          },
          "response": []
        },
        {
          "name": "Create connection",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections"
              ]
            },
            "description": "Yeni riza. hhsCode ve identityValue ARTIK OPSIYONEL (CreateHhsConnectionRequest). identityType ZORUNLU (tckn|vkn|mno|ykn|pno). permissions ZORUNLU (snake_case OhvpsPermission degerleri). gkdMethod: redirect|decoupled (default redirect). Decoupled icin decoupledIdentifierType (tckn|ykn|mno|pno|gsm|iban) + decoupledIdentifierValue. accessDurationDays ZORUNLU (min 1 gun; bireysel/tckn ~6 ay, kurumsal/vkn ~12 ay ust sinir). Yanit HhsConnectionResponse (authorizationUrl icerir); test script id + authorizationUrl yazar. consumerSuccessUrl / consumerErrorUrl OPSIYONEL istek-basi yonlendirme URL'leri: host uygulamanin izin verilen yonlendirme host listesinde olmali (open-redirect korumasi), aksi 422 error.redirect_url.host_not_allowed; bicimsiz/http URL 400 error.redirect_url.invalid. Verilmezse ortam-degiskeni URL'lerine (fallback) donulur.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"hhsCode\": \"{{hhsCode}}\",\n  \"identityType\": \"tckn\",\n  \"identityValue\": \"{{identityValue}}\",\n  \"personIdentityValue\": null,\n  \"permissions\": [\n    \"basic_account\",\n    \"detailed_account\",\n    \"balance\",\n    \"basic_transaction\",\n    \"detailed_transaction\",\n    \"card_info\",\n    \"detailed_card_info\",\n    \"card_transaction\"\n  ],\n  \"gkdMethod\": \"redirect\",\n  \"decoupledIdentifierType\": null,\n  \"decoupledIdentifierValue\": null,\n  \"accessDurationDays\": 90,\n  \"consumerSuccessUrl\": \"https://www.openbankingturkey.com/open-banking/accounts?status=success\",\n  \"consumerErrorUrl\": \"https://www.openbankingturkey.com/open-banking/accounts?status=error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.id) pm.environment.set('hhsConnectionId', j.id);",
                  "if (j.authorizationUrl) pm.environment.set('authorizationUrl', j.authorizationUrl);"
                ]
              }
            }
          ]
        },
        {
          "name": "Get connection by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections/{{hhsConnectionId}}?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections",
                "{{hhsConnectionId}}"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Baglanti detayi (HhsConnectionResponse). ?fresh=true canli durum senkronu."
          },
          "response": []
        },
        {
          "name": "Complete by id (callback tamamla)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections/{{hhsConnectionId}}/callback",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections",
                "{{hhsConnectionId}}",
                "callback"
              ]
            },
            "description": "Bearer gerekir. Onay sonrasi baglantiyi id ile senkron tamamla (CompleteById). state-tabanli callback yerine kullanici-present tamamlama."
          },
          "response": []
        },
        {
          "name": "Callback (GKD redirect)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections/callback?drmKod={{stateCode}}&rizaDrm=Y&rizaNo=&rizaTip=&yetKod=&rizaIptDtyKod=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections",
                "callback"
              ],
              "query": [
                {
                  "key": "drmKod",
                  "value": "{{stateCode}}",
                  "description": "state (StateCode)"
                },
                {
                  "key": "rizaDrm",
                  "value": "Y",
                  "description": "consentStatus"
                },
                {
                  "key": "rizaNo",
                  "value": "",
                  "description": "consentReference"
                },
                {
                  "key": "rizaTip",
                  "value": "",
                  "description": "consentType"
                },
                {
                  "key": "yetKod",
                  "value": "",
                  "description": "authorizationCode"
                },
                {
                  "key": "rizaIptDtyKod",
                  "value": "",
                  "description": "cancelDetailCode"
                }
              ]
            },
            "description": "AllowAnonymous. Banka onay donusu (GKD redirect). Normalde bankanin cagirdigi uc. success/error redirect URL konfigure edilmisse 302, degilse HhsConnectionResponse doner.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        },
        {
          "name": "Delete connection",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/hhs-connections/{{hhsConnectionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "hhs-connections",
                "{{hhsConnectionId}}"
              ]
            },
            "description": "Rizayi iptal et. 204 doner."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Accounts (hesaplar)",
      "description": "Bagli tum bankalardan hesaplar. Bearer gerekir.",
      "item": [
        {
          "name": "List accounts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/accounts?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "accounts"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Tum hesaplar (AccountListResponse). ?fresh=true canli senkron (kotasiz)."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "const a = (j.accounts||j.items||[])[0];",
                  "if (a && a.id) pm.environment.set('accountId', a.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Get account by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/accounts/{{accountId}}?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "accounts",
                "{{accountId}}"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Tek hesap (AccountResponse)."
          },
          "response": []
        },
        {
          "name": "Account transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/accounts/{{accountId}}/transactions?cursor=&pageSize=20&startDate=&endDate=&minAmount=&maxAmount=&direction=debit&fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "accounts",
                "{{accountId}}",
                "transactions"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "description": "keyset imlec (bir sonraki sayfanin nextCursor'i)",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "startDate",
                  "value": "",
                  "description": "ISO 8601 DateTimeOffset",
                  "disabled": true
                },
                {
                  "key": "endDate",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "minAmount",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "maxAmount",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "debit",
                  "description": "debit|credit|neutral",
                  "disabled": true
                },
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Islem gecmisi (TransactionListResponse, keyset/cursor sayfalama)."
          },
          "response": []
        },
        {
          "name": "Refresh accounts",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/accounts/refresh",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "accounts",
                "refresh"
              ]
            },
            "description": "Hesap/bakiye yenilemeyi elle tetikle. 202 Accepted."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Cards (kartlar)",
      "description": "Kartlar + detay/islem/ekstre. Bearer gerekir.",
      "item": [
        {
          "name": "List cards",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Tum kartlar (CardListResponse)."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "const c = (j.cards||j.items||[])[0];",
                  "if (c && c.id) pm.environment.set('cardId', c.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Get card by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards/{{cardId}}?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards",
                "{{cardId}}"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Tek kart (CardResponse)."
          },
          "response": []
        },
        {
          "name": "Card detail",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards/{{cardId}}/detail?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards",
                "{{cardId}}",
                "detail"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Limit / borc / ekstre tipi (CardDetailResponse)."
          },
          "response": []
        },
        {
          "name": "Card transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards/{{cardId}}/transactions?cursor=&pageSize=20&startDate=&endDate=&minAmount=&maxAmount=&direction=debit&fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards",
                "{{cardId}}",
                "transactions"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "20",
                  "disabled": true
                },
                {
                  "key": "startDate",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "endDate",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "minAmount",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "maxAmount",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "debit",
                  "description": "debit|credit|neutral",
                  "disabled": true
                },
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Kart islem gecmisi (CardTransactionListResponse, keyset/cursor sayfalama)."
          },
          "response": []
        },
        {
          "name": "Card statements (donemler)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards/{{cardId}}/statements?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards",
                "{{cardId}}",
                "statements"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Ekstre donemleri (CardStatementPeriodsResponse)."
          },
          "response": []
        },
        {
          "name": "Card statement transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/cards/{{cardId}}/statement-transactions?periodValue=0&fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cards",
                "{{cardId}}",
                "statement-transactions"
              ],
              "query": [
                {
                  "key": "periodValue",
                  "value": "0",
                  "description": "donem degeri; verilmezse gecerli donem (CardPeriodCurrent)",
                  "disabled": true
                },
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Belirli ekstre donemi islemleri (CardPeriodTransactionsResponse)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Payment orders (odeme emri)",
      "description": "Tek seferlik odeme. Bearer gerekir (callback HARIC).",
      "item": [
        {
          "name": "Create payment order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment-orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "payment-orders"
              ]
            },
            "description": "CreatePaymentOrderRequest. hhsCode + identityType + identityValue + recipientName + recipientIban + amount + currency ZORUNLU. senderAccountId VEYA senderIban opsiyonel gonderen; ikisi de yoksa banka belirler. paymentPurposeCode (odmAmc, '01'..'22'|'99'; default '07'). Yanit PaymentOrderResponse (authorizationUrl icerir). consumerSuccessUrl / consumerErrorUrl OPSIYONEL istek-basi yonlendirme URL'leri: host uygulamanin izin verilen yonlendirme host listesinde olmali (open-redirect korumasi), aksi 422 error.redirect_url.host_not_allowed; bicimsiz/http URL 400 error.redirect_url.invalid. Verilmezse ortam-degiskeni URL'lerine (fallback) donulur.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"hhsCode\": \"{{hhsCode}}\",\n  \"identityType\": \"tckn\",\n  \"identityValue\": \"{{identityValue}}\",\n  \"gkdMethod\": \"redirect\",\n  \"senderAccountId\": null,\n  \"senderIban\": null,\n  \"recipientName\": \"{{recipientName}}\",\n  \"recipientIban\": \"{{recipientIban}}\",\n  \"amount\": 42.50,\n  \"currency\": \"TRY\",\n  \"description\": \"Postman test\",\n  \"purposeCode\": null,\n  \"paymentPurposeCode\": \"07\",\n  \"consumerSuccessUrl\": \"https://www.openbankingturkey.com/open-banking/payments?status=success\",\n  \"consumerErrorUrl\": \"https://www.openbankingturkey.com/open-banking/payments?status=error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.id) pm.environment.set('paymentOrderId', j.id);",
                  "if (j.authorizationUrl) pm.environment.set('authorizationUrl', j.authorizationUrl);"
                ]
              }
            }
          ]
        },
        {
          "name": "List payment orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment-orders?cursor=&pageSize=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "payment-orders"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "20",
                  "disabled": true
                }
              ]
            },
            "description": "PaymentOrderListResponse (keyset/cursor sayfalama)."
          },
          "response": []
        },
        {
          "name": "Get payment order by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment-orders/{{paymentOrderId}}?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "payment-orders",
                "{{paymentOrderId}}"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Durum (PaymentOrderResponse). ?fresh=true canli durum."
          },
          "response": []
        },
        {
          "name": "Callback (GKD)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment-orders/callback?drmKod={{stateCode}}&rizaDrm=Y&rizaNo=&rizaTip=&yetKod=&rizaIptDtyKod=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "payment-orders",
                "callback"
              ],
              "query": [
                {
                  "key": "drmKod",
                  "value": "{{stateCode}}",
                  "description": "state"
                },
                {
                  "key": "rizaDrm",
                  "value": "Y",
                  "description": "consentStatus"
                },
                {
                  "key": "rizaNo",
                  "value": "",
                  "description": "consentReference"
                },
                {
                  "key": "rizaTip",
                  "value": "",
                  "description": "consentType"
                },
                {
                  "key": "yetKod",
                  "value": "",
                  "description": "authorizationCode"
                },
                {
                  "key": "rizaIptDtyKod",
                  "value": "",
                  "description": "cancelDetailCode"
                }
              ]
            },
            "description": "AllowAnonymous. Banka odeme onay donusu.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Recurring payments (duzenli odeme)",
      "description": "Duzenli odeme talimati. Bearer gerekir (callback HARIC).",
      "item": [
        {
          "name": "Create recurring payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments"
              ]
            },
            "description": "CreateRecurringPaymentRequest. hhsCode + identityType + identityValue + recipientName + recipientIban ZORUNLU. amount NULL olabilir (tutar HHS onay ekraninda secilir; recurring rizada tlmtTtr yok). frequency: daily|weekly|monthly|other. endDate yalnizca frequency=other icin gerekir (digerlerinde startDate+frequency+paymentCount'tan turetilir). Yanit RecurringPaymentResponse. consumerSuccessUrl / consumerErrorUrl OPSIYONEL istek-basi yonlendirme URL'leri: host uygulamanin izin verilen yonlendirme host listesinde olmali (open-redirect korumasi), aksi 422 error.redirect_url.host_not_allowed; bicimsiz/http URL 400 error.redirect_url.invalid. Verilmezse ortam-degiskeni URL'lerine (fallback) donulur.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"hhsCode\": \"{{hhsCode}}\",\n  \"identityType\": \"tckn\",\n  \"identityValue\": \"{{identityValue}}\",\n  \"gkdMethod\": \"redirect\",\n  \"senderAccountId\": null,\n  \"recipientName\": \"{{recipientName}}\",\n  \"recipientIban\": \"{{recipientIban}}\",\n  \"amount\": 100.00,\n  \"currency\": \"TRY\",\n  \"description\": \"Postman test\",\n  \"purposeCode\": null,\n  \"paymentPurposeCode\": \"07\",\n  \"frequency\": \"monthly\",\n  \"paymentCount\": 6,\n  \"instructionRemark\": \"Kira\",\n  \"startDate\": \"2026-08-01T00:00:00+03:00\",\n  \"endDate\": null,\n  \"consumerSuccessUrl\": \"https://www.openbankingturkey.com/open-banking/recurring-payments?status=success\",\n  \"consumerErrorUrl\": \"https://www.openbankingturkey.com/open-banking/recurring-payments?status=error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.id) pm.environment.set('recurringPaymentId', j.id);",
                  "if (j.authorizationUrl) pm.environment.set('authorizationUrl', j.authorizationUrl);"
                ]
              }
            }
          ]
        },
        {
          "name": "List recurring payments",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments?cursor=&pageSize=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "20",
                  "disabled": true
                }
              ]
            },
            "description": "RecurringPaymentListResponse (keyset/cursor sayfalama)."
          },
          "response": []
        },
        {
          "name": "Get recurring payment by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments/{{recurringPaymentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments",
                "{{recurringPaymentId}}"
              ]
            },
            "description": "RecurringPaymentResponse. (Bu uctc ?fresh param YOK.)"
          },
          "response": []
        },
        {
          "name": "Recurring payment plan",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments/{{recurringPaymentId}}/plan?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments",
                "{{recurringPaymentId}}",
                "plan"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Odeme plani/takvim (RecurringPaymentPlanResponse)."
          },
          "response": []
        },
        {
          "name": "Callback (GKD)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments/callback?drmKod={{stateCode}}&rizaDrm=Y&rizaNo=&rizaTip=&yetKod=&rizaIptDtyKod=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments",
                "callback"
              ],
              "query": [
                {
                  "key": "drmKod",
                  "value": "{{stateCode}}",
                  "description": "state"
                },
                {
                  "key": "rizaDrm",
                  "value": "Y",
                  "description": "consentStatus"
                },
                {
                  "key": "rizaNo",
                  "value": "",
                  "description": "consentReference"
                },
                {
                  "key": "rizaTip",
                  "value": "",
                  "description": "consentType"
                },
                {
                  "key": "yetKod",
                  "value": "",
                  "description": "authorizationCode"
                },
                {
                  "key": "rizaIptDtyKod",
                  "value": "",
                  "description": "cancelDetailCode"
                }
              ]
            },
            "description": "AllowAnonymous. Banka onay donusu.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        },
        {
          "name": "Cancel recurring payment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/recurring-payments/{{recurringPaymentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "recurring-payments",
                "{{recurringPaymentId}}"
              ]
            },
            "description": "Talimati iptal et. 204 doner."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Forward-dated payments (ileri tarihli)",
      "description": "Ileri tarihli odeme (yarin - 1 yil arasi). Bearer gerekir (callback HARIC).",
      "item": [
        {
          "name": "Create forward-dated payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments"
              ]
            },
            "description": "CreateForwardDatedPaymentRequest. hhsCode + identityType + identityValue + recipientName + recipientIban + amount + currency + scheduledDate ZORUNLU. Yanit ForwardDatedPaymentResponse (authorizationUrl icerir). consumerSuccessUrl / consumerErrorUrl OPSIYONEL istek-basi yonlendirme URL'leri: host uygulamanin izin verilen yonlendirme host listesinde olmali (open-redirect korumasi), aksi 422 error.redirect_url.host_not_allowed; bicimsiz/http URL 400 error.redirect_url.invalid. Verilmezse ortam-degiskeni URL'lerine (fallback) donulur.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"hhsCode\": \"{{hhsCode}}\",\n  \"identityType\": \"tckn\",\n  \"identityValue\": \"{{identityValue}}\",\n  \"gkdMethod\": \"redirect\",\n  \"senderAccountId\": null,\n  \"recipientName\": \"{{recipientName}}\",\n  \"recipientIban\": \"{{recipientIban}}\",\n  \"amount\": 250.00,\n  \"currency\": \"TRY\",\n  \"description\": \"Postman test\",\n  \"purposeCode\": null,\n  \"paymentPurposeCode\": \"07\",\n  \"scheduledDate\": \"2026-09-15T00:00:00+03:00\",\n  \"consumerSuccessUrl\": \"https://www.openbankingturkey.com/open-banking/forward-dated-payments?status=success\",\n  \"consumerErrorUrl\": \"https://www.openbankingturkey.com/open-banking/forward-dated-payments?status=error\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.id) pm.environment.set('forwardDatedPaymentId', j.id);",
                  "if (j.authorizationUrl) pm.environment.set('authorizationUrl', j.authorizationUrl);"
                ]
              }
            }
          ]
        },
        {
          "name": "List forward-dated payments",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments?cursor=&pageSize=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "20",
                  "disabled": true
                }
              ]
            },
            "description": "ForwardDatedPaymentListResponse (keyset/cursor sayfalama)."
          },
          "response": []
        },
        {
          "name": "Get forward-dated payment by id",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments/{{forwardDatedPaymentId}}?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments",
                "{{forwardDatedPaymentId}}"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "ForwardDatedPaymentResponse."
          },
          "response": []
        },
        {
          "name": "Forward-dated payment status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments/{{forwardDatedPaymentId}}/status?fresh=true",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments",
                "{{forwardDatedPaymentId}}",
                "status"
              ],
              "query": [
                {
                  "key": "fresh",
                  "value": "true",
                  "disabled": true
                }
              ]
            },
            "description": "Durum (ForwardDatedPaymentResponse). ?fresh=true canli durum."
          },
          "response": []
        },
        {
          "name": "Callback (GKD)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments/callback?drmKod={{stateCode}}&rizaDrm=Y&rizaNo=&rizaTip=&yetKod=&rizaIptDtyKod=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments",
                "callback"
              ],
              "query": [
                {
                  "key": "drmKod",
                  "value": "{{stateCode}}",
                  "description": "state"
                },
                {
                  "key": "rizaDrm",
                  "value": "Y",
                  "description": "consentStatus"
                },
                {
                  "key": "rizaNo",
                  "value": "",
                  "description": "consentReference"
                },
                {
                  "key": "rizaTip",
                  "value": "",
                  "description": "consentType"
                },
                {
                  "key": "yetKod",
                  "value": "",
                  "description": "authorizationCode"
                },
                {
                  "key": "rizaIptDtyKod",
                  "value": "",
                  "description": "cancelDetailCode"
                }
              ]
            },
            "description": "AllowAnonymous. Banka onay donusu.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        },
        {
          "name": "Cancel forward-dated payment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/forward-dated-payments/{{forwardDatedPaymentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "forward-dated-payments",
                "{{forwardDatedPaymentId}}"
              ]
            },
            "description": "Ileri tarihli odemeyi iptal et. 204 doner."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Health",
      "description": "Saglik problari (AllowAnonymous, token gerekmez).",
      "item": [
        {
          "name": "Liveness",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/health/live",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "health",
                "live"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        },
        {
          "name": "Readiness",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/health/ready",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "health",
                "ready"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Batch (ic) — bilgi amacli",
      "description": "Batch-api (apps/batch) uclari — api-yos DEGIL. olay-bildirim bankadan gelir (JWS imzali); internal/* uclari api-yos'un cagirdigi X-Internal-Secret RPC'leridir. Dogrudan cagrilmaz, bilgi amacli.",
      "item": [
        {
          "name": "Receive event (olay-bildirim)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{batchBaseUrl}}/api/v1/ohvps/events",
              "host": [
                "{{batchBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "ohvps",
                "events"
              ]
            },
            "description": "OHVPS olay webhook'u (normalde banka cagirir, JWS imzali).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"katilimciBlg\": {\n    \"hhsKod\": \"{{hhsCode}}\",\n    \"yosKod\": \"{{yosCode}}\"\n  },\n  \"olaylar\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        },
        {
          "name": "Internal live-query",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Internal-Secret",
                "value": "{{internalSecret}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{batchBaseUrl}}/internal/live-query",
              "host": [
                "{{batchBaseUrl}}"
              ],
              "path": [
                "internal",
                "live-query"
              ]
            },
            "description": "api-yos'un senkron canli-okuma icin cagirdigi ic uc. Diger internal/* uclar: consent-create, authorization-complete, recurring-authorization-complete, payment-order-authorization-complete, forward-dated-authorization-complete, consent-cancel.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"connectionId\": \"{{hhsConnectionId}}\",\n  \"kind\": \"accounts\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        }
      ]
    }
  ]
}
