All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
CancelSubscription | POST /customers/{id}/subscription/cancel | Cancel Subscription |
CreateSubscription | POST /customers/{id}/subscription | Create Subscription |
GetAllEventsFromSubscription | GET /customers/{id}/subscription/events | Get Events By Subscription |
GetSubscription | GET /customers/{id}/subscription | Get Subscription |
PauseSubscription | POST /customers/{id}/subscription/pause | Pause Subscription |
ResumeSubscription | POST /customers/{id}/subscription/resume | Resume Subscription |
UpdateSubscription | PUT /customers/{id}/subscription | Update Subscription |
SubscriptionResponse CancelSubscription (string id, string acceptLanguage = null, string xChildCompanyId = null)
Cancel Subscription
You can cancel the subscription to stop the plans that your customers consume
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class CancelSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
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
{
// Cancel Subscription
SubscriptionResponse result = apiInstance.CancelSubscription(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.CancelSubscription: " + 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
{
// Cancel Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.CancelSubscriptionWithHttpInfo(id, 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 SubscriptionsApi.CancelSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
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: 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]
SubscriptionResponse CreateSubscription (string id, SubscriptionRequest subscriptionRequest, string acceptLanguage = null, string xChildCompanyId = null)
Create Subscription
You can create the subscription to include the plans that your customers consume
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class CreateSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var subscriptionRequest = new SubscriptionRequest(); // SubscriptionRequest | requested field for subscriptions
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 Subscription
SubscriptionResponse result = apiInstance.CreateSubscription(id, subscriptionRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.CreateSubscription: " + 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 Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.CreateSubscriptionWithHttpInfo(id, subscriptionRequest, 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 SubscriptionsApi.CreateSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
subscriptionRequest | SubscriptionRequest | requested field for subscriptions | |
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 | parameter validation error | - |
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]
SubscriptionEventsResponse GetAllEventsFromSubscription (string id, string acceptLanguage = null, string xChildCompanyId = null)
Get Events By Subscription
You can get the events of the subscription(s) of a client, with the customer id
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class GetAllEventsFromSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
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
{
// Get Events By Subscription
SubscriptionEventsResponse result = apiInstance.GetAllEventsFromSubscription(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.GetAllEventsFromSubscription: " + 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 Events By Subscription
ApiResponse<SubscriptionEventsResponse> response = apiInstance.GetAllEventsFromSubscriptionWithHttpInfo(id, 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 SubscriptionsApi.GetAllEventsFromSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
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: 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 | - |
402 | payment required error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionResponse GetSubscription (string id, string acceptLanguage = null)
Get Subscription
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class GetSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
try
{
// Get Subscription
SubscriptionResponse result = apiInstance.GetSubscription(id, acceptLanguage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.GetSubscription: " + 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 Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.GetSubscriptionWithHttpInfo(id, acceptLanguage);
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 SubscriptionsApi.GetSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
acceptLanguage | string | 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]
SubscriptionResponse PauseSubscription (string id, string acceptLanguage = null, string xChildCompanyId = null)
Pause Subscription
You can pause the subscription to stop the plans that your customers consume
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class PauseSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
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
{
// Pause Subscription
SubscriptionResponse result = apiInstance.PauseSubscription(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.PauseSubscription: " + 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
{
// Pause Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.PauseSubscriptionWithHttpInfo(id, 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 SubscriptionsApi.PauseSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
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: 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 | - |
402 | payment required error | - |
404 | not found entity | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionResponse ResumeSubscription (string id, string acceptLanguage = null, string xChildCompanyId = null)
Resume Subscription
You can resume the subscription to start the plans that your customers consume
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class ResumeSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
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
{
// Resume Subscription
SubscriptionResponse result = apiInstance.ResumeSubscription(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.ResumeSubscription: " + 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
{
// Resume Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.ResumeSubscriptionWithHttpInfo(id, 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 SubscriptionsApi.ResumeSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
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: 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 | - |
402 | payment required error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionResponse UpdateSubscription (string id, SubscriptionUpdateRequest subscriptionUpdateRequest, string acceptLanguage = null, string xChildCompanyId = null)
Update Subscription
You can modify the subscription to change the plans that your customers consume
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class UpdateSubscriptionExample
{
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 SubscriptionsApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var subscriptionUpdateRequest = new SubscriptionUpdateRequest(); // SubscriptionUpdateRequest | requested field for update a subscription
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 Subscription
SubscriptionResponse result = apiInstance.UpdateSubscription(id, subscriptionUpdateRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriptionsApi.UpdateSubscription: " + 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 Subscription
ApiResponse<SubscriptionResponse> response = apiInstance.UpdateSubscriptionWithHttpInfo(id, subscriptionUpdateRequest, 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 SubscriptionsApi.UpdateSubscriptionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
subscriptionUpdateRequest | SubscriptionUpdateRequest | requested field for update a subscription | |
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 | parameter validation error | - |
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]