(webhooks)
Creates a new webhook
import moov
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.create_webhook(request={
"url": "https://yearly-strategy.com/",
"status": moov.Status.ENABLED,
"event_types": [
"<value>",
],
})
if res is not None:
# handle response
pass
models.CreateWebhookResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
List all running webhooks
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.list_webhooks()
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListWebhooksResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Get webhook
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.get_webhook(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.GetWebhookResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Update webhook
import moov
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.update_webhook(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", update_webhook={
"url": "https://pretty-battle.info/",
"status": moov.Status.ENABLED,
"event_types": [
"<value>",
"<value>",
],
})
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
update_webhook |
models.UpdateWebhook |
✔️ |
N/A |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.UpdateWebhookResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Delete webhook
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.delete_hook(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.DeleteHookResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Send a ping event to test if the webhook is setup correctly.
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.ping_webhook(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.PingWebhookResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Get secret to verify that a HTTP request came from Moov.
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.get_webhook_secret(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.GetWebhookSecretResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |
Get a list of event types that a webhook can subscribe to. The list will be in alphabetical order based on the identifier.
This endpoint should be available to Moov's customers.
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.webhooks.list_event_types(webhook_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter |
Type |
Required |
Description |
Example |
webhook_id |
str |
✔️ |
ID of the webhook |
ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.ListEventTypesResponse
Error Type |
Status Code |
Content Type |
models.SDKError |
4XX, 5XX |
*/* |