All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
createWebhook | POST /webhooks | Create Webhook |
deleteWebhook | DELETE /webhooks/{id} | Delete Webhook |
getWebhook | GET /webhooks/{id} | Get Webhook |
getWebhooks | GET /webhooks | Get List of Webhooks |
testWebhook | POST /webhooks/{id}/test | Test Webhook |
updateWebhook | PUT /webhooks/{id} | Update Webhook |
WebhookResponse createWebhook(webhookRequest, acceptLanguage)
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.
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
WebhookRequest webhookRequest = new WebhookRequest(); // WebhookRequest | requested field for webhook
String acceptLanguage = "es"; // String | Use for knowing which language to use
try {
WebhookResponse result = apiInstance.createWebhook(webhookRequest, acceptLanguage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#createWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookRequest | WebhookRequest | requested field for webhook | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
- 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 | - |
WebhookResponse deleteWebhook(id, acceptLanguage)
Delete Webhook
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String acceptLanguage = "es"; // String | Use for knowing which language to use
try {
WebhookResponse result = apiInstance.deleteWebhook(id, acceptLanguage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#deleteWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
- 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 | - |
WebhookResponse getWebhook(id, acceptLanguage, xChildCompanyId)
Get Webhook
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
WebhookResponse result = apiInstance.getWebhook(id, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#getWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | 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 | - |
GetWebhooksResponse getWebhooks(acceptLanguage, xChildCompanyId, limit, search, url, next, previous)
Get List of Webhooks
Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing)
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
Integer limit = 20; // Integer | The numbers of items to return, the maximum value is 250
String search = "search_example"; // String | General order search, e.g. by mail, reference etc.
String url = "url_example"; // String | url for webhook filter
String next = "next_example"; // String | next page
String previous = "previous_example"; // String | previous page
try {
GetWebhooksResponse result = apiInstance.getWebhooks(acceptLanguage, xChildCompanyId, limit, search, url, next, previous);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#getWebhooks");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
limit | Integer | The numbers of items to return, the maximum value is 250 | [optional] [default to 20] |
search | String | General order search, e.g. by mail, reference etc. | [optional] |
url | String | url for webhook filter | [optional] |
next | String | next page | [optional] |
previous | String | 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 | - |
WebhookResponse testWebhook(id, acceptLanguage)
Test Webhook
Send a webhook.ping event
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String acceptLanguage = "es"; // String | Use for knowing which language to use
try {
WebhookResponse result = apiInstance.testWebhook(id, acceptLanguage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#testWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
- 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 | - |
WebhookResponse updateWebhook(id, webhookUpdateRequest, acceptLanguage, xChildCompanyId)
Update Webhook
updates an existing webhook
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
WebhookUpdateRequest webhookUpdateRequest = new WebhookUpdateRequest(); // WebhookUpdateRequest | requested fields in order to update a webhook
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
WebhookResponse result = apiInstance.updateWebhook(id, webhookUpdateRequest, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#updateWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
webhookUpdateRequest | WebhookUpdateRequest | requested fields in order to update a webhook | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | 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 | - |