@antelopejs/interface-payment 0.2.1 → 0.2.2-next.44.g580bf03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -31
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
<a href="https://github.com/AntelopeJS/antelopejs"><img data-illustration src="./.github/readme/strip.svg" width="100%" alt="INTERFACE · PAYMENT: part of AntelopeJS, hexagonal architecture beyond your own code. A glowing button reads Star AntelopeJS."></a>
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<a href="./docs/1.introduction.md"><img data-illustration alt="
|
|
4
|
+
|
|
5
|
+
# `@antelopejs/interface-payment`
|
|
6
|
+
|
|
7
|
+
<a href="https://www.npmjs.com/package/@antelopejs/interface-payment"><img data-illustration alt="npm" src="https://img.shields.io/npm/v/@antelopejs/interface-payment?style=for-the-badge&labelColor=000000&color=000000"></a> <a href="./LICENSE"><img data-illustration alt="License" src="https://img.shields.io/npm/l/@antelopejs/interface-payment?style=for-the-badge&labelColor=000000&color=000000"></a> <a href="https://discord.gg/g4pFt6eXqu"><img data-illustration alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a> <a href="./docs/1.introduction.md"><img data-illustration alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a> <a href="https://github.com/AntelopeJS/antelopejs"><img data-illustration alt="Star AntelopeJS" src="https://img.shields.io/github/stars/AntelopeJS/antelopejs?label=Star%20AntelopeJS&style=for-the-badge&labelColor=000000&color=000000&logo=github"></a>
|
|
8
|
+
|
|
9
|
+
**The AntelopeJS contract for payments. Take payments, refund them, save payment methods and react to settlement events without naming a provider.**
|
|
10
|
+
|
|
11
|
+
[Documentation](./docs/1.introduction.md) · [Implementations](./docs/5.provider-capability-matrix.md) · [All interfaces and providers](https://github.com/AntelopeJS/antelopejs#ecosystem)
|
|
12
|
+
|
|
8
13
|
</div>
|
|
9
14
|
|
|
10
15
|
The provider-agnostic payment interface for AntelopeJS. You take payments,
|
|
@@ -12,9 +17,7 @@ refund them, save payment methods, and react to settlement events without naming
|
|
|
12
17
|
a provider. To change provider, you swap the module that implements the
|
|
13
18
|
interface.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Installation
|
|
20
|
+
## Install
|
|
18
21
|
|
|
19
22
|
```bash
|
|
20
23
|
pnpm add @antelopejs/interface-payment
|
|
@@ -82,19 +85,6 @@ can charge the payer again.
|
|
|
82
85
|
choose `@antelopejs/payment-subscriptions` explicitly. Do not run both clocks
|
|
83
86
|
for the same subscription.
|
|
84
87
|
|
|
85
|
-
## Compatibility
|
|
86
|
-
|
|
87
|
-
<!-- antelopejs-docs-compat:start -->
|
|
88
|
-
|
|
89
|
-
| Package | Supported | Tested with |
|
|
90
|
-
| ---------------------------- | ---------------- | ----------- |
|
|
91
|
-
| `@antelopejs/interface-core` | `>=0.0.3 <1.0.0` | `0.0.12` |
|
|
92
|
-
|
|
93
|
-
<!-- antelopejs-docs-compat:end -->
|
|
94
|
-
|
|
95
|
-
The table lists the peer requirements in `package.json`, not the development or
|
|
96
|
-
test-tool ranges. The implementing module can add requirements of its own.
|
|
97
|
-
|
|
98
88
|
## Conventions
|
|
99
89
|
|
|
100
90
|
- **Integer minor units.** `{ value: 1050, currency: "EUR" }` is €10.50, never a float.
|
|
@@ -104,16 +94,6 @@ test-tool ranges. The implementing module can add requirements of its own.
|
|
|
104
94
|
`status: "failed"`. It rejects only when the call itself could not be made.
|
|
105
95
|
- **An optional trailing `provider` argument.** It selects one of several configured accounts.
|
|
106
96
|
|
|
107
|
-
## Documentation
|
|
108
|
-
|
|
109
|
-
| Document | Contents |
|
|
110
|
-
| -------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
111
|
-
| [Introduction](./docs/1.introduction.md) | Scope, conventions, and installation |
|
|
112
|
-
| [Payments](./docs/2.payments.md) | Checkout, direct payments, authorize and capture, refunds, and errors |
|
|
113
|
-
| [Customers and methods](./docs/3.customers-and-methods.md) | Saved methods, and off-session and recurring charges |
|
|
114
|
-
| [Webhooks](./docs/4.webhooks.md) | Verification, the event set, and handling |
|
|
115
|
-
| [Provider capability matrix](./docs/5.provider-capability-matrix.md) | What each provider family does behind each call, and why the scope is set |
|
|
116
|
-
|
|
117
97
|
## Conformance suite
|
|
118
98
|
|
|
119
99
|
The package ships a conformance suite, `src/tests/payment.test.ts` and
|
|
@@ -136,6 +116,29 @@ mint a chargeable payment method:
|
|
|
136
116
|
| `ANTELOPE_PAYMENT_TEST_METHOD_DECLINED` | A token the provider declines. Without it the decline block skips. |
|
|
137
117
|
| `ANTELOPE_PAYMENT_TEST_CURRENCY` | ISO-4217 code to run against. Defaults to `EUR`. |
|
|
138
118
|
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
| Document | Contents |
|
|
122
|
+
| -------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
123
|
+
| [Introduction](./docs/1.introduction.md) | Scope, conventions, and installation |
|
|
124
|
+
| [Payments](./docs/2.payments.md) | Checkout, direct payments, authorize and capture, refunds, and errors |
|
|
125
|
+
| [Customers and methods](./docs/3.customers-and-methods.md) | Saved methods, and off-session and recurring charges |
|
|
126
|
+
| [Webhooks](./docs/4.webhooks.md) | Verification, the event set, and handling |
|
|
127
|
+
| [Provider capability matrix](./docs/5.provider-capability-matrix.md) | What each provider family does behind each call, and why the scope is set |
|
|
128
|
+
|
|
129
|
+
## Compatibility
|
|
130
|
+
|
|
131
|
+
<!-- antelopejs-docs-compat:start -->
|
|
132
|
+
|
|
133
|
+
| Package | Supported | Tested with |
|
|
134
|
+
| ---------------------------- | ---------------- | ----------- |
|
|
135
|
+
| `@antelopejs/interface-core` | `>=0.5.1 <0.6.0` | `0.5.1` |
|
|
136
|
+
|
|
137
|
+
<!-- antelopejs-docs-compat:end -->
|
|
138
|
+
|
|
139
|
+
The table lists the peer requirements in `package.json`, not the development or
|
|
140
|
+
test-tool ranges. The implementing module can add requirements of its own.
|
|
141
|
+
|
|
139
142
|
## Contributing
|
|
140
143
|
|
|
141
144
|
Read [CONTRIBUTING.md](./CONTRIBUTING.md). Use the Node.js version in `.nvmrc`
|
|
@@ -153,6 +156,24 @@ pnpm knip
|
|
|
153
156
|
payment provider and no credentials. The provider conformance suite above is a
|
|
154
157
|
separate integration check.
|
|
155
158
|
|
|
159
|
+
## Part of AntelopeJS
|
|
160
|
+
|
|
161
|
+
This package belongs to [AntelopeJS](https://github.com/AntelopeJS/antelopejs), the TypeScript framework where modules depend on contracts and the application chooses the provider. The open-source back office [AntelopeJS DMS](https://github.com/AntelopeJS/dms) is built on it.
|
|
162
|
+
|
|
163
|
+
<!-- antelopejs-framework-modules:start -->
|
|
164
|
+
|
|
165
|
+
| Area | Contracts | Providers |
|
|
166
|
+
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
|
+
| API | [`interface-api`](https://github.com/AntelopeJS/interface-api) · [`interface-api-util`](https://github.com/AntelopeJS/interface-api-util) · [`interface-data-api`](https://github.com/AntelopeJS/interface-data-api) | [`api`](https://github.com/AntelopeJS/api) |
|
|
168
|
+
| Auth | [`interface-auth`](https://github.com/AntelopeJS/interface-auth) | [`auth-jwt`](https://github.com/AntelopeJS/auth-jwt) |
|
|
169
|
+
| Database | [`interface-database`](https://github.com/AntelopeJS/interface-database) · [`interface-database-decorators`](https://github.com/AntelopeJS/interface-database-decorators) · [`interface-database-catalog`](https://github.com/AntelopeJS/interface-database-catalog) · [`interface-mongodb`](https://github.com/AntelopeJS/interface-mongodb) · [`interface-rethinkdb`](https://github.com/AntelopeJS/interface-rethinkdb) | [`postgres`](https://github.com/AntelopeJS/postgres) · [`mysql`](https://github.com/AntelopeJS/mysql) · [`mongodb`](https://github.com/AntelopeJS/mongodb) · [`rethinkdb`](https://github.com/AntelopeJS/rethinkdb) |
|
|
170
|
+
| Redis | [`interface-redis`](https://github.com/AntelopeJS/interface-redis) · [`interface-redis-scheduler`](https://github.com/AntelopeJS/interface-redis-scheduler) | [`redis`](https://github.com/AntelopeJS/redis) |
|
|
171
|
+
| Email | [`interface-email`](https://github.com/AntelopeJS/interface-email) | [`nodemailer`](https://github.com/AntelopeJS/nodemailer) · [`brevo`](https://github.com/AntelopeJS/brevo) |
|
|
172
|
+
| File storage | [`interface-file-storage`](https://github.com/AntelopeJS/interface-file-storage) | [`file-storage-local`](https://github.com/AntelopeJS/file-storage-local) · [`file-storage-s3`](https://github.com/AntelopeJS/file-storage-s3) |
|
|
173
|
+
| Payments | **`interface-payment`** · [`interface-subscriptions`](https://github.com/AntelopeJS/interface-subscriptions) · [`interface-stripe`](https://github.com/AntelopeJS/interface-stripe) | [`stripe`](https://github.com/AntelopeJS/stripe) · [`mollie`](https://github.com/AntelopeJS/mollie) · [`checkout-com`](https://github.com/AntelopeJS/checkout-com) · [`payment-subscriptions`](https://github.com/AntelopeJS/payment-subscriptions) |
|
|
174
|
+
|
|
175
|
+
<!-- antelopejs-framework-modules:end -->
|
|
176
|
+
|
|
156
177
|
## License
|
|
157
178
|
|
|
158
179
|
[Apache-2.0](./LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-payment",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-next.44.g580bf03",
|
|
4
4
|
"description": "Provider-agnostic AntelopeJS payment interface: hosted checkout, direct payments with auth/capture, refunds, saved payment methods, and normalised webhook events",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"lint:fix": "oxlint --fix",
|
|
59
59
|
"lint": "oxlint",
|
|
60
60
|
"prepack": "pnpm run build",
|
|
61
|
-
"release": "pnpm run lint && pnpm run test && pnpm run prepack && release-it",
|
|
61
|
+
"release": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run prepack && release-it",
|
|
62
62
|
"format:check": "oxfmt --check .",
|
|
63
63
|
"knip": "knip",
|
|
64
64
|
"prepare": "if [ -e .git ] && command -v git >/dev/null 2>&1 && command -v lefthook >/dev/null 2>&1 && GIT_DIR=.git GIT_WORK_TREE=. git rev-parse --git-dir >/dev/null 2>&1; then GIT_DIR=.git GIT_WORK_TREE=. lefthook install; fi",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"suppressions:update": "antelopejs-suppressions --update"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@antelopejs/core": "1.
|
|
75
|
-
"@antelopejs/interface-core": ">=0.
|
|
76
|
-
"@antelopejs/tooling-configs": "
|
|
74
|
+
"@antelopejs/core": "~1.23.3",
|
|
75
|
+
"@antelopejs/interface-core": ">=0.5.1 <0.6.0",
|
|
76
|
+
"@antelopejs/tooling-configs": ">=0.8.0 <0.9.0",
|
|
77
77
|
"@types/mocha": "^10.0.10",
|
|
78
78
|
"@types/node": "^22.19.15",
|
|
79
79
|
"eslint-plugin-perfectionist": "^5.11.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"typescript": "^5.9.3"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@antelopejs/interface-core": ">=0.
|
|
91
|
+
"@antelopejs/interface-core": ">=0.5.1 <0.6.0"
|
|
92
92
|
},
|
|
93
93
|
"packageManager": "pnpm@10.6.5",
|
|
94
94
|
"antelopeJs": {
|