PHPackages                             datlechin/sepay-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. datlechin/sepay-php

ActiveLibrary[API Development](/categories/api)

datlechin/sepay-php
===================

v1.0.1(1y ago)6737MITPHPPHP ^7.4|^8.0

Since Oct 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/datlechin/sepay-php)[ Packagist](https://packagist.org/packages/datlechin/sepay-php)[ RSS](/packages/datlechin-sepay-php/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

SePay PHP
=========

[](#sepay-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f9c9828337ef2752c2c519e44399c4393f66a1a277ca9245c0f528aaedb9013f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461746c656368696e2f73657061792d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/datlechin/sepay-php)[![Tests](https://camo.githubusercontent.com/479b801833b01cd56792a04b6f1006381e262b256aa20a1fe210c4165d537531/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6461746c656368696e2f73657061792d7068702f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/datlechin/sepay-php/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/e5db23bb4c0713ade005b34b8a0eaa5514459126a147bff94909f6bbbd77956c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6461746c656368696e2f73657061792d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/datlechin/sepay-php)

SePay PHP là một thư viện PHP giúp tích hợp dịch vụ thanh toán SePay vào ứng dụng của bạn một cách dễ dàng. Thư viện này cung cấp các phương thức để quản lý tài khoản ngân hàng, theo dõi giao dịch và xử lý webhook.

Cài đặt
-------

[](#cài-đặt)

Bạn có thể cài đặt gói này thông qua Composer:

```
composer require datlechin/sepay-php
```

Cách sử dụng
------------

[](#cách-sử-dụng)

### Khởi tạo Client

[](#khởi-tạo-client)

Vào trang [SePay](https://my.sepay.vn/companyapi) để lấy API Key.

```
use Datlechin\SePay\SePay;

$client = SePay::client('your_api_key_here');
```

### Quản lý tài khoản ngân hàng

[](#quản-lý-tài-khoản-ngân-hàng)

```
// Lấy danh sách tài khoản ngân hàng
$bankAccounts = $client->bankAccounts()->list();

// Lấy thông tin một tài khoản cụ thể
$account = $client->bankAccounts()->get($accountId);

// Đếm số lượng tài khoản
$count = $client->bankAccounts()->count();
```

### Quản lý giao dịch

[](#quản-lý-giao-dịch)

```
// Lấy danh sách giao dịch
$transactions = $client->transactions()->list();

// Lấy thông tin một giao dịch cụ thể
$transaction = $client->transactions()->get($transactionId);

// Đếm số lượng giao dịch
$count = $client->transactions()->count();
```

### Xử lý Webhook

[](#xử-lý-webhook)

```
use Datlechin\SePay\SePay;
use Datlechin\SePay\Webhook\Payload;
use Datlechin\SePay\Webhook\Webhook;

SePay::webhook()
    ->setAuthorization(Webhook::AUTH_API_KEY, 'your_api_key_here')
    ->handle(function (Payload $payload) {
    // Xử lý webhook như lưu thông tin giao dịch hay cập nhật trạng thái đơn hàng...

    return true; // Trả về true để xác nhận webhook hợp lệ hoặc false nếu không hợp lệ
});
```

Kiểm thử
--------

[](#kiểm-thử)

```
composer test
```

Tác giả
-------

[](#tác-giả)

- [Ngo Quoc Dat](https://github.com/datlechin)
- [Tất cả những người đóng góp](../../contributors)

Giấy phép
---------

[](#giấy-phép)

Giấy phép MIT (MIT). Vui lòng xem [Tệp Giấy phép](LICENSE) để biết thêm thông tin.

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~128 days

Total

2

Last Release

547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5dca3124d040fb5f1e59100485f3a23e42e4e4b1c6d89c5d4cd3e79d95f574e?d=identicon)[Ngô Quốc Đạt](/maintainers/Ng%C3%B4%20Qu%E1%BB%91c%20%C4%90%E1%BA%A1t)

---

Top Contributors

[![datlechin](https://avatars.githubusercontent.com/u/56961917?v=4)](https://github.com/datlechin "datlechin (5 commits)")

---

Tags

apiphpsepaysepayvn

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/datlechin-sepay-php/health.svg)

```
[![Health](https://phpackages.com/badges/datlechin-sepay-php/health.svg)](https://phpackages.com/packages/datlechin-sepay-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k51](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.7M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

2084.7k6](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
