> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkesta.com.tr/llms.txt
> Use this file to discover all available pages before exploring further.

# 3D Secure Ödeme Başlat

> 3D Secure güvenlik protokolü ile ödeme işlemini başlatır

## 🔐 3D Secure Ödeme Başlat (3D Secure Init)

3D Secure güvenlik protokolü ile ödeme işlemini başlatır. Kullanıcıya banka tarafından gönderilen HTML form döndürülür.

**`POST`** `https://api-test.fincraft.com.tr/api/v1/payments/3d/init`

<Warning>
  **3D Secure Özellikleri**

  * Visa Secure, Mastercard SecureCode, Amex SafeKey desteği
  * SMS, Email, Mobile App doğrulama yöntemleri
  * Risk bazlı kimlik doğrulama (Risk-Based Authentication)
  * Frictionless ve Challenge akışları
  * PCI DSS Level 1 uyumluluğu
</Warning>

## Request Body

```json theme={null}
{
  "correlationId": "string",
  "referenceId": "uuid",
  "amount": 100.50,
  "finalAmount": 100.50,
  "walletAmount": 0.0,
  "installment": 1,
  "clientIpAddress": "192.168.1.1",
  "walletMemberId": "string",
  "currency": "TRY",
  "transactionType": "AUTH",
  "card": {
    "cardHolderName": "John Doe",
    "cardNumber": "1234567890123456",
    "expireYear": "25",
    "expireMonth": "12",
    "cvc": "123"
  },
  "products": [
    {
      "name": "Ürün Adı",
      "externalId": "string",
      "price": 100.50,
      "subMerchantPrice": 95.0,
      "subMerchantMemberId": "string"
    }
  ],
  "additionalParams": {},
  "callbackUrl": "https://example.com/callback",
  "reward": null
}
```

## Ek Parametreler (3D Secure için)

| Parametre     | Tip    | Zorunlu | Validation      | Açıklama                                                                                     |
| ------------- | ------ | ------- | --------------- | -------------------------------------------------------------------------------------------- |
| `callbackUrl` | String | Evet    | @NotBlank, @URL | 3D Secure doğrulama tamamlandıktan sonra kullanıcının yönlendirileceği URL. HTTPS olmalıdır. |

## Response Body (HTML Form)

```html theme={null}
<!DOCTYPE html>
<html>
<head>
    <title>3D Secure Doğrulama</title>
</head>
<body>
    <form id="3dsForm" method="POST" action="https://3dsecure.bank.com/verify">
        <input type="hidden" name="MD" value="merchant_data" />
        <input type="hidden" name="PaReq" value="payment_request" />
        <input type="hidden" name="TermUrl" value="https://api.fincraft.com.tr/callback" />
    </form>
    <script>
        document.getElementById('3dsForm').submit();
    </script>
</body>
</html>
```

## cURL Örneği

```bash theme={null}
curl -X POST https://api-test.fincraft.com.tr/api/v1/payments/3d/init \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceId": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 100.50,
    "finalAmount": 100.50,
    "walletAmount": 0.0,
    "installment": 1,
    "clientIpAddress": "192.168.1.1",
    "currency": "TRY",
    "transactionType": "AUTH",
    "callbackUrl": "https://yourdomain.com/payment/callback",
    "card": {
      "cardHolderName": "John Doe",
      "cardNumber": "1234567890123456",
      "expireYear": "25",
      "expireMonth": "12",
      "cvc": "123"
    },
    "products": [
      {
        "name": "Test Ürünü",
        "externalId": "PROD001",
        "price": 100.50
      }
    ]
  }'
```

<Check>
  **Önemli Notlar**

  * Callback URL mutlaka HTTPS olmalıdır
  * HTML form otomatik olarak submit edilir
  * 3D Secure sadece destekleyen kartlarda çalışır
  * Doğrulama süresi genelde 5-10 dakikadır
  * Başarısız doğrulamalarda işlem otomatik iptal edilir
</Check>
