All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
create_webhook | POST /webhooks | Create Webhook |
delete_webhook | DELETE /webhooks/{id} | Delete Webhook |
get_webhook | GET /webhooks/{id} | Get Webhook |
get_webhooks | GET /webhooks | Get List of Webhooks |
test_webhook | POST /webhooks/{id}/test | Test Webhook |
update_webhook | PUT /webhooks/{id} | Update Webhook |
WebhookResponse create_webhook(webhook_request, accept_language=accept_language)
Create Webhook
What we do at Conekta translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.webhook_request import WebhookRequest
from conekta.models.webhook_response import WebhookResponse
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
webhook_request = conekta.WebhookRequest() # WebhookRequest | requested field for webhook
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
try:
# Create Webhook
api_response = api_instance.create_webhook(webhook_request, accept_language=accept_language)
print("The response of WebhooksApi->create_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->create_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
webhook_request | WebhookRequest | requested field for webhook | |
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
401 | authentication error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse delete_webhook(id, accept_language=accept_language)
Delete Webhook
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.webhook_response import WebhookResponse
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
try:
# Delete Webhook
api_response = api_instance.delete_webhook(id, accept_language=accept_language)
print("The response of WebhooksApi->delete_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->delete_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | * Date - The date and time that the response was sent * Content-Type - The format of the response body * Content-Length - The length of the response body in bytes * Connection - The type of connection used to transfer the response * Conekta-Media-Type - |
401 | authentication error | - |
404 | not found entity | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse get_webhook(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
Get Webhook
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.webhook_response import WebhookResponse
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
# Get Webhook
api_response = api_instance.get_webhook(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of WebhooksApi->get_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->get_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
x_child_company_id | str | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | * Date - The date and time that the response was sent * Content-Type - The format of the response body * Content-Length - The length of the response body in bytes * Connection - The type of connection used to transfer the response * Conekta-Media-Type - |
401 | authentication error | - |
404 | not found entity | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWebhooksResponse get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, url=url, next=next, previous=previous)
Get List of Webhooks
Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing)
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.get_webhooks_response import GetWebhooksResponse
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional)
url = 'url_example' # str | url for webhook filter (optional)
next = 'next_example' # str | next page (optional)
previous = 'previous_example' # str | previous page (optional)
try:
# Get List of Webhooks
api_response = api_instance.get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, url=url, next=next, previous=previous)
print("The response of WebhooksApi->get_webhooks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->get_webhooks: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
x_child_company_id | str | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
limit | int | The numbers of items to return, the maximum value is 250 | [optional] [default to 20] |
search | str | General order search, e.g. by mail, reference etc. | [optional] |
url | str | url for webhook filter | [optional] |
next | str | next page | [optional] |
previous | str | previous page | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | * Date - The date and time that the response was sent * Content-Type - The format of the response body * Content-Length - The length of the response body in bytes * Connection - The type of connection used to transfer the response * Conekta-Media-Type - |
401 | authentication error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse test_webhook(id, accept_language=accept_language)
Test Webhook
Send a webhook.ping event
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.webhook_response import WebhookResponse
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
try:
# Test Webhook
api_response = api_instance.test_webhook(id, accept_language=accept_language)
print("The response of WebhooksApi->test_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->test_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
404 | not found entity | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse update_webhook(id, webhook_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
Update Webhook
updates an existing webhook
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.webhook_response import WebhookResponse
from conekta.models.webhook_update_request import WebhookUpdateRequest
from conekta.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
host = "https://api.conekta.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.WebhooksApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
webhook_update_request = conekta.WebhookUpdateRequest() # WebhookUpdateRequest | requested fields in order to update a webhook
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
# Update Webhook
api_response = api_instance.update_webhook(id, webhook_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of WebhooksApi->update_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->update_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
webhook_update_request | WebhookUpdateRequest | requested fields in order to update a webhook | |
accept_language | str | Use for knowing which language to use | [optional] [default to es] |
x_child_company_id | str | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
404 | not found entity | - |
401 | authentication error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]