Skip to content

Latest commit

 

History

History
135 lines (90 loc) · 3.61 KB

File metadata and controls

135 lines (90 loc) · 3.61 KB

delete

Delete a webhook endpoint

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

API Endpoint: DELETE /v1/webhook_endpoints/{webhook_endpoint}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.webhook_endpoints.delete(webhook_endpoint="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.webhook_endpoints.delete(webhook_endpoint="string")

list

List all webhook endpoints

Returns a list of your webhook endpoints.

API Endpoint: GET /v1/webhook_endpoints

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.webhook_endpoints.list()

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.webhook_endpoints.list()

get

Retrieve a webhook endpoint

Retrieves the webhook endpoint with the given ID.

API Endpoint: GET /v1/webhook_endpoints/{webhook_endpoint}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.webhook_endpoints.get(webhook_endpoint="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.webhook_endpoints.get(webhook_endpoint="string")

create

Create a webhook endpoint

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

API Endpoint: POST /v1/webhook_endpoints

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.webhook_endpoints.create(enabled_events=["*"], url="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.webhook_endpoints.create(enabled_events=["*"], url="string")

update

Update a webhook endpoint

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

API Endpoint: POST /v1/webhook_endpoints/{webhook_endpoint}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.webhook_endpoints.update(webhook_endpoint="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.webhook_endpoints.update(webhook_endpoint="string")