> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For full documentation content, see https://developers.alephant.io/llms-full.txt.

# Stripe Webhook

POST https://alephant.io/stripe/webhook

Receives and processes Stripe webhook events. Signature-verified; no JWT required.

Reference: https://developers.alephant.io/api-reference/saa-s-api/stripe/webhook

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: saas-openapi
  version: 1.0.0
paths:
  /stripe/webhook:
    post:
      operationId: webhook
      summary: Stripe Webhook
      description: >-
        Receives and processes Stripe webhook events. Signature-verified; no JWT
        required.
      tags:
        - subpackage_stripe
      parameters:
        - name: Stripe-Signature
          in: header
          description: Stripe signature
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
servers:
  - url: https://alephant.io
  - url: https://dev.alephant.io

```

## SDK Code Examples

```python
import requests

url = "https://alephant.io/stripe/webhook"

headers = {"Stripe-Signature": "Stripe-Signature"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://alephant.io/stripe/webhook';
const options = {method: 'POST', headers: {'Stripe-Signature': 'Stripe-Signature'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://alephant.io/stripe/webhook"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Stripe-Signature", "Stripe-Signature")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://alephant.io/stripe/webhook")

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

request = Net::HTTP::Post.new(url)
request["Stripe-Signature"] = 'Stripe-Signature'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://alephant.io/stripe/webhook")
  .header("Stripe-Signature", "Stripe-Signature")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://alephant.io/stripe/webhook', [
  'headers' => [
    'Stripe-Signature' => 'Stripe-Signature',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://alephant.io/stripe/webhook");
var request = new RestRequest(Method.POST);
request.AddHeader("Stripe-Signature", "Stripe-Signature");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Stripe-Signature": "Stripe-Signature"]

let request = NSMutableURLRequest(url: NSURL(string: "https://alephant.io/stripe/webhook")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```