Skip to content

Latest commit

 

History

History
397 lines (279 loc) · 14.1 KB

PaymentLinkApi.md

File metadata and controls

397 lines (279 loc) · 14.1 KB

Conekta\PaymentLinkApi

All URIs are relative to https://api.conekta.io, except if the operation defines another base path.

Method HTTP request Description
cancelCheckout() PUT /checkouts/{id}/cancel Cancel Payment Link
createCheckout() POST /checkouts Create Unique Payment Link
emailCheckout() POST /checkouts/{id}/email Send an email
getCheckout() GET /checkouts/{id} Get a payment link by ID
getCheckouts() GET /checkouts Get a list of payment links
smsCheckout() POST /checkouts/{id}/sms Send an sms

cancelCheckout()

cancelCheckout($id, $accept_language, $x_child_company_id): \Conekta\Model\CheckoutResponse

Cancel Payment Link

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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->cancelCheckout($id, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->cancelCheckout: ', $e->getMessage(), PHP_EOL;
}

Parameters

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]

Return type

\Conekta\Model\CheckoutResponse

Authorization

bearerAuth

HTTP request headers

  • 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]

createCheckout()

createCheckout($checkout, $accept_language, $x_child_company_id): \Conekta\Model\CheckoutResponse

Create Unique Payment Link

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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
);
$checkout = new \Conekta\Model\Checkout(); // \Conekta\Model\Checkout | requested field for checkout
$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->createCheckout($checkout, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->createCheckout: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
checkout \Conekta\Model\Checkout requested field for checkout
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]

Return type

\Conekta\Model\CheckoutResponse

Authorization

bearerAuth

HTTP request headers

  • 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]

emailCheckout()

emailCheckout($id, $email_checkout_request, $accept_language, $x_child_company_id): \Conekta\Model\CheckoutResponse

Send an email

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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
$email_checkout_request = new \Conekta\Model\EmailCheckoutRequest(); // \Conekta\Model\EmailCheckoutRequest | requested field for sms checkout
$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->emailCheckout($id, $email_checkout_request, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->emailCheckout: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the resource
email_checkout_request \Conekta\Model\EmailCheckoutRequest requested field for sms checkout
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]

Return type

\Conekta\Model\CheckoutResponse

Authorization

bearerAuth

HTTP request headers

  • 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]

getCheckout()

getCheckout($id, $accept_language, $x_child_company_id): \Conekta\Model\CheckoutResponse

Get a payment link by ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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->getCheckout($id, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->getCheckout: ', $e->getMessage(), PHP_EOL;
}

Parameters

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]

Return type

\Conekta\Model\CheckoutResponse

Authorization

bearerAuth

HTTP request headers

  • 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]

getCheckouts()

getCheckouts($accept_language, $x_child_company_id, $limit, $search, $next, $previous): \Conekta\Model\CheckoutsResponse

Get a list of payment links

Returns a list of links generated by the merchant

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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
);
$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->getCheckouts($accept_language, $x_child_company_id, $limit, $search, $next, $previous);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->getCheckouts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
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]

Return type

\Conekta\Model\CheckoutsResponse

Authorization

bearerAuth

HTTP request headers

  • 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]

smsCheckout()

smsCheckout($id, $sms_checkout_request, $accept_language, $x_child_company_id): \Conekta\Model\CheckoutResponse

Send an sms

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\PaymentLinkApi(
    // 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
$sms_checkout_request = new \Conekta\Model\SmsCheckoutRequest(); // \Conekta\Model\SmsCheckoutRequest | requested field for sms checkout
$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->smsCheckout($id, $sms_checkout_request, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentLinkApi->smsCheckout: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the resource
sms_checkout_request \Conekta\Model\SmsCheckoutRequest requested field for sms checkout
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]

Return type

\Conekta\Model\CheckoutResponse

Authorization

bearerAuth

HTTP request headers

  • 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]