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 |
OrdersCreateCharges | POST /orders/{id}/add_charges | Create charges |
UpdateCharge | PUT /charges/{id} | Update a charge |
GetChargesResponse GetCharges (string acceptLanguage = null, string xChildCompanyId = null, int? limit = null, string search = null, string next = null, string previous = null)
Get A List of Charges
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class GetChargesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new ChargesApi(config);
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
var limit = 20; // int? | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
var search = "search_example"; // string | General order search, e.g. by mail, reference etc. (optional)
var next = "next_example"; // string | next page (optional)
var previous = "previous_example"; // string | previous page (optional)
try
{
// Get A List of Charges
GetChargesResponse result = apiInstance.GetCharges(acceptLanguage, xChildCompanyId, limit, search, next, previous);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.GetCharges: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get A List of Charges
ApiResponse<GetChargesResponse> response = apiInstance.GetChargesWithHttpInfo(acceptLanguage, xChildCompanyId, limit, search, next, previous);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.GetChargesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChargeOrderResponse OrdersCreateCharge (string id, ChargeRequest chargeRequest, string acceptLanguage = null, string xChildCompanyId = null)
Create charge
Create charge for an existing orden
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class OrdersCreateChargeExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new ChargesApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var chargeRequest = new ChargeRequest(); // ChargeRequest | requested field for a charge
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Create charge
ChargeOrderResponse result = apiInstance.OrdersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.OrdersCreateCharge: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create charge
ApiResponse<ChargeOrderResponse> response = apiInstance.OrdersCreateChargeWithHttpInfo(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.OrdersCreateChargeWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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] |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChargesOrderResponse OrdersCreateCharges (string id, ChargeRequest chargeRequest, string acceptLanguage = null, string xChildCompanyId = null)
Create charges
Create charges for an existing orden
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class OrdersCreateChargesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new ChargesApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var chargeRequest = new ChargeRequest(); // ChargeRequest | requested field for a charge
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Create charges
ChargesOrderResponse result = apiInstance.OrdersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.OrdersCreateCharges: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create charges
ApiResponse<ChargesOrderResponse> response = apiInstance.OrdersCreateChargesWithHttpInfo(id, chargeRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.OrdersCreateChargesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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] |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChargeResponse UpdateCharge (string id, ChargeUpdateRequest chargeUpdateRequest, string acceptLanguage = null, string xChildCompanyId = null)
Update a charge
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class UpdateChargeExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new ChargesApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var chargeUpdateRequest = new ChargeUpdateRequest(); // ChargeUpdateRequest | requested field for update a charge
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Update a charge
ChargeResponse result = apiInstance.UpdateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.UpdateCharge: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update a charge
ApiResponse<ChargeResponse> response = apiInstance.UpdateChargeWithHttpInfo(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChargesApi.UpdateChargeWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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] |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]