@0to1pay/fulfillment-sdk 3.1.6 → 3.1.8
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 +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Use this SDK to grant paid access to digital goods after a stablecoin checkout in a Next.js or Node.js app. Verify the signed payment webhook and save it in a PostgreSQL inbox. In your worker, record the order’s entitlement and its fulfillment result in one transaction so a retry preserves a single grant. Requires Node.js 22.20.0+.
|
|
4
4
|
|
|
5
|
-
Choosing how to accept payment for an access pass? [Compare payment options for a Next.js app](https://0to1pay.com/guides/nextjs-access-pass-payments).
|
|
5
|
+
Choosing how to accept payment for an access pass? [Compare payment options for a Next.js app](https://0to1pay.com/guides/nextjs-access-pass-payments?lang=en).
|
|
6
|
+
|
|
7
|
+
**Use a hosted payment link** to add a buy button without building checkout. Create the link for your product in the merchant dashboard. Buyers need a wallet, test tokens and test gas. Your app verifies the signed webhook, records one grant per order for the paying wallet, and checks wallet ownership before unlocking an account. The beta collects no real sales revenue. [Hosted payment link guide](https://0to1pay.com/guides/hosted-payment-links?lang=en) · [한국어 결제 링크 가이드](https://0to1pay.com/guides/hosted-payment-links?lang=ko)
|
|
6
8
|
|
|
7
9
|
## Next.js quickstart
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
**Build a custom checkout.** In the Next.js example, your server creates each order and quote. Its worker handles the example’s `grant_plan` action and grants one access pass after a 0.01 test USDC payment on Base Sepolia. Hosted links send `grant_access` to your own handler. Follow the [Next.js quickstart](https://0to1pay.com/docs?lang=en#nextjs-quickstart) or [한국어 빠른 시작](https://0to1pay.com/docs?lang=ko#nextjs-quickstart). To make a [test purchase](https://0to1pay.com/demo/base-usdc?lang=en), use a Base Sepolia wallet with test USDC and test ETH for gas. If you have already sent the payment, reopen your original order.
|
|
10
12
|
|
|
11
|
-
To run the [Next.js checkout and webhook example from source](https://github.com/0to1pay/nextjs-usdc-access-pass), prepare Node.js 22.20+, writable PostgreSQL, a public HTTPS webhook and a separate continuously running worker. Create a test project and issue a scoped server key. [Merchant dashboard](https://
|
|
13
|
+
To run the [Next.js checkout and webhook example from source](https://github.com/0to1pay/nextjs-usdc-access-pass), prepare Node.js 22.20+, writable PostgreSQL, a public HTTPS webhook and a separate continuously running worker. Create a test project and issue a scoped server key. [Merchant dashboard](https://0to1pay.com/merchant)
|
|
12
14
|
|
|
13
15
|
```sh
|
|
14
16
|
curl -fsSLO https://0to1pay.com/examples/nextjs-base-usdc.zip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0to1pay/fulfillment-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Hosted beta uses testnet tokens only (no real funds). Verify signed checkout webhooks for USDC or USDT and grant paid access with a PostgreSQL worker in Next.js or Node.js.",
|