PHPackages                             alipaysdk/openapi - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. alipaysdk/openapi

ActiveLibrary[HTTP &amp; Networking](/categories/http)

alipaysdk/openapi
=================

支付宝开放平台v3协议文档

3.0.70(5mo ago)19561.0k↓16.1%83[10 issues](https://github.com/alipay/alipay-sdk-php-all/issues)[9 PRs](https://github.com/alipay/alipay-sdk-php-all/pulls)2unlicensePHPPHP ^7.4 || ^8.0

Since Apr 27Pushed 3mo ago7 watchersCompare

[ Source](https://github.com/alipay/alipay-sdk-php-all)[ Packagist](https://packagist.org/packages/alipaysdk/openapi)[ Docs](https://openapi-generator.tech)[ RSS](/packages/alipaysdk-openapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (18)Used By (2)

支付宝开放平台服务端SDK FOR PHP
=====================

[](#支付宝开放平台服务端sdk-for-php)

Alipay SDK for PHP SDK可以自动帮您满足能力调用过程中所需的证书校验、加签、验签、发送HTTP请求等非功能性要求。

支付宝目前提供 [v2](v2/README.md)、[v3](v3/README.md) 两个版本SDK，根据您的习惯自由选择。

v2 &amp; v3
-----------

[](#v2--v3)

v2版本将会发起基于v2协议的OpenAPI，v3版本将会发起基于v3协议的OpenAPI。

关于v3协议
------

[](#关于v3协议)

相较于v2协议的支付宝API，主要区别是：

- 使用RESTful设计风格，并通过OpenAPI规范（OAS）描述接口
- 使用JSON作为数据交互的格式，不再使用XML和表单格式
- 简化加验签逻辑，对http报文整体加验签
- 简化加解密、文件上传等规范

更多有关v3协议的内容，可前往 [支付宝开发文档](https://opendocs.alipay.com/open-v3/054kaq) 了解更多。

### 关于OpenAPI规范（OAS）

[](#关于openapi规范oas)

OpenAPI规范（OAS），是定义一个标准的、与具体编程语言无关的RESTful API的规范，您可查阅 [OAS官网](https://www.openapis.org) 了解更多。

利用支付宝提供的OpenAPI描述文件，您可以用代码生成工具来自动生成各种编程语言代码，用自动测试工具进行测试等等。

v3 SDK是基于 [OpenAPI描述文件](v3/api/openapi.yaml) 、使用 [OpenAPI Generator](https://openapi-generator.tech) 生成的。

问题
--

[](#问题)

不管您在使用SDK的过程中遇到任何问题，欢迎前往 [支付宝开放社区](https://forum.alipay.com/mini-app/channel/1100001) 发帖与支付宝工作人员和其他开发者一起交流。

注：为了提高开发者问题的响应时效，github本身的issue功能已关闭，支付宝开放社区中发帖的问题，通常会在2小时内响应。

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance77

Regular maintenance activity

Popularity51

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity58

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 ~60 days

Recently: every ~99 days

Total

17

Last Release

154d ago

Major Versions

1.0.5 → 2.3.172023-10-25

2.5.0 → 3.0.02024-05-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f37929707d8a183c9ce1344a22e4429f3e7d74d18218efec01e0ff13535a174?d=identicon)[antopen](/maintainers/antopen)

---

Top Contributors

[![antopen](https://avatars.githubusercontent.com/u/34638345?v=4)](https://github.com/antopen "antopen (1 commits)")

---

Tags

phpapisdkrestopenapiopenapitoolsopenapi-generator

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/alipaysdk-openapi/health.svg)

```
[![Health](https://phpackages.com/badges/alipaysdk-openapi/health.svg)](https://phpackages.com/packages/alipaysdk-openapi)
```

###  Alternatives

[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)[elasticemail/elasticemail-php

This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available &lt;a target='\_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'&gt;here&lt;/a&gt;). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository &lt;a target='\_blank' href='https://github.com/ElasticEmail?tab=repositories&amp;q=%22rest+api%22+in%3Areadme'&gt;here&lt;/a&gt;

1595.0k2](/packages/elasticemail-elasticemail-php)[ory/kratos-client-php

This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.

1529.2k3](/packages/ory-kratos-client-php)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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