承接 sashalenz/monobank-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sashalenz/monobank-api

最新稳定版本:1.3.1

Composer 安装命令:

composer require sashalenz/monobank-api

包简介

This is my package monobank-api

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A lightweight and expressive PHP wrapper for the Monobank API. It provides simple methods for accessing public banking information and personal account data.

Installation

You can install the package via composer:

composer require sashalenz/monobank-api

You can publish the config file with:

php artisan vendor:publish --tag="monobank-api-config"

This is the contents of the published config file:

return [
];

Usage

This package provides helpers for all Monobank API requests:

  • MonobankApi::bank()->currency() – get current currency exchange rates.
  • MonobankApi::personal()->clientInfo() – retrieve information about accounts and cards.
  • MonobankApi::personal()->webhook($url) – register a webhook URL for transaction updates.
  • MonobankApi::personal()->statement($account, $dateFrom, $dateTo = null) – fetch a statement for a specific account and period.

Examples

Currency rates

Retrieve public exchange rates without authentication.

use Sashalenz\MonobankApi\MonobankApi;

$rates = MonobankApi::bank()->currency();

foreach ($rates as $rate) {
    echo $rate->currencyCodeA . ' => ' . $rate->rateBuy . PHP_EOL;
}

Client information

Get information about your accounts and cards.

$info = MonobankApi::personal()->token($token)->clientInfo();

Register webhook

Configure a webhook to receive transaction updates.

MonobankApi::personal()->token($token)->webhook('https://example.com/monobank');

Account statement

Fetch the statement for an account within a given period.

$statement = MonobankApi::personal()
    ->token($token)
    ->statement($accountId, $dateFrom, $dateTo);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-24