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 [Deprecated] |
| createSubscription() | POST /customers/{id}/subscription | Create Subscription [Deprecated] |
| getSubscription() | GET /customers/{id}/subscription | Get Subscription [Deprecated] |
| getSubscriptionEvents() | GET /customers/{id}/subscription/events | Get Subscription Events [Deprecated] |
| pauseSubscription() | POST /customers/{id}/subscription/pause | Pause Subscription [Deprecated] |
| resumeSubscription() | POST /customers/{id}/subscription/resume | Resume Subscription [Deprecated] |
| subscriptionCancel() | POST /customers/{customer_id}/subscriptions/{id}/cancel | Cancel Subscription |
| subscriptionCreate() | POST /customers/{customer_id}/subscriptions | Create Subscription |
| subscriptionEvents() | GET /customers/{customer_id}/subscriptions/{id}/events | Get Subscription Events |
| subscriptionList() | GET /customers/{customer_id}/subscriptions | List Subscriptions |
| subscriptionPause() | POST /customers/{customer_id}/subscriptions/{id}/pause | Pause Subscription |
| subscriptionResume() | POST /customers/{customer_id}/subscriptions/{id}/resume | Resume Subscription |
| subscriptionUpdate() | PUT /customers/{customer_id}/subscriptions/{id} | Update Subscription |
| subscriptionsGet() | GET /customers/{customer_id}/subscriptions/{id} | Get Subscription |
| subscriptionsRetry() | POST /customers/{customer_id}/subscriptions/{id}/retry | Retry Failed Payment |
| updateSubscription() | PUT /customers/{id}/subscription | Update Subscription [Deprecated] |
cancelSubscription($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseCancel Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0.
<?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.2.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\SubscriptionResponseCreate Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0. 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSubscription($id, $accept_language): \Conekta\Model\SubscriptionResponseGet Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0.
<?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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSubscriptionEvents($id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionEventsResponseGet Subscription Events [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0. 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->getSubscriptionEvents($id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->getSubscriptionEvents: ', $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.2.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\SubscriptionResponsePause Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0.
<?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.2.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\SubscriptionResponseResume Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0.
<?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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionCancel($customer_id, $id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseCancel Subscription
Cancel a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionCancel($customer_id, $id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionCancel: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionCreate($customer_id, $subscription_request, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseCreate Subscription
Create a new subscription for a customer (keeps existing subscriptions active)
<?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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer 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->subscriptionCreate($customer_id, $subscription_request, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionCreate: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionEvents($customer_id, $id, $accept_language, $x_child_company_id, $limit, $search, $next, $previous): \Conekta\Model\SubscriptionEventsResponseGet Subscription Events
Get events for a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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.
$limit = 20; // int | The numbers of items to return, the maximum value is 250
$search = 'search_example'; // string | General order search, e.g. by mail, reference etc.
$next = 'next_example'; // string | next page
$previous = 'previous_example'; // string | previous page
try {
$result = $apiInstance->subscriptionEvents($customer_id, $id, $accept_language, $x_child_company_id, $limit, $search, $next, $previous);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionEvents: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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] |
| 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] |
\Conekta\Model\SubscriptionEventsResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionList($customer_id, $accept_language, $x_child_company_id, $limit, $search, $next, $previous): \Conekta\Model\SubscriptionResponseList Subscriptions
Get a list of subscriptions for a customer
<?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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer 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.
$limit = 20; // int | The numbers of items to return, the maximum value is 250
$search = 'search_example'; // string | General order search, e.g. by mail, reference etc.
$next = 'next_example'; // string | next page
$previous = 'previous_example'; // string | previous page
try {
$result = $apiInstance->subscriptionList($customer_id, $accept_language, $x_child_company_id, $limit, $search, $next, $previous);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionList: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer 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] |
| 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] |
\Conekta\Model\SubscriptionResponse
- Content-Type: Not defined
- Accept:
application/vnd.conekta-v2.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionPause($customer_id, $id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponsePause Subscription
Pause a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionPause($customer_id, $id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionPause: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionResume($customer_id, $id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseResume Subscription
Resume a specific paused 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionResume($customer_id, $id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionResume: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionUpdate($customer_id, $id, $subscription_update_request, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseUpdate Subscription
Update a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionUpdate($customer_id, $id, $subscription_update_request, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionUpdate: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionsGet($customer_id, $id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseGet Subscription
Retrieve a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionsGet($customer_id, $id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionsGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
subscriptionsRetry($customer_id, $id, $accept_language, $x_child_company_id): \Conekta\Model\SubscriptionResponseRetry Failed Payment
Retry a failed payment for a specific 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
);
$customer_id = cus_2tGzG1GxtDAZHEGPH; // string | Identifier of the customer resource
$id = sub_2tGzG1GxtDAZHEGPH; // string | Identifier of the subscription 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->subscriptionsRetry($customer_id, $id, $accept_language, $x_child_company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->subscriptionsRetry: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | string | Identifier of the customer resource | |
| id | string | Identifier of the subscription 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.2.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\SubscriptionResponseUpdate Subscription [Deprecated]
DEPRECATED: This endpoint will be removed in version 2.3.0. 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.2.0+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]