Skip to content

Latest commit

 

History

History
198 lines (132 loc) · 6.4 KB

PaymentRequestsApi.md

File metadata and controls

198 lines (132 loc) · 6.4 KB

Bleumi\Payment\PaymentRequestsApi

All URIs are relative to https://api.bleumi.io/v1.

Method HTTP request Description
createPaymentRequest() POST /payment
listPaymentRequests() GET /payment
updatePaymentRequest() PUT /payment

createPaymentRequest()

createPaymentRequest($create_payment_input): \Bleumi\Payment\Model\PaymentUpsertResponse

Create a hosted checkout URL to accept payment

Example

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


// Configure API key authorization: Authorization
$config = Bleumi\Payment\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');


$apiInstance = new Bleumi\Payment\Api\PaymentRequestsApi(
    // 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
);
$create_payment_input = new \Bleumi\Payment\Model\CreatePaymentInput(); // \Bleumi\Payment\Model\CreatePaymentInput

try {
    $result = $apiInstance->createPaymentRequest($create_payment_input);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestsApi->createPaymentRequest: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_payment_input \Bleumi\Payment\Model\CreatePaymentInput [optional]

Return type

\Bleumi\Payment\Model\PaymentUpsertResponse

Authorization

Authorization

HTTP request headers

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

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

listPaymentRequests()

listPaymentRequests($next_token, $sort_by, $sort_order, $start_at, $end_at): \Bleumi\Payment\Model\PaginatedPaymentRequest

List all payment requests

Example

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


// Configure API key authorization: Authorization
$config = Bleumi\Payment\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');


$apiInstance = new Bleumi\Payment\Api\PaymentRequestsApi(
    // 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
);
$next_token = 'next_token_example'; // string | Cursor to start results from
$sort_by = 'sort_by_example'; // string | `createdAt` - results will be sorted by created time. `updatedAt` - results will be sorted by last updated time.
$sort_order = 'sort_order_example'; // string | `ascending` - `(Default)` results will be sorted in asceding order. `descending` - results will be sorted in descending order.
$start_at = 'start_at_example'; // string | Get payments from this timestamp `(unix)`
$end_at = 'end_at_example'; // string | Get payments till this timestamp `(unix)`

try {
    $result = $apiInstance->listPaymentRequests($next_token, $sort_by, $sort_order, $start_at, $end_at);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestsApi->listPaymentRequests: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
next_token string Cursor to start results from [optional]
sort_by string `createdAt` - results will be sorted by created time. `updatedAt` - results will be sorted by last updated time. [optional]
sort_order string `ascending` - `(Default)` results will be sorted in asceding order. `descending` - results will be sorted in descending order. [optional]
start_at string Get payments from this timestamp `(unix)` [optional]
end_at string Get payments till this timestamp `(unix)` [optional]

Return type

\Bleumi\Payment\Model\PaginatedPaymentRequest

Authorization

Authorization

HTTP request headers

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

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

updatePaymentRequest()

updatePaymentRequest($update_payment_input): \Bleumi\Payment\Model\PaymentUpsertResponse

Update a payment request

Example

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


// Configure API key authorization: Authorization
$config = Bleumi\Payment\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');


$apiInstance = new Bleumi\Payment\Api\PaymentRequestsApi(
    // 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
);
$update_payment_input = new \Bleumi\Payment\Model\UpdatePaymentInput(); // \Bleumi\Payment\Model\UpdatePaymentInput

try {
    $result = $apiInstance->updatePaymentRequest($update_payment_input);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestsApi->updatePaymentRequest: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
update_payment_input \Bleumi\Payment\Model\UpdatePaymentInput [optional]

Return type

\Bleumi\Payment\Model\PaymentUpsertResponse

Authorization

Authorization

HTTP request headers

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

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