@adonis-agora/payments 0.19.0 → 0.20.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +67 -0
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @adonis-agora/payments
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#148](https://github.com/DavideCarvalho/adonis-agora-payments/pull/148) [`2ae630b`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/2ae630b7393c4e251ce47049b3467282a335326b) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Drop Node 20, which reached end-of-life on 2026-04-30, and Node 22, which AdonisJS 7 does not support (it requires Node >=24): `engines.node` is now `>=24`. The supported Node lines are 24 and 26, and CI runs the test suite on each of them.
8
+
9
+ ## 0.19.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#146](https://github.com/DavideCarvalho/adonis-agora-payments/pull/146) [`c071147`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/c071147d5e455ad3514055db5fb1c19c4279f79a) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Ship a README. The package listed `README.md` in `files` but had none, so its npm page was empty.
14
+
3
15
  ## 0.19.0
4
16
 
5
17
  ### Minor Changes
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # `@adonis-agora/payments`
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@adonis-agora/payments)](https://www.npmjs.com/package/@adonis-agora/payments) [![npm downloads](https://img.shields.io/npm/dm/@adonis-agora/payments)](https://www.npmjs.com/package/@adonis-agora/payments) [![CI](https://github.com/DavideCarvalho/adonis-agora-payments/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/DavideCarvalho/adonis-agora-payments/actions/workflows/ci.yml) [![license](https://img.shields.io/npm/l/@adonis-agora/payments)](https://www.npmjs.com/package/@adonis-agora/payments)
4
+
5
+ > Payments and billing for **AdonisJS** — 18 gateways behind one driver contract, a
6
+ > Cashier-style subscription layer, idempotent webhook processing and invoice emission. Part of
7
+ > the [Agora](https://davidecarvalho.github.io/agora/) ecosystem.
8
+
9
+ **Gateways:** Asaas, AbacatePay, Woovi, Pagar.me, PagBank, Efí, InfinitePay, Mercado Pago ·
10
+ Stripe, Adyen, PayPal, Mollie, Razorpay, Square · Paddle, Lemon Squeezy, Polar, Dodo Payments.
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ node ace add @adonis-agora/payments
16
+ ```
17
+
18
+ ## Use
19
+
20
+ Configure gateways in `config/payments.ts` and route each payment method to one:
21
+
22
+ ```ts
23
+ import env from '#start/env'
24
+ import { defineConfig, payments } from '@adonis-agora/payments'
25
+
26
+ export default defineConfig({
27
+ default: 'asaas',
28
+ providers: {
29
+ asaas: payments.asaas({
30
+ apiKey: env.get('PAYMENTS_ASAAS_KEY'),
31
+ webhookToken: env.get('PAYMENTS_ASAAS_WEBHOOK_TOKEN'),
32
+ }),
33
+ },
34
+ methods: { pix: 'asaas', credit_card: 'asaas' },
35
+ })
36
+ ```
37
+
38
+ Then charge through the routed driver:
39
+
40
+ ```ts
41
+ import { getPayments } from '@adonis-agora/payments/services/main'
42
+
43
+ const payments = getPayments()
44
+
45
+ const customer = await payments.driver('pix').createCustomer({
46
+ name: 'Jane Doe',
47
+ email: 'jane@example.com',
48
+ taxId: '123.456.789-00',
49
+ })
50
+
51
+ const payment = await payments.driver('pix').charge({
52
+ customerId: customer.id,
53
+ amount: 1990, // integer cents: R$ 19,90
54
+ externalReference: order.id, // your own row; comes back on every webhook for this charge
55
+ })
56
+
57
+ // payment.pixCode → the copy-paste BR code to show the customer
58
+ ```
59
+
60
+ ## Documentation
61
+
62
+ Gateways, webhooks, subscriptions and billing, invoices, testing and production notes:
63
+ **https://davidecarvalho.github.io/agora/docs/payments**
64
+
65
+ ## License
66
+
67
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonis-agora/payments",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Billing library for AdonisJS — 18 payment gateways behind one driver contract, with a Cashier-style subscription billing layer: Billable mixin, Lucid stores, idempotent webhook processing and an optional Durable-backed dispatcher. Part of the Agora ecosystem.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -168,7 +168,7 @@
168
168
  }
169
169
  },
170
170
  "devDependencies": {
171
- "@adonis-agora/payments-dashboard": "0.4.0",
171
+ "@adonis-agora/payments-dashboard": "0.5.0",
172
172
  "@adonisjs/assembler": "8.5.2",
173
173
  "@adonisjs/core": "7.6.0",
174
174
  "@adonisjs/lucid": "22.4.2",
@@ -185,7 +185,7 @@
185
185
  "vitest": "5.0.4"
186
186
  },
187
187
  "engines": {
188
- "node": ">=20.6.0"
188
+ "node": ">=24"
189
189
  },
190
190
  "scripts": {
191
191
  "build": "tsc -p tsconfig.json && pnpm run copy:stubs && pnpm run copy:spa",