Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

killbill-client-php

PHP client library for Kill Bill.

Kill Bill compatibility

Client version Kill Bill version
0.2.x 0.18.z
0.3.x 0.20.z
0.4.x 0.22.z

Requirements

PHP 5.5 and later

Installation & Usage

Composer

Require the library via composer:

composer require killbill/killbill-client

Manual Installation

Download the files and include autoload.php:

require_once('/path/to/./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');

use Killbill\Client\KillbillClient;
use Killbill\Client\Swagger\Model\Account;
use Killbill\Client\Swagger\Model\Tenant;

// Setup Killbill client
$client = new KillbillClient(null, 'http://localhost:8080', 'ADMIN_LOGIN', 'ADMIN_PASSWORD');

// Set these values for your particular tenant
$tenant = new Tenant();
$tenant->setApiKey('bob');
$tenant->setApiSecret('lazar');
$tenant = $this->client->getTenantApi()->createTenant($tenant, 'pierre', 'PHP_TEST', 'no comment');

// Point the client to work with this tenant
$client->setApiKey('bob');
$client->setApiSecret('lazar');

// Unique id for this account
$externalAccountId = uniqid();

$accountData = new Account();
$accountData->setName('Killbill php test');
$accountData->setExternalKey($externalAccountId);
$accountData->setEmail('test-' . $externalAccountId . '@kill-bill.org');
$accountData->setCurrency('USD');
$accountData->setPaymentMethodId(null);
$accountData->setAddress1('12 rue des ecoles');
$accountData->setAddress2('Poitier');
$accountData->setCompany('Renault');
$accountData->setState('Poitou');
$accountData->setCountry('France');
$accountData->setPhone('81 53 26 56');
$accountData->setFirstNameLength(4);
$accountData->setTimeZone('UTC');

$account = $client->getAccountApi()->createAccount($accountData, 'pierre', 'PHP_TEST', 'no comment');


// In case you need to make custom requests to Killbill plugins using guzzle:
use Killbill\Client\AddAuthHeadersMiddleware;

$guzzle = $client->getGuzzleClient();
// base_host is already configured
$response = $guzzle->request('POST', '/plugins/killbill-stripe/checkout', [
    'form_params' => [
        'kbAccountId' => $account->getAccountId(),
        'successUrl' => $successUrl,
        'cancelUrl' => $cancelUrl,
    ],
    //BASIC_AUTH adds admin/password credenditals;
    //TENANT_KEY adds key/secret header
    AddAuthHeadersMiddleware::OPTION => AddAuthHeadersMiddleware::BASIC_AUTH | AddAuthHeadersMiddleware::TENANT_KEY,
]);

See tests for more examples.

Using the client in a non-composer environment

If you want to use the client but are not using Composer (yet), follow these steps:

  • Install composer locally: Instruction
  • Run composer require killbill/killbill-client. This will download the library into the vendor/ folder and create a composer.json and a composer.lock file that define this dependency.
  • Include the auto-generated autoload.php file from the vendor/ folder.
  • You can now use the client like above described.
  • If you don't want to have an additional build step, just check the vendor/ folder into your repository.

Testing

The Killbill PHP client uses phpunit as testing framework. Tests can either be run locally using composer test or against a live Killbill instance that is running on 127.0.0.1:8080 using composer test-integration.

Requirements

The PHP library requires PHP 5.5 or greater with libcurl compiled (e.g. you need the php-curl package on Ubuntu).

Support

Feel free to ask questions on the killbilling-users Google Group.

API Generation

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 0.22.8
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Download swagger-codegen:

wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.19/swagger-codegen-cli-3.0.19.jar -O swagger-codegen-cli.jar

and run the following:

./build.sh

see https://github.com/swagger-api/swagger-codegen/tree/3.0.0 for documentation of swagger-codegen

The generator here uses custom templates in the templates folder based on swagger's default ones (https://github.com/swagger-api/swagger-codegen-generators/tree/master/src/main/resources/handlebars/php)

Main differences in the generated client compared to swagger's:

  • dates are formatted into an Y-m-d strings instead of ISO8601 strings
  • booleans are formatted into true/false strings instead of 0/1 strings
  • arrays in queries are formatted as a 'csv' format instead of 'multi' (ex: custom field id lists on account's delete custom fields method)
  • arrays of objects in bodies are not failing at formatting (ex: custom field objects on account's add custom fields method)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AccountApi addAccountBlockingState POST /1.0/kb/accounts/{accountId}/block Block an account
AccountApi addEmail POST /1.0/kb/accounts/{accountId}/emails Add account email
AccountApi closeAccount DELETE /1.0/kb/accounts/{accountId} Close account
AccountApi createAccount POST /1.0/kb/accounts Create account
AccountApi createAccountCustomFields POST /1.0/kb/accounts/{accountId}/customFields Add custom fields to account
AccountApi createAccountTags POST /1.0/kb/accounts/{accountId}/tags Add tags to account
AccountApi createPaymentMethod POST /1.0/kb/accounts/{accountId}/paymentMethods Add a payment method
AccountApi deleteAccountCustomFields DELETE /1.0/kb/accounts/{accountId}/customFields Remove custom fields from account
AccountApi deleteAccountTags DELETE /1.0/kb/accounts/{accountId}/tags Remove tags from account
AccountApi getAccount GET /1.0/kb/accounts/{accountId} Retrieve an account by id
AccountApi getAccountAuditLogs GET /1.0/kb/accounts/{accountId}/auditLogs Retrieve audit logs by account id
AccountApi getAccountAuditLogsWithHistory GET /1.0/kb/accounts/{accountId}/auditLogsWithHistory Retrieve account audit logs with history by account id
AccountApi getAccountBundles GET /1.0/kb/accounts/{accountId}/bundles Retrieve bundles for account
AccountApi getAccountByKey GET /1.0/kb/accounts Retrieve an account by external key
AccountApi getAccountCustomFields GET /1.0/kb/accounts/{accountId}/customFields Retrieve account custom fields
AccountApi getAccountEmailAuditLogsWithHistory GET /1.0/kb/accounts/{accountId}/emails/{accountEmailId}/auditLogsWithHistory Retrieve account email audit logs with history by id
AccountApi getAccountTags GET /1.0/kb/accounts/{accountId}/tags Retrieve account tags
AccountApi getAccountTimeline GET /1.0/kb/accounts/{accountId}/timeline Retrieve account timeline
AccountApi getAccounts GET /1.0/kb/accounts/pagination List accounts
AccountApi getAllCustomFields GET /1.0/kb/accounts/{accountId}/allCustomFields Retrieve account customFields
AccountApi getAllTags GET /1.0/kb/accounts/{accountId}/allTags Retrieve account tags
AccountApi getBlockingStates GET /1.0/kb/accounts/{accountId}/block Retrieve blocking states for account
AccountApi getChildrenAccounts GET /1.0/kb/accounts/{accountId}/children List children accounts
AccountApi getEmails GET /1.0/kb/accounts/{accountId}/emails Retrieve an account emails
AccountApi getInvoicePayments GET /1.0/kb/accounts/{accountId}/invoicePayments Retrieve account invoice payments
AccountApi getInvoicesForAccount GET /1.0/kb/accounts/{accountId}/invoices Retrieve account invoices
AccountApi getOverdueAccount GET /1.0/kb/accounts/{accountId}/overdue Retrieve overdue state for account
AccountApi getPaymentMethodsForAccount GET /1.0/kb/accounts/{accountId}/paymentMethods Retrieve account payment methods
AccountApi getPaymentsForAccount GET /1.0/kb/accounts/{accountId}/payments Retrieve account payments
AccountApi modifyAccountCustomFields PUT /1.0/kb/accounts/{accountId}/customFields Modify custom fields to account
AccountApi payAllInvoices POST /1.0/kb/accounts/{accountId}/invoicePayments Trigger a payment for all unpaid invoices
AccountApi processPayment POST /1.0/kb/accounts/{accountId}/payments Trigger a payment (authorization, purchase or credit)
AccountApi processPaymentByExternalKey POST /1.0/kb/accounts/payments Trigger a payment using the account external key (authorization, purchase or credit)
AccountApi rebalanceExistingCBAOnAccount PUT /1.0/kb/accounts/{accountId}/cbaRebalancing Rebalance account CBA
AccountApi refreshPaymentMethods PUT /1.0/kb/accounts/{accountId}/paymentMethods/refresh Refresh account payment methods
AccountApi removeEmail DELETE /1.0/kb/accounts/{accountId}/emails/{email} Delete email from account
AccountApi searchAccounts GET /1.0/kb/accounts/search/{searchKey} Search accounts
AccountApi setDefaultPaymentMethod PUT /1.0/kb/accounts/{accountId}/paymentMethods/{paymentMethodId}/setDefault Set the default payment method
AccountApi transferChildCreditToParent PUT /1.0/kb/accounts/{childAccountId}/transferCredit Move a given child credit to the parent level
AccountApi updateAccount PUT /1.0/kb/accounts/{accountId} Update account
AdminApi getQueueEntries GET /1.0/kb/admin/queues Get queues entries
AdminApi invalidatesCache DELETE /1.0/kb/admin/cache Invalidates the given Cache if specified, otherwise invalidates all caches
AdminApi invalidatesCacheByAccount DELETE /1.0/kb/admin/cache/accounts/{accountId} Invalidates Caches per account level
AdminApi invalidatesCacheByTenant DELETE /1.0/kb/admin/cache/tenants Invalidates Caches per tenant level
AdminApi putInRotation PUT /1.0/kb/admin/healthcheck Put the host back into rotation
AdminApi putOutOfRotation DELETE /1.0/kb/admin/healthcheck Put the host out of rotation
AdminApi triggerInvoiceGenerationForParkedAccounts POST /1.0/kb/admin/invoices Trigger an invoice generation for all parked accounts
AdminApi updatePaymentTransactionState PUT /1.0/kb/admin/payments/{paymentId}/transactions/{paymentTransactionId} Update existing paymentTransaction and associated payment state
BundleApi addBundleBlockingState POST /1.0/kb/bundles/{bundleId}/block Block a bundle
BundleApi createBundleCustomFields POST /1.0/kb/bundles/{bundleId}/customFields Add custom fields to bundle
BundleApi createBundleTags POST /1.0/kb/bundles/{bundleId}/tags Add tags to bundle
BundleApi deleteBundleCustomFields DELETE /1.0/kb/bundles/{bundleId}/customFields Remove custom fields from bundle
BundleApi deleteBundleTags DELETE /1.0/kb/bundles/{bundleId}/tags Remove tags from bundle
BundleApi getBundle GET /1.0/kb/bundles/{bundleId} Retrieve a bundle by id
BundleApi getBundleByKey GET /1.0/kb/bundles Retrieve a bundle by external key
BundleApi getBundleCustomFields GET /1.0/kb/bundles/{bundleId}/customFields Retrieve bundle custom fields
BundleApi getBundleTags GET /1.0/kb/bundles/{bundleId}/tags Retrieve bundle tags
BundleApi getBundles GET /1.0/kb/bundles/pagination List bundles
BundleApi modifyBundleCustomFields PUT /1.0/kb/bundles/{bundleId}/customFields Modify custom fields to bundle
BundleApi pauseBundle PUT /1.0/kb/bundles/{bundleId}/pause Pause a bundle
BundleApi renameExternalKey PUT /1.0/kb/bundles/{bundleId}/renameKey Update a bundle externalKey
BundleApi resumeBundle PUT /1.0/kb/bundles/{bundleId}/resume Resume a bundle
BundleApi searchBundles GET /1.0/kb/bundles/search/{searchKey} Search bundles
BundleApi transferBundle POST /1.0/kb/bundles/{bundleId} Transfer a bundle to another account
CatalogApi addSimplePlan POST /1.0/kb/catalog/simplePlan Add a simple plan entry in the current version of the catalog
CatalogApi deleteCatalog DELETE /1.0/kb/catalog Delete all versions for a per tenant catalog
CatalogApi getAvailableAddons GET /1.0/kb/catalog/availableAddons Retrieve available add-ons for a given product
CatalogApi getAvailableBasePlans GET /1.0/kb/catalog/availableBasePlans Retrieve available base plans
CatalogApi getCatalogJson GET /1.0/kb/catalog Retrieve the catalog as JSON
CatalogApi getCatalogVersions GET /1.0/kb/catalog/versions Retrieve a list of catalog versions
CatalogApi getCatalogXml GET /1.0/kb/catalog/xml Retrieve the full catalog as XML
CatalogApi getPhaseForSubscriptionAndDate GET /1.0/kb/catalog/phase Retrieve phase for a given subscription and date
CatalogApi getPlanForSubscriptionAndDate GET /1.0/kb/catalog/plan Retrieve plan for a given subscription and date
CatalogApi getPriceListForSubscriptionAndDate GET /1.0/kb/catalog/priceList Retrieve priceList for a given subscription and date
CatalogApi getProductForSubscriptionAndDate GET /1.0/kb/catalog/product Retrieve product for a given subscription and date
CatalogApi uploadCatalogXml POST /1.0/kb/catalog/xml Upload the full catalog as XML
CreditApi createCredit POST /1.0/kb/credits Create a credit
CreditApi getCredit GET /1.0/kb/credits/{creditId} Retrieve a credit by id
CustomFieldApi getCustomFieldAuditLogsWithHistory GET /1.0/kb/customFields/{customFieldId}/auditLogsWithHistory Retrieve custom field audit logs with history by id
CustomFieldApi getCustomFields GET /1.0/kb/customFields/pagination List custom fields
CustomFieldApi searchCustomFields GET /1.0/kb/customFields/search/{searchKey} Search custom fields
ExportApi exportDataForAccount GET /1.0/kb/export/{accountId} Export account data
InvoiceApi adjustInvoiceItem POST /1.0/kb/invoices/{invoiceId} Adjust an invoice item
InvoiceApi commitInvoice PUT /1.0/kb/invoices/{invoiceId}/commitInvoice Perform the invoice status transition from DRAFT to COMMITTED
InvoiceApi createExternalCharges POST /1.0/kb/invoices/charges/{accountId} Create external charge(s)
InvoiceApi createFutureInvoice POST /1.0/kb/invoices Trigger an invoice generation
InvoiceApi createInstantPayment POST /1.0/kb/invoices/{invoiceId}/payments Trigger a payment for invoice
InvoiceApi createInvoiceCustomFields POST /1.0/kb/invoices/{invoiceId}/customFields Add custom fields to invoice
InvoiceApi createInvoiceTags POST /1.0/kb/invoices/{invoiceId}/tags Add tags to invoice
InvoiceApi createMigrationInvoice POST /1.0/kb/invoices/migration/{accountId} Create a migration invoice
InvoiceApi createTaxItems POST /1.0/kb/invoices/taxes/{accountId} Create tax items
InvoiceApi deleteCBA DELETE /1.0/kb/invoices/{invoiceId}/{invoiceItemId}/cba Delete a CBA item
InvoiceApi deleteInvoiceCustomFields DELETE /1.0/kb/invoices/{invoiceId}/customFields Remove custom fields from invoice
InvoiceApi deleteInvoiceTags DELETE /1.0/kb/invoices/{invoiceId}/tags Remove tags from invoice
InvoiceApi generateDryRunInvoice POST /1.0/kb/invoices/dryRun Generate a dryRun invoice
InvoiceApi getCatalogTranslation GET /1.0/kb/invoices/catalogTranslation/{locale} Retrieves the catalog translation for the tenant
InvoiceApi getInvoice GET /1.0/kb/invoices/{invoiceId} Retrieve an invoice by id
InvoiceApi getInvoiceAsHTML GET /1.0/kb/invoices/{invoiceId}/html Render an invoice as HTML
InvoiceApi getInvoiceByItemId GET /1.0/kb/invoices/byItemId/{itemId} Retrieve an invoice by invoice item id
InvoiceApi getInvoiceByNumber GET /1.0/kb/invoices/byNumber/{invoiceNumber} Retrieve an invoice by number
InvoiceApi getInvoiceCustomFields GET /1.0/kb/invoices/{invoiceId}/customFields Retrieve invoice custom fields
InvoiceApi getInvoiceMPTemplate GET /1.0/kb/invoices/manualPayTemplate/{locale} Retrieves the manualPay invoice template for the tenant
InvoiceApi getInvoiceTags GET /1.0/kb/invoices/{invoiceId}/tags Retrieve invoice tags
InvoiceApi getInvoiceTemplate GET /1.0/kb/invoices/template Retrieves the invoice template for the tenant
InvoiceApi getInvoiceTranslation GET /1.0/kb/invoices/translation/{locale} Retrieves the invoice translation for the tenant
InvoiceApi getInvoices GET /1.0/kb/invoices/pagination List invoices
InvoiceApi getPaymentsForInvoice GET /1.0/kb/invoices/{invoiceId}/payments Retrieve payments associated with an invoice
InvoiceApi modifyInvoiceCustomFields PUT /1.0/kb/invoices/{invoiceId}/customFields Modify custom fields to invoice
InvoiceApi searchInvoices GET /1.0/kb/invoices/search/{searchKey} Search invoices
InvoiceApi uploadCatalogTranslation POST /1.0/kb/invoices/catalogTranslation/{locale} Upload the catalog translation for the tenant
InvoiceApi uploadInvoiceMPTemplate POST /1.0/kb/invoices/manualPayTemplate Upload the manualPay invoice template for the tenant
InvoiceApi uploadInvoiceTemplate POST /1.0/kb/invoices/template Upload the invoice template for the tenant
InvoiceApi uploadInvoiceTranslation POST /1.0/kb/invoices/translation/{locale} Upload the invoice translation for the tenant
InvoiceApi voidInvoice PUT /1.0/kb/invoices/{invoiceId}/voidInvoice Perform the action of voiding an invoice
InvoiceItemApi createInvoiceItemCustomFields POST /1.0/kb/invoiceItems/{invoiceItemId}/customFields Add custom fields to invoice item
InvoiceItemApi createInvoiceItemTags POST /1.0/kb/invoiceItems/{invoiceItemId}/tags Add tags to invoice item
InvoiceItemApi deleteInvoiceItemCustomFields DELETE /1.0/kb/invoiceItems/{invoiceItemId}/customFields Remove custom fields from invoice item
InvoiceItemApi deleteInvoiceItemTags DELETE /1.0/kb/invoiceItems/{invoiceItemId}/tags Remove tags from invoice item
InvoiceItemApi getInvoiceItemCustomFields GET /1.0/kb/invoiceItems/{invoiceItemId}/customFields Retrieve invoice item custom fields
InvoiceItemApi getInvoiceItemTags GET /1.0/kb/invoiceItems/{invoiceItemId}/tags Retrieve invoice item tags
InvoiceItemApi modifyInvoiceItemCustomFields PUT /1.0/kb/invoiceItems/{invoiceItemId}/customFields Modify custom fields to invoice item
InvoicePaymentApi completeInvoicePaymentTransaction PUT /1.0/kb/invoicePayments/{paymentId} Complete an existing transaction
InvoicePaymentApi createChargeback POST /1.0/kb/invoicePayments/{paymentId}/chargebacks Record a chargeback
InvoicePaymentApi createChargebackReversal POST /1.0/kb/invoicePayments/{paymentId}/chargebackReversals Record a chargebackReversal
InvoicePaymentApi createInvoicePaymentCustomFields POST /1.0/kb/invoicePayments/{paymentId}/customFields Add custom fields to payment
InvoicePaymentApi createInvoicePaymentTags POST /1.0/kb/invoicePayments/{paymentId}/tags Add tags to payment
InvoicePaymentApi createRefundWithAdjustments POST /1.0/kb/invoicePayments/{paymentId}/refunds Refund a payment, and adjust the invoice if needed
InvoicePaymentApi deleteInvoicePaymentCustomFields DELETE /1.0/kb/invoicePayments/{paymentId}/customFields Remove custom fields from payment
InvoicePaymentApi deleteInvoicePaymentTags DELETE /1.0/kb/invoicePayments/{paymentId}/tags Remove tags from payment
InvoicePaymentApi getInvoicePayment GET /1.0/kb/invoicePayments/{paymentId} Retrieve a payment by id
InvoicePaymentApi getInvoicePaymentCustomFields GET /1.0/kb/invoicePayments/{paymentId}/customFields Retrieve payment custom fields
InvoicePaymentApi getInvoicePaymentTags GET /1.0/kb/invoicePayments/{paymentId}/tags Retrieve payment tags
InvoicePaymentApi modifyInvoicePaymentCustomFields PUT /1.0/kb/invoicePayments/{paymentId}/customFields Modify custom fields to payment
NodesInfoApi getNodesInfo GET /1.0/kb/nodesInfo Retrieve all the nodes infos
NodesInfoApi triggerNodeCommand POST /1.0/kb/nodesInfo Trigger a node command
OverdueApi getOverdueConfigJson GET /1.0/kb/overdue Retrieve the overdue config as JSON
OverdueApi getOverdueConfigXml GET /1.0/kb/overdue/xml Retrieve the overdue config as XML
OverdueApi uploadOverdueConfigJson POST /1.0/kb/overdue Upload the full overdue config as JSON
OverdueApi uploadOverdueConfigXml POST /1.0/kb/overdue/xml Upload the full overdue config as XML
PaymentApi cancelScheduledPaymentTransactionByExternalKey DELETE /1.0/kb/payments/cancelScheduledPaymentTransaction Cancels a scheduled payment attempt retry
PaymentApi cancelScheduledPaymentTransactionById DELETE /1.0/kb/payments/{paymentTransactionId}/cancelScheduledPaymentTransaction Cancels a scheduled payment attempt retry
PaymentApi captureAuthorization POST /1.0/kb/payments/{paymentId} Capture an existing authorization
PaymentApi captureAuthorizationByExternalKey POST /1.0/kb/payments Capture an existing authorization
PaymentApi chargebackPayment POST /1.0/kb/payments/{paymentId}/chargebacks Record a chargeback
PaymentApi chargebackPaymentByExternalKey POST /1.0/kb/payments/chargebacks Record a chargeback
PaymentApi chargebackReversalPayment POST /1.0/kb/payments/{paymentId}/chargebackReversals Record a chargeback reversal
PaymentApi chargebackReversalPaymentByExternalKey POST /1.0/kb/payments/chargebackReversals Record a chargeback reversal
PaymentApi completeTransaction PUT /1.0/kb/payments/{paymentId} Complete an existing transaction
PaymentApi completeTransactionByExternalKey PUT /1.0/kb/payments Complete an existing transaction
PaymentApi createComboPayment POST /1.0/kb/payments/combo Combo api to create a new payment transaction on a existing (or not) account
PaymentApi createPaymentCustomFields POST /1.0/kb/payments/{paymentId}/customFields Add custom fields to payment
PaymentApi createPaymentTags POST /1.0/kb/payments/{paymentId}/tags Add tags to payment payment
PaymentApi deletePaymentCustomFields DELETE /1.0/kb/payments/{paymentId}/customFields Remove custom fields from payment payment
PaymentApi deletePaymentTags DELETE /1.0/kb/payments/{paymentId}/tags Remove tags from payment payment
PaymentApi getPayment GET /1.0/kb/payments/{paymentId} Retrieve a payment by id
PaymentApi getPaymentAttemptAuditLogsWithHistory GET /1.0/kb/payments/attempts/{paymentAttemptId}/auditLogsWithHistory Retrieve payment attempt audit logs with history by id
PaymentApi getPaymentAuditLogsWithHistory GET /1.0/kb/payments/{paymentId}/auditLogsWithHistory Retrieve payment audit logs with history by id
PaymentApi getPaymentByExternalKey GET /1.0/kb/payments Retrieve a payment by external key
PaymentApi getPaymentCustomFields GET /1.0/kb/payments/{paymentId}/customFields Retrieve payment custom fields
PaymentApi getPaymentTags GET /1.0/kb/payments/{paymentId}/tags Retrieve payment payment tags
PaymentApi getPayments GET /1.0/kb/payments/pagination Get payments
PaymentApi modifyPaymentCustomFields PUT /1.0/kb/payments/{paymentId}/customFields Modify custom fields to payment
PaymentApi refundPayment POST /1.0/kb/payments/{paymentId}/refunds Refund an existing payment
PaymentApi refundPaymentByExternalKey POST /1.0/kb/payments/refunds Refund an existing payment
PaymentApi searchPayments GET /1.0/kb/payments/search/{searchKey} Search payments
PaymentApi voidPayment DELETE /1.0/kb/payments/{paymentId} Void an existing payment
PaymentApi voidPaymentByExternalKey DELETE /1.0/kb/payments Void an existing payment
PaymentGatewayApi buildComboFormDescriptor POST /1.0/kb/paymentGateways/hosted/form Combo API to generate form data to redirect the customer to the gateway
PaymentGatewayApi buildFormDescriptor POST /1.0/kb/paymentGateways/hosted/form/{accountId} Generate form data to redirect the customer to the gateway
PaymentGatewayApi processNotification POST /1.0/kb/paymentGateways/notification/{pluginName} Process a gateway notification
PaymentMethodApi createPaymentMethodCustomFields POST /1.0/kb/paymentMethods/{paymentMethodId}/customFields Add custom fields to payment method
PaymentMethodApi deletePaymentMethod DELETE /1.0/kb/paymentMethods/{paymentMethodId} Delete a payment method
PaymentMethodApi deletePaymentMethodCustomFields DELETE /1.0/kb/paymentMethods/{paymentMethodId}/customFields Remove custom fields from payment method
PaymentMethodApi getPaymentMethod GET /1.0/kb/paymentMethods/{paymentMethodId} Retrieve a payment method by id
PaymentMethodApi getPaymentMethodAuditLogsWithHistory GET /1.0/kb/paymentMethods/{paymentMethodId}/auditLogsWithHistory Retrieve payment method audit logs with history by id
PaymentMethodApi getPaymentMethodByKey GET /1.0/kb/paymentMethods Retrieve a payment method by external key
PaymentMethodApi getPaymentMethodCustomFields GET /1.0/kb/paymentMethods/{paymentMethodId}/customFields Retrieve payment method custom fields
PaymentMethodApi getPaymentMethods GET /1.0/kb/paymentMethods/pagination List payment methods
PaymentMethodApi modifyPaymentMethodCustomFields PUT /1.0/kb/paymentMethods/{paymentMethodId}/customFields Modify custom fields to payment method
PaymentMethodApi searchPaymentMethods GET /1.0/kb/paymentMethods/search/{searchKey} Search payment methods
PaymentTransactionApi createTransactionCustomFields POST /1.0/kb/paymentTransactions/{transactionId}/customFields Add custom fields to payment transaction
PaymentTransactionApi createTransactionTags POST /1.0/kb/paymentTransactions/{transactionId}/tags Add tags to payment transaction
PaymentTransactionApi deleteTransactionCustomFields DELETE /1.0/kb/paymentTransactions/{transactionId}/customFields Remove custom fields from payment transaction
PaymentTransactionApi deleteTransactionTags DELETE /1.0/kb/paymentTransactions/{transactionId}/tags Remove tags from payment transaction
PaymentTransactionApi getPaymentByTransactionExternalKey GET /1.0/kb/paymentTransactions Retrieve a payment by transaction external key
PaymentTransactionApi getPaymentByTransactionId GET /1.0/kb/paymentTransactions/{transactionId} Retrieve a payment by transaction id
PaymentTransactionApi getTransactionAuditLogsWithHistory GET /1.0/kb/paymentTransactions/{transactionId}/auditLogsWithHistory Retrieve payment transaction audit logs with history by id
PaymentTransactionApi getTransactionCustomFields GET /1.0/kb/paymentTransactions/{transactionId}/customFields Retrieve payment transaction custom fields
PaymentTransactionApi getTransactionTags GET /1.0/kb/paymentTransactions/{transactionId}/tags Retrieve payment transaction tags
PaymentTransactionApi modifyTransactionCustomFields PUT /1.0/kb/paymentTransactions/{transactionId}/customFields Modify custom fields to payment transaction
PaymentTransactionApi notifyStateChanged POST /1.0/kb/paymentTransactions/{transactionId} Mark a pending payment transaction as succeeded or failed
PluginInfoApi getPluginsInfo GET /1.0/kb/pluginsInfo Retrieve the list of registered plugins
SecurityApi addRoleDefinition POST /1.0/kb/security/roles Add a new role definition)
SecurityApi addUserRoles POST /1.0/kb/security/users Add a new user with roles (to make api requests)
SecurityApi getCurrentUserPermissions GET /1.0/kb/security/permissions List user permissions
SecurityApi getCurrentUserSubject GET /1.0/kb/security/subject Get user information
SecurityApi getRoleDefinition GET /1.0/kb/security/roles/{role} Get role definition
SecurityApi getUserRoles GET /1.0/kb/security/users/{username}/roles Get roles associated to a user
SecurityApi invalidateUser DELETE /1.0/kb/security/users/{username} Invalidate an existing user
SecurityApi updateRoleDefinition PUT /1.0/kb/security/roles Update a new role definition)
SecurityApi updateUserPassword PUT /1.0/kb/security/users/{username}/password Update a user password
SecurityApi updateUserRoles PUT /1.0/kb/security/users/{username}/roles Update roles associated to a user
SubscriptionApi addSubscriptionBlockingState POST /1.0/kb/subscriptions/{subscriptionId}/block Block a subscription
SubscriptionApi cancelSubscriptionPlan DELETE /1.0/kb/subscriptions/{subscriptionId} Cancel an entitlement plan
SubscriptionApi changeSubscriptionPlan PUT /1.0/kb/subscriptions/{subscriptionId} Change entitlement plan
SubscriptionApi createSubscription POST /1.0/kb/subscriptions Create an subscription
SubscriptionApi createSubscriptionCustomFields POST /1.0/kb/subscriptions/{subscriptionId}/customFields Add custom fields to subscription
SubscriptionApi createSubscriptionTags POST /1.0/kb/subscriptions/{subscriptionId}/tags
SubscriptionApi createSubscriptionWithAddOns POST /1.0/kb/subscriptions/createSubscriptionWithAddOns Create an entitlement with addOn products
SubscriptionApi createSubscriptionsWithAddOns POST /1.0/kb/subscriptions/createSubscriptionsWithAddOns Create multiple entitlements with addOn products
SubscriptionApi deleteSubscriptionCustomFields DELETE /1.0/kb/subscriptions/{subscriptionId}/customFields Remove custom fields from subscription
SubscriptionApi deleteSubscriptionTags DELETE /1.0/kb/subscriptions/{subscriptionId}/tags Remove tags from subscription
SubscriptionApi getSubscription GET /1.0/kb/subscriptions/{subscriptionId} Retrieve a subscription by id
SubscriptionApi getSubscriptionCustomFields GET /1.0/kb/subscriptions/{subscriptionId}/customFields Retrieve subscription custom fields
SubscriptionApi getSubscriptionTags GET /1.0/kb/subscriptions/{subscriptionId}/tags Retrieve subscription tags
SubscriptionApi modifySubscriptionCustomFields PUT /1.0/kb/subscriptions/{subscriptionId}/customFields Modify custom fields to subscription
SubscriptionApi uncancelSubscriptionPlan PUT /1.0/kb/subscriptions/{subscriptionId}/uncancel Un-cancel an entitlement
SubscriptionApi undoChangeSubscriptionPlan PUT /1.0/kb/subscriptions/{subscriptionId}/undoChangePlan Undo a pending change plan on an entitlement
SubscriptionApi updateSubscriptionBCD PUT /1.0/kb/subscriptions/{subscriptionId}/bcd Update the BCD associated to a subscription
TagApi getTagAuditLogsWithHistory GET /1.0/kb/tags/{tagId}/auditLogsWithHistory Retrieve tag audit logs with history by id
TagApi getTags GET /1.0/kb/tags/pagination List tags
TagApi searchTags GET /1.0/kb/tags/search/{searchKey} Search tags
TagDefinitionApi createTagDefinition POST /1.0/kb/tagDefinitions Create a tag definition
TagDefinitionApi deleteTagDefinition DELETE /1.0/kb/tagDefinitions/{tagDefinitionId} Delete a tag definition
TagDefinitionApi getTagDefinition GET /1.0/kb/tagDefinitions/{tagDefinitionId} Retrieve a tag definition
TagDefinitionApi getTagDefinitionAuditLogsWithHistory GET /1.0/kb/tagDefinitions/{tagDefinitionId}/auditLogsWithHistory Retrieve tag definition audit logs with history by id
TagDefinitionApi getTagDefinitions GET /1.0/kb/tagDefinitions List tag definitions
TenantApi createTenant POST /1.0/kb/tenants Create a tenant
TenantApi deletePerTenantConfiguration DELETE /1.0/kb/tenants/uploadPerTenantConfig Delete a per tenant configuration (system properties)
TenantApi deletePluginConfiguration DELETE /1.0/kb/tenants/uploadPluginConfig/{pluginName} Delete a per tenant configuration for a plugin
TenantApi deletePluginPaymentStateMachineConfig DELETE /1.0/kb/tenants/uploadPluginPaymentStateMachineConfig/{pluginName} Delete a per tenant payment state machine for a plugin
TenantApi deletePushNotificationCallbacks DELETE /1.0/kb/tenants/registerNotificationCallback Delete a push notification
TenantApi deleteUserKeyValue DELETE /1.0/kb/tenants/userKeyValue/{keyName} Delete a per tenant user key/value
TenantApi getAllPluginConfiguration GET /1.0/kb/tenants/uploadPerTenantConfig/{keyPrefix}/search Retrieve a per tenant key value based on key prefix
TenantApi getPerTenantConfiguration GET /1.0/kb/tenants/uploadPerTenantConfig Retrieve a per tenant configuration (system properties)
TenantApi getPluginConfiguration GET /1.0/kb/tenants/uploadPluginConfig/{pluginName} Retrieve a per tenant configuration for a plugin
TenantApi getPluginPaymentStateMachineConfig GET /1.0/kb/tenants/uploadPluginPaymentStateMachineConfig/{pluginName} Retrieve a per tenant payment state machine for a plugin
TenantApi getPushNotificationCallbacks GET /1.0/kb/tenants/registerNotificationCallback Retrieve a push notification
TenantApi getTenant GET /1.0/kb/tenants/{tenantId} Retrieve a tenant by id
TenantApi getTenantByApiKey GET /1.0/kb/tenants Retrieve a tenant by its API key
TenantApi getUserKeyValue GET /1.0/kb/tenants/userKeyValue/{keyName} Retrieve a per tenant user key/value
TenantApi insertUserKeyValue POST /1.0/kb/tenants/userKeyValue/{keyName} Add a per tenant user key/value
TenantApi registerPushNotificationCallback POST /1.0/kb/tenants/registerNotificationCallback Create a push notification
TenantApi uploadPerTenantConfiguration POST /1.0/kb/tenants/uploadPerTenantConfig Add a per tenant configuration (system properties)
TenantApi uploadPluginConfiguration POST /1.0/kb/tenants/uploadPluginConfig/{pluginName} Add a per tenant configuration for a plugin
TenantApi uploadPluginPaymentStateMachineConfig POST /1.0/kb/tenants/uploadPluginPaymentStateMachineConfig/{pluginName} Add a per tenant payment state machine for a plugin
UsageApi getAllUsage GET /1.0/kb/usages/{subscriptionId} Retrieve usage for a subscription
UsageApi getUsage GET /1.0/kb/usages/{subscriptionId}/{unitType} Retrieve usage for a subscription and unit type
UsageApi recordUsage POST /1.0/kb/usages Record usage for a subscription

Documentation For Models

Documentation For Authorization

Killbill Api Key

  • Type: API key
  • API key parameter name: X-Killbill-ApiKey
  • Location: HTTP header

Killbill Api Secret

  • Type: API key
  • API key parameter name: X-Killbill-ApiSecret
  • Location: HTTP header

basicAuth

  • Type: HTTP basic authentication

Author

You can’t perform that action at this time.