hryvinskyi / billwerk-api
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2025-02-19 12:36:19 UTC
README
This document describes the endpoints of the billwerk REST API. You can find out more about billwerk here.
Swagger interactive usage / authentication:
This documentation offers interactive features which will enable you to test how our system behaves. To use the interactive features you have to aquire a bearer token for your active billwerk sandbox account. This procedure is described here. OAuth token URL for sandbox is https://sandbox.billwerk.com/oauth/token/
, for production https://app.billwerk.com/oauth/token/
. Please be aware the URL does not include [...]/api/v1/[...]
After aquiring the token you must go through the 'Authorize'-Form down below (green button). You're now able to use the interactive features.
Please be aware your sandbox account will be affected trying out the endpoints!
Updates to API
We are constantly improving our API. We are trying to avoid breaking changes as much as possible. However, sometimes we have to make breaking changes. We will inform about breaking changes directly if these endpoints are used by your integration and grant sufficient time to react to the upcoming change. We will also inform about breaking changes in our changelog. Please be aware that we will not inform explicitly about non-breaking changes. We will not inform about changes in the following cases:
- Adding a new enum value to a published public API endpoint is not considered a breaking change.
- Adding new fields in API endpoint (request and response) is not considered a breaking change.
Endpoints marked with [FEATURE] is an feature discriminated endpoint. Make sure your account has this feature enabled or contact <a href="mailto:support@billwerk.com">support.Return to https://developer.billwerk.io/
This PHP package is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/hryvinskyi/billwerk-api.git"
}
],
"require": {
"hryvinskyi/billwerk-api": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 ); $file_id = "file_id_example"; // string | AccountingExport File Id try { $result = $apiInstance->accountingExportFilesCreateDownloadLinkFileIdPOST($file_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportFilesCreateDownloadLinkFileIdPOST: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 ); $file_id = "file_id_example"; // string | AccountingExport File Id try { $apiInstance->accountingExportFilesGetDirectDownloadFileIdGET($file_id); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportFilesGetDirectDownloadFileIdGET: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 | AccountingExport Id try { $result = $apiInstance->accountingExportFilesGetIdGET($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportFilesGetIdGET: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 | Accounting export request Id try { $result = $apiInstance->accountingExportsGetIdGET($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportsGetIdGET: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 ); $kind = new \Billwerk\Model\AccountingExportKind(); // \Billwerk\Model\AccountingExportKind | Accounting export kind $include_files = false; // bool | Include files $from = "from_example"; // string | Cursor from where on the items are listed $take = 56; // int | Limit returned items (Max = 500, Default = 200) try { $result = $apiInstance->accountingExportsGetKindIncludeFilesFromTakeGET($kind, $include_files, $from, $take); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportsGetKindIncludeFilesFromTakeGET: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 \Billwerk\Model\AccountingExportCreateDTO(); // \Billwerk\Model\AccountingExportCreateDTO | Accounting export request try { $result = $apiInstance->accountingExportsPostDtoPOST($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingExportsPostDtoPOST: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: BearerAuth $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Billwerk\Api\AccountingExportsApi( // 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 ); try { $result = $apiInstance->accountingStatusGetGET(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingExportsApi->accountingStatusGetGET: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://app.billwerk.com
Documentation For Models
- AccountExportProductType
- AccountKind
- AccountingAccountType
- AccountingAssignmentSettingsDTO
- AccountingExportBatchReadDTO
- AccountingExportCreateDTO
- AccountingExportExtraFieldDTO
- AccountingExportFileCreateDTO
- AccountingExportFileReadDTO
- AccountingExportFormat
- AccountingExportGeneralSettingsDTO
- AccountingExportGeneralSettingsReadDTO
- AccountingExportKind
- AccountingExportPaymentGroupingSettingsDTO
- AccountingExportProductAccountsDTO
- AccountingExportProductBasedGeneralSettingsDTO
- AccountingExportProductSettingsDTO
- AccountingExportReceivableGroupingSettingsDTO
- AccountingExportRequestReadDTO
- AccountingFormat
- AccountingGroupingKeyDTO
- AccountingPaymentGroupingKeyDTO
- AccountingStatusCode
- AccountingStatusDTO
- AdditionalAddressDTO
- AddressDTO
- ApiMessage
- AtrigaEscalationStatusValue
- AttachmentReadDTO
- BearerMedium
- BillingDateAlignment
- CancellationOutputDTO
- CartDTO
- ComponentDTO
- ComponentOrderSelfServiceReadDTO
- ComponentReadDTO
- ComponentSubscriptionChangeDetailDto
- ComponentSubscriptionChangeDto
- ComponentSubscriptionCreateDTO
- ComponentSubscriptionDTO
- ComponentSubscriptionReadDTO
- ComponentTypeDTO
- ContractBalanceType
- ContractChangeDTO
- ContractChangeListsDto
- ContractChangePaymentMethodDTO
- ContractChangeRequestOption
- ContractChangeTrigger
- ContractChangeType
- ContractEndDTO
- ContractLifecycleStatus
- ContractMoveDTO
- ContractPauseChangeDetailDto
- ContractPauseChangeDto
- ContractPauseDTO
- ContractPauseOutputDTO
- ContractPaymentDTO
- ContractPhaseDTO
- ContractPhaseType
- ContractReadDTO
- ContractRefundDTO
- ContractRefundResultDTO
- ContractResumeDTO
- ContractStateDto
- ContractSubscriptionsDTO
- ContractWriteOffCreateDTO
- Country
- CouponDTO
- CouponOrderDTO
- CouponReadDTO
- CurrentContractPhaseDTO
- CustomerDTO
- CustomerReadDTO
- CustomerStatus
- DashboardStatsDTO
- DateRangeDTO
- DeletionRequestedOption
- DiscountDTO
- DiscountDurationType
- DiscountEffectDTO
- DiscountEffectType
- DiscountReadDTO
- DiscountScaleDTO
- DiscountScaleItemDTO
- DiscountSubscriptionChangeDetailDto
- DiscountSubscriptionChangeDto
- DiscountSubscriptionCreateDTO
- DiscountSubscriptionDTO
- DiscountSubscriptionReadDTO
- DunningDetailDTO
- DunningItemDTO
- DunningListDTO
- EInvoicingDispatchStatus
- EmailAddressAssignmentDTO
- EmailAddressDTO
- EmailAttachmentDTO
- EmailDeliveryErrorDTO
- EmailDeliveryErrorType
- EmailMessageReadDTO
- EmailResendDTO
- EmailStatus
- EmptyResult
- EscalationResetParametersDTO
- EscalationSuspendedDTO
- ExtendedPostingDTO
- ExternalSubscriptionBearerCreateDTO
- ExternalSubscriptionCartDTO
- ExternalSubscriptionCheckDTO
- ExternalSubscriptionCheckSubscriptionDTO
- ExternalSubscriptionContractDTO
- ExternalSubscriptionEnvironment
- ExternalSubscriptionType
- FileDownloadLinkDTO
- FreeQuotaDescriptorDTO
- HookAuthType
- HookAuthorizationDTO
- HookDTO
- HookEvent
- HookReadDTO
- IPaymentBearerDTO
- InvoiceBuilderDTO
- InvoiceBuilderLineItemDTO
- InvoiceDetailDTO
- InvoiceDraftDTO
- InvoiceDraftListDTO
- InvoiceListDTO
- InvoicePreviewDTO
- InvoicePreviewEntryDTO
- LedgerAmountType
- LedgerDunningReadDTO
- LedgerEntryReadDTO
- LedgerEntryType
- LineItemDTO
- LocalizableStringDecimalNullableListTuple
- LocalizableStringInt32NullableListTuple
- LocalizableStringInt64NullableListTuple
- MeteredUsageDTO
- MeteredUsageReadDTO
- ModifyPriceListItemsDTO
- NextRecurringInfosDTO
- NextStepAfterContractPeriodEnd
- OrderCommitDTO
- OrderDTO
- OrderReadDTO
- OrderStatus
- OrderType
- PSPBearerDTO
- PaymentErrorCode
- PaymentPeriodMode
- PaymentPreferredAssignmentReadDTO
- PaymentProcessDTO
- PaymentProvider
- PaymentProviderRole
- PaymentRefundDTO
- PaymentRefundStatus
- PaymentStatusValue
- PaymentTransactionReadDTO
- PaymentTransactionStatusDTO
- PaymentTransactionStatusValue
- PaymentTransactionWithInvoiceIdDTO
- PaymentTrigger
- PdfDocumentFormat
- PeriodDTO
- PeriodUnit
- PlanDTO
- PlanGroupDTO
- PlanGroupKPIDTO
- PlanGroupReadDTO
- PlanReadDTO
- PlanVariantCreateDTO
- PlanVariantDTO
- PlanVariantReadDTO
- PostingDTO
- PostingEndPointDTO
- PostingGroupDTO
- PostingKind
- PostingStatus
- PreauthTransactionStatus
- PredefinedTaxDefinition
- PredefinedTaxPolicy
- PrepaidCardLineItemReadDTO
- PrepaidCardProvider
- PrepaidCardReadDto
- PrepaidCardRedemptionDto
- PrepaidCardStatus
- PrepaidCardsListReadDto
- PriceDTO
- PriceListDTO
- PriceListItemDTO
- PriceListItemRemovalDTO
- PriceListItemStandaloneDTO
- PriceListItemStandaloneReadDTO
- PriceListReadDTO
- PricePhaseDTO
- PriceScaleDTO
- PriceScaleItemDTO
- PriceTaxType
- PrimaryTaxCategory
- ProductInfoDTO
- ProductOverrideDTO
- RatedItemCreateDTO
- RatedItemDTO
- RawJson
- ReportDTO
- ReportFormat
- ReportStatus
- ReportType
- ReportingParametersDTO
- RevenueAccountType
- SelfServiceTokenDTO
- SetTrialEndDTO
- SubscriptionReadDTO
- SubscriptionStatus
- TaxCategoryCode
- TaxDefinitionReadDTO
- TaxKind
- TaxPolicyEntryDTO
- TaxPolicyReadDTO
- TimeGranularity
- TrialEndPolicy
- TrialMode
- VatDescriptorDTO
- VatIdValidationStatus
- WebhookDispatchReadDTO
- WebhookDispatchStatus
Documentation For Authorization
BearerAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header