-
-
Notifications
You must be signed in to change notification settings - Fork 88
Aviate wallet #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Aviate wallet #606
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| = Aviate Wallet | ||
|
|
||
| include::{sourcedir}/aviate/includes/aviate-card.adoc[] | ||
|
|
||
| == Introduction | ||
|
|
||
| The Aviate plugin enables the management of Account wallets — credit pools that can be replenished manually or automatically based on configurable criteria. These credits are consumed by the system to pay for usage, and the wallet mechanism is primarily intended for prepaid scenarios. This helps mitigate financial risk typically associated with billing for usage in arrears. | ||
|
|
||
| Credits can be granted either for free or as part of a payment. In the latter case, a Kill Bill invoice is generated and a payment is processed using the Account’s default payment method. An optional expiration date can be assigned to credits. If the payment fails, the credit is recorded but remains inactive; it is only activated once the payment against the invoice is successfully completed. | ||
|
|
||
| Wallets can be configured with automatic replenishment rules (top-off), which support two modes: restoring the balance to a target level or adding a fixed amount when the balance falls below a threshold. These automatically granted credits can also include an expiration date. Additionally, wallets can be initialized with a predefined amount of free or paid credits. | ||
|
|
||
| The wallet is implemented as a ledger that tracks all transactions, including credit additions and consumptions. It exposes two values: the `balance`, representing currently available credits, and the `live balance`, which includes credits reserved for pending invoice generation. | ||
|
|
||
| Currently, each customer Account supports a single wallet, and the wallet must use the Account’s default currency. | ||
|
|
||
| == Getting Started with Aviate Wallet | ||
|
|
||
| This section provides a step-by-step guide to start using the Aviate Wallet functionality. | ||
|
|
||
| === Installing the Plugin | ||
|
|
||
| Install the Aviate plugin as described in the https://docs.killbill.io/latest/how-to-install-the-aviate-plugin.html[How to Install the Aviate Plugin] guide. | ||
|
|
||
| === Enabling Aviate Wallet | ||
|
|
||
| To enable wallet functionality in the Aviate plugin, start Kill Bill with the following system property: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| com.killbill.billing.plugin.aviate.enableWalletApis=true | ||
| ---- | ||
|
|
||
| For details on setting configuration properties, refer to the https://docs.killbill.io/latest/userguide_configuration.html[Kill Bill Configuration Guide]. | ||
|
|
||
| === Using Wallet APIs | ||
|
|
||
| Once the plugin is installed and wallet support is enabled, you can interact with the Aviate Wallet using its API. The API allows you to create wallets, add credits, and configure top-off rules. Full API documentation is available at https://apidocs.killbill.io/aviate-wallet[our API documentation]. | ||
|
|
||
| == Using the Wallet Functionality | ||
|
|
||
| 1. Create a wallet for a customer Account, optionally specifying initial credits (free or paid) and top-off rules. | ||
| 2. Record usage events. The system automatically adjusts the balance and enforces top-off rules as configured. | ||
| 3. Optionally, manually add credits or update the top-off configuration to better suit your use case. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / QDJVMC
Style Warning