---
title: "App Store sunucu bildirimlerini backend'inizden Adapty'ye iletin"
description: "Backend'inizin URL'sini App Store Connect'te tutması gerekiyorsa, Apple'ın sunucu bildirimlerini Adapty'ye değiştirmeden gönderin; böylece Adapty abonelik olaylarını alabilir."
---

> **AI agents**: to search Adapty docs faster and with fewer tokens, install the Adapty skills: `npx adapty skills install --yes`

Arka ucunuzun URL'sinin App Store Connect'te kalması gerekiyorsa, App Store sunucu bildirimlerini arka ucunuzdan Adapty'ye değişiklik yapmadan iletin. Arka ucunuzun URL'sinin App Store Connect'te olması gerekmiyorsa, bunun yerine [Adapty'de arka ucunuza yönlendirme kurulumu yapın](enable-app-store-server-notifications#raw-events-forwarding). Bu yöntem için kod yazmaya gerek yoktur.

Adapty, arka ucunuzdan gelen bildirimleri Apple doğrudan göndermiş gibi işler. [Refund Saver](refund-saver) ile Adapty, bunlar arasındaki iade taleplerini yanıtlamaya devam eder.

Eğer backend'iniz Google Play'den gerçek zamanlı geliştirici bildirimlerini kendi Pub/Sub konusu aracılığıyla alıyorsa, bunları Adapty'ye iletmek için herhangi bir kod yazmanıza gerek yoktur. [O konuya Adapty için bir push aboneliği ekleyin](enable-real-time-developer-notifications-rtdn#send-notifications-to-two-adapty-apps).

App Store sunucu bildirimlerini Adapty'ye iletmek için:

1. Adapty'de bağladığınız uygulamayı açın: her Adapty uygulamasının kendine ait bir bildirim URL'si vardır. [**App settings** > **iOS SDK**](https://app.adapty.io/settings/ios-sdk) sayfasına gidin. **App Store server notifications** bölümünde, **URL for App Store server notifications** alanındaki URL'yi kopyalayın.
2. Backend'inizde, Apple'dan gelen her bildirimi kopyaladığınız URL'ye gönderin. Her istekte:

   - Apple'dan gelen body'yi değiştirmeden bırakın: `{"signedPayload": "…"}`.
   - `Content-Type: application/json` başlığını ekleyin.
   - `Authorization` başlığı eklemeyin.

   Adapty bildirimlerinizi backend'inize de iletiyorsa, bunları tekrar Adapty'e göndermeyin.

İşte farklı programlama dilleri için örnekler:

<Tabs groupId="current-os" queryString>
<TabItem value="python" label="Python" default>

```python showLineNumbers

url = "https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/" # bu URL'yi değiştirmeyi unutmayın

payload = '{"signedPayload":"eyJhbGciOiJFUzI1NiIs..."}' # Apple'ın istek gövdesi, değiştirilmemiş

headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
```

</TabItem>
<TabItem value="javascript" label="Javascript" default>

```javascript  showLineNumbers
const axios = require('axios');

const url = 'https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/'; // don't forget to replace this URL

const payload = '{"signedPayload":"eyJhbGciOiJFUzI1NiIs..."}'; // Apple's request body, unchanged

const config = {
  method: 'post',
  url: url,
  headers: {
    'Content-Type': 'application/json'
  },
  data: payload,
};

const response = await axios(config);
```

</TabItem>
<TabItem value="php" label="PHP" default>

```php  showLineNumbers
<?php
require_once 'HTTP/Request2.php';

$url = 'https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/'; // don't forget to replace this URL

$payload = '{"signedPayload":"eyJhbGciOiJFUzI1NiIs..."}'; // Apple's request body, unchanged

$request = new HTTP_Request2();
$request->setUrl($url);
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody($payload);
$response = $request->send();
```

</TabItem>
<TabItem value="ruby" label="Ruby" default>

```ruby  showLineNumbers
require "uri"
require "net/http"

url = URI("https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/") # don't forget to replace this URL

payload = '{"signedPayload":"eyJhbGciOiJFUzI1NiIs..."}' # Apple's request body, unchanged

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = payload

response = https.request(request)
```

</TabItem>
<TabItem value="java" label="Java" default>

```java showLineNumbers
String url = "https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/"; // don't forget to replace this URL

String payload = "{\"signedPayload\":\"eyJhbGciOiJFUzI1NiIs...\"}"; // Apple's request body, unchanged

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, payload);
Request request = new Request.Builder()
  .url(url)
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
```

</TabItem>
<TabItem value="go" label="Go" default>

  ```go showLineNumbers
package main

	"fmt"
	"strings"
	"net/http"
)

func main() {
	url := "https://api.adapty.io/api/v1/sdk/apple/webhook/123a258e62fad41bfa734f4b0dbcad45/" // Replace this with the actual URL

	payload := strings.NewReader(`{"signedPayload":"eyJhbGciOiJFUzI1NiIs..."}`) // Apple's request body, unchanged

	method := "POST"

	client := &http.Client{}
	req, err := http.NewRequest(method, url, payload)
	if err != nil {
		fmt.Println("Error creating request:", err)
		return
	}
	req.Header.Add("Content-Type", "application/json")

	res, err := client.Do(req)
	if err != nil {
		fmt.Println("Error sending request:", err)
		return
	}
	defer res.Body.Close()
}
  ```

</TabItem>  </Tabs>

`200` yanıtı, Adapty'nin bildirimi kullanabildiğini doğrulamaz. Adapty, imzalı payload'ı çözmeden önce yanıt verir. Bildirimlerin Adapty'ye ulaştığını doğrulamak için bir [sandbox satın alma](test-purchases-in-sandbox) işlemi gerçekleştirin. Ardından **App Store server notifications** bölümündeki [bildirim durumunun](enable-app-store-server-notifications#check-that-notifications-reach-adapty) **Active** olduğundan emin olun.