elepay APIはRESTをベースに構成された決済APIです。支払い処理、返金処理など、決済に関わる運用における様々なことができます。
For more information, please visit https://elepay.io.
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"elestyle/elepay-php-sdk": ">=1.2.3"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Elepay\Configuration::getDefaultConfiguration()
->setUsername('Your Elepay Secret Key')
->setPassword('');
$apiInstance = new Elepay\Api\ChargeApi(
// 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
);
$chargeReq = new \Elepay\Model\ChargeReq(); // \Elepay\Model\ChargeReq | 支払リクエスト
try {
$result = $apiInstance->createCharge($chargeReq);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChargeApi->createCharge: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://api.elepay.io
Class | Method | HTTP request | Description |
---|---|---|---|
ChargeApi | captureCharge | POST /charges/{id}/capture | Capture charge |
ChargeApi | createCharge | POST /charges | Create charge |
ChargeApi | listCharges | GET /charges | List charges |
ChargeApi | retrieveCharge | GET /charges/{id} | Retrieve charge |
ChargeApi | retrieveChargeStatus | GET /charges/{id}/status | Retrieve charge's status |
ChargeApi | revokeCharge | POST /charges/{id}/revoke | Revoke charge |
CodeApi | closeCode | DELETE /codes/{codeId} | Close EasyQR code |
CodeApi | createCode | POST /codes | Create EasyQR code |
CodeApi | retrieveCode | GET /codes/{codeId} | Retrieve EasyQR code |
CodeSettingApi | listCodePaymentMethods | GET /code-setting/payment-methods | List all enabled EasyQR payment methods |
CustomerApi | createCustomer | POST /customers | Create customer |
CustomerApi | createSource | POST /customers/{customerId}/sources | Create source |
CustomerApi | deleteCustomer | DELETE /customers/{customerId} | Delete customer |
CustomerApi | deleteSource | DELETE /customers/{customerId}/sources/{sourceId} | Delete source |
CustomerApi | listCustomers | GET /customers | List customers |
CustomerApi | listSources | GET /customers/{customerId}/sources | List sources by customer ID |
CustomerApi | retrieveCustomer | GET /customers/{customerId} | Retrieve customer |
CustomerApi | retrieveSource | GET /customers/{customerId}/sources/{sourceId} | Retrieve source |
CustomerApi | retrieveSourceStatus | GET /sources/{sourceId}/status | Retrieve source's status |
CustomerApi | updateCustomer | POST /customers/{customerId} | Update customer |
DisputeApi | listDisputes | GET /disputes | List disputes |
DisputeApi | retrieveDispute | GET /disputes/{id} | Retrieve dispute |
InvoiceApi | cancelInvoice | POST /invoices/{invoiceId}/cancel | cancel invoice |
InvoiceApi | createInvoice | POST /invoices | Create invoice |
InvoiceApi | deleteInvoice | DELETE /invoices/{invoiceId} | Delete invoice |
InvoiceApi | listInvoices | GET /invoices | List invoices |
InvoiceApi | retrieveInvoice | GET /invoices/{invoiceId} | Retrieve invoice |
InvoiceApi | sendInvoice | POST /invoices/{invoiceId}/send | send invoice |
InvoiceApi | submitInvoice | POST /invoices/{invoiceId}/submit | submit invoice |
InvoiceApi | updateInvoice | POST /invoices/{invoiceId} | Update invoice |
PaymentMethodApi | listPaymentMethods | GET /payment-methods | List supported payment methods |
RefundApi | createRefund | POST /charges/{id}/refunds | Create refund |
RefundApi | listChargesRefunds | GET /charges/{id}/refunds | List refunds |
RefundApi | retrieveChargeRefund | GET /charges/{id}/refunds/{refundId} | Retrieve refund |
SubscriptionApi | cancelSubscription | POST /subscriptions/{subscriptionId}/cancel | Cancel subscription |
SubscriptionApi | createSubscription | POST /subscriptions | Create subscription |
SubscriptionApi | listSubscriptionPeriods | GET /subscriptions/{subscriptionId}/periods | List subscription periods |
SubscriptionApi | listSubscriptions | GET /subscriptions | List subscriptions |
SubscriptionApi | resumeSubscription | POST /subscriptions/{subscriptionId}/resume | Resume subscription |
SubscriptionApi | retrieveSubscription | GET /subscriptions/{subscriptionId} | Retrieve subscription |
SubscriptionApi | startSubscription | POST /subscriptions/{subscriptionId}/start | Start subscription |
SubscriptionApi | updateSubscription | POST /subscriptions/{subscriptionId} | Update subscription |
TerminalApi | createReader | POST /terminal/readers | create terminal reader |
TerminalApi | deleteReader | DELETE /terminal/readers/{readerId} | delete reader |
TerminalApi | getReader | GET /terminal/readers/{readerId} | get reader |
TerminalApi | listLocations | GET /terminal/locations | list locations |
TerminalApi | listReaders | GET /terminal/readers | list readers |
- CardBrandType
- CardInfo
- ChannelPropertiesDto
- ChargeCaptureReq
- ChargeDateTimeType
- ChargeDto
- ChargeReq
- ChargeStatusDto
- ChargeStatusType
- ChargesResponse
- CodeDto
- CodeItem
- CodePaymentMethodResponse
- CodeReq
- CodeStatusType
- CustomerDto
- CustomerPropertiesDto
- CustomerReq
- CustomerResponse
- CustomerStatusType
- DisputeDateTimeType
- DisputeDto
- DisputeStatusType
- DisputesResponse
- InvoiceDto
- InvoiceItem
- InvoiceReq
- InvoiceStatusType
- InvoicesResponse
- LocationDto
- LocationsResponse
- PaymentMethodDto
- PaymentMethodResponse
- PaymentMethodType
- ReaderStatusType
- RefundDto
- RefundReq
- RefundStatusType
- RefundsDto
- RefundsResponse
- ResourceType
- ResourceWebEnvType
- SortOrderType
- SourceDto
- SourceReq
- SourceResponse
- SourceStatusDto
- SourceStatusType
- SubscriptionDto
- SubscriptionIntervalType
- SubscriptionPeriodDto
- SubscriptionPeriodsResponse
- SubscriptionReq
- SubscriptionScheduleChargesResponse
- SubscriptionStatusType
- SubscriptionUpdateReq
- SubscriptionsResponse
- TerminalReaderDto
- TerminalReaderReq
- TerminalReadersResponse
- Type: HTTP basic authentication
- Type: Bearer authentication
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.2.3
- Package version:
1.2.3
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen