Conekta.Webhooks (Conekta v1.2.0)

Copy Markdown View Source

Functions for managing webhook endpoints.

Endpoint: https://api.conekta.io/webhooks

Summary

Functions

Create a new webhook endpoint Conekta Documentation

Delete a webhook endpoint

Get a webhook endpoint by ID

List all webhook endpoints

Send a test event to a webhook endpoint

Functions

create(webhook)

Create a new webhook endpoint Conekta Documentation

Method: POST

Conekta.Webhooks.create(%Conekta.WebhookRequest{url: "https://example.com/webhook"})
# => {:ok, %Conekta.WebhookResponse{}}

delete(webhook_id)

Delete a webhook endpoint

Method: DELETE

Conekta.Webhooks.delete(webhook_id)
# => {:ok, %Conekta.WebhookResponse{}}

find(webhook_id)

Get a webhook endpoint by ID

Method: GET

Conekta.Webhooks.find(webhook_id)
# => {:ok, %Conekta.WebhookResponse{}}

list()

List all webhook endpoints

Method: GET

Conekta.Webhooks.list()
# => {:ok, %Conekta.WebhooksResponse{}}

test(webhook_id)

Send a test event to a webhook endpoint

Method: POST

Conekta.Webhooks.test(webhook_id)
# => {:ok, %Conekta.WebhookResponse{}}

update(webhook_id, webhook)

Update a webhook endpoint Conekta Documentation

Method: PUT

Conekta.Webhooks.update(webhook_id, %Conekta.WebhookUpdateRequest{url: "https://new-url.com"})
# => {:ok, %Conekta.WebhookResponse{}}