Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Latest commit

 

History

History
executable file
·
235 lines (159 loc) · 6.82 KB

SessionApi.md

File metadata and controls

executable file
·
235 lines (159 loc) · 6.82 KB

Swagger\Client\SessionApi

All URIs are relative to https://checkout-api.reepay.com

Method HTTP request Description
createChargeSession POST /v1/session/charge Create charge session
createRecurringSession POST /v1/session/recurring Create recurring session
createSubscriptionSession POST /v1/session/subscription Create subscription session
deleteSession DELETE /v1/session/{id} Delete session

createChargeSession

\Swagger\Client\Model\Session createChargeSession($body)

Create charge session

Example

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

// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\SessionApi(
    // 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
);
$body = new \Swagger\Client\Model\CreateChargeSession(); // \Swagger\Client\Model\CreateChargeSession | 

try {
    $result = $apiInstance->createChargeSession($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->createChargeSession: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\CreateChargeSession [optional]

Return type

\Swagger\Client\Model\Session

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createRecurringSession

\Swagger\Client\Model\Session createRecurringSession($body)

Create recurring session

Example

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

// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\SessionApi(
    // 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
);
$body = new \Swagger\Client\Model\CreateRecurringSession(); // \Swagger\Client\Model\CreateRecurringSession | 

try {
    $result = $apiInstance->createRecurringSession($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->createRecurringSession: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\CreateRecurringSession [optional]

Return type

\Swagger\Client\Model\Session

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createSubscriptionSession

\Swagger\Client\Model\Session createSubscriptionSession($body)

Create subscription session

Example

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

// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\SessionApi(
    // 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
);
$body = new \Swagger\Client\Model\CreateSubscriptionSession(); // \Swagger\Client\Model\CreateSubscriptionSession | 

try {
    $result = $apiInstance->createSubscriptionSession($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->createSubscriptionSession: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\CreateSubscriptionSession [optional]

Return type

\Swagger\Client\Model\Session

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteSession

deleteSession($id)

Delete session

Example

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

// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\SessionApi(
    // 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 = "id_example"; // string | Session id

try {
    $apiInstance->deleteSession($id);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->deleteSession: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string Session id

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]