All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
getCharges | GET /charges | Get A List of Charges |
ordersCreateCharge | POST /orders/{id}/charges | Create charge |
updateCharge | PUT /charges/{id} | Update a charge |
GetChargesResponse getCharges(acceptLanguage, xChildCompanyId, limit, search, next, previous)
Get A List of Charges
// 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.ChargesApi;
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");
ChargesApi apiInstance = new ChargesApi(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 next = "next_example"; // String | next page
String previous = "previous_example"; // String | previous page
try {
GetChargesResponse result = apiInstance.getCharges(acceptLanguage, xChildCompanyId, limit, search, next, previous);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChargesApi#getCharges");
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] |
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 - |
422 | whitelist validation error | - |
500 | internal server error | - |
ChargeOrderResponse ordersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId)
Create charge
Create charge for an existing orden
// 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.ChargesApi;
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");
ChargesApi apiInstance = new ChargesApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
ChargeRequest chargeRequest = new ChargeRequest(); // ChargeRequest | requested field for a charge
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 {
ChargeOrderResponse result = apiInstance.ordersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChargesApi#ordersCreateCharge");
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 | |
chargeRequest | ChargeRequest | requested field for a charge | |
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 | - |
401 | authentication error | - |
404 | not found entity | - |
428 | Precondition Required | - |
500 | internal server error | - |
ChargeResponse updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId)
Update a charge
// 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.ChargesApi;
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");
ChargesApi apiInstance = new ChargesApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
ChargeUpdateRequest chargeUpdateRequest = new ChargeUpdateRequest(); // ChargeUpdateRequest | requested field for update a charge
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 {
ChargeResponse result = apiInstance.updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChargesApi#updateCharge");
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 | |
chargeUpdateRequest | ChargeUpdateRequest | requested field for update a charge | |
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 | * 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 - |
422 | whitelist validation error | - |
404 | not found entity | - |
500 | internal server error | - |