https://github.com/ochiengotieno304/stanbic-ruby
Unofficial Stanbic Kilele Payments Ruby Client
https://github.com/ochiengotieno304/stanbic-ruby
api-wrapper payments ruby
Last synced: about 1 year ago
JSON representation
Unofficial Stanbic Kilele Payments Ruby Client
- Host: GitHub
- URL: https://github.com/ochiengotieno304/stanbic-ruby
- Owner: ochiengotieno304
- License: mit
- Created: 2022-11-25T06:15:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-11T01:13:25.000Z (almost 3 years ago)
- Last Synced: 2025-06-12T14:57:33.940Z (about 1 year ago)
- Topics: api-wrapper, payments, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/stanbic
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Stanbic
Stanbic Payment APIs ruby sdk
## Installation
Install the gem and add to the application's Gemfile by executing:
bundle add stanbic
If bundler is not being used to manage dependencies, install the gem by executing:
gem install stanbic
## Usage
### Initialize Stanbic Client
```ruby
require "stanbic"
@client = Stanbic::Client.new(api_key: ENV['STANBIC_API_KEY'], api_secret: ENV['STANBIC_API_SECRET'])
```
Make API calls using the @client object
### Payments to Stanbic Accounts
```ruby
send_to_stanbic = @client.stanbic_payments(to_account, amount)
```
- `to_account`: stanbic recipient account number`REQUIRED`
- `amount`: amount to transact `REQUIRED`
### Send Money to Mobile Money APIs
```ruby
mobile_transfer = @client.mobile_transfer(sender, receipient, amount, provider)
```
- `sender`: sender mobile number`REQUIRED`
- `receipient`: receipient mobile number `REQUIRED`
- `amount`: amount to transact `REQUIRED`
- `provider`: mobile provider `REQUIRED`
- providers :
- MPESA
- T-KASH
- AIRTEL MONEY
### STK Push - M-Pesa Checkout
```ruby
mpesa_checkout = @client.mpesa_checkout(mobile_number, amount, bill_account_ref)
```
- `mobile_number`: customer being charged mobile number`REQUIRED`
- `amount`: amount being deducted from M-Pesa `REQUIRED`
- `bill_account_ref`: Stanbic account recieveing the funds `REQUIRED`
### Inter-Bank Transfers API via Pesalink
> **Note**
> To be implemented
```ruby
inter_bank_transfer = @client.inter_bank_transfer
```
- `to_account`: stanbic recipient account number`REQUIRED`
- `amount`: amount to transact `REQUIRED`
## Development
## Contributing
Bug reports and pull requests are welcome on GitHub at .
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).