Skip to content

Latest commit

 

History

History
209 lines (143 loc) · 5.82 KB

RefundApi.md

File metadata and controls

209 lines (143 loc) · 5.82 KB

Elepay\RefundApi

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

Method HTTP request Description
createRefund() POST /charges/{id}/refunds Create refund
listChargesRefunds() GET /charges/{id}/refunds List refunds
retrieveChargeRefund() GET /charges/{id}/refunds/{refundId} Retrieve refund

createRefund()

createRefund($id, $refundReq): \Elepay\Model\RefundDto

Create refund

決済の全額あるいは一部の返金処理を行います。

Example

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


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

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


$apiInstance = new Elepay\Api\RefundApi(
    // 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 | Charge ID
$refundReq = new \Elepay\Model\RefundReq(); // \Elepay\Model\RefundReq | 返金の詳細情報

try {
    $result = $apiInstance->createRefund($id, $refundReq);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RefundApi->createRefund: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Charge ID
refundReq \Elepay\Model\RefundReq 返金の詳細情報

Return type

\Elepay\Model\RefundDto

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

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

listChargesRefunds()

listChargesRefunds($id): \Elepay\Model\RefundsResponse

List refunds

返金に関する情報を一覧で取得します。

Example

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


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

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


$apiInstance = new Elepay\Api\RefundApi(
    // 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 | Charge ID

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

Parameters

Name Type Description Notes
id string Charge ID

Return type

\Elepay\Model\RefundsResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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

retrieveChargeRefund()

retrieveChargeRefund($id, $refundId): \Elepay\Model\RefundDto

Retrieve refund

返金に関する詳細情報を取得します。

Example

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


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

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


$apiInstance = new Elepay\Api\RefundApi(
    // 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 | Charge ID
$refundId = 'refundId_example'; // string | Refund ID

try {
    $result = $apiInstance->retrieveChargeRefund($id, $refundId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RefundApi->retrieveChargeRefund: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Charge ID
refundId string Refund ID

Return type

\Elepay\Model\RefundDto

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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