All URIs are relative to https://api.conekta.io, except if the operation defines another base path.
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 |
cancelSubscription($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponse
Cancel Subscription
You can cancel the subscription to stop the plans that your customers consume
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->cancelSubscription($id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->cancelSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createSubscription($id, $subscription_request, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponse
Create Subscription
You can create the subscription to include the plans that your customers consume
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$subscription_request = new \Conekta\Model\SubscriptionRequest(); // \Conekta\Model\SubscriptionRequest | requested field for subscriptions
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->createSubscription($id, $subscription_request, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->createSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
subscription_request | \Conekta\Model\SubscriptionRequest | requested field for subscriptions | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionResponse
- Content-Type:
application/json
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAllEventsFromSubscription($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionEventsResponse
Get Events By Subscription
You can get the events of the subscription(s) of a client, with the customer id
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->getAllEventsFromSubscription($id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->getAllEventsFromSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionEventsResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSubscription($id, $accept_language): \Conekta\Model\SubscriptionResponse
Get Subscription
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
try {
$result = $apiInstance->getSubscription($id, $accept_language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->getSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
\Conekta\Model\SubscriptionResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
pauseSubscription($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponse
Pause Subscription
You can pause the subscription to stop the plans that your customers consume
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->pauseSubscription($id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->pauseSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
resumeSubscription($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponse
Resume Subscription
You can resume the subscription to start the plans that your customers consume
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->resumeSubscription($id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->resumeSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateSubscription($id, $subscription_update_request, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponse
Update Subscription
You can modify the subscription to change the plans that your customers consume
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Conekta\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 6307a60c41de27127515a575; // string | Identifier of the resource
$subscription_update_request = new \Conekta\Model\SubscriptionUpdateRequest(); // \Conekta\Model\SubscriptionUpdateRequest | requested field for update a subscription
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
try {
$result = $apiInstance->updateSubscription($id, $subscription_update_request, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->updateSubscription: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
subscription_update_request | \Conekta\Model\SubscriptionUpdateRequest | requested field for update a subscription | |
accept_language | string | Use for knowing which language to use | [optional] [default to 'es'] |
x_child_company_id | string | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
\Conekta\Model\SubscriptionResponse
- Content-Type:
application/json
- Accept:
application/vnd.conekta-v2.1.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]