@0to1pay/fulfillment-sdk 3.1.3 → 3.1.5

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 (2) hide show
  1. package/README.md +7 -10
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -1,15 +1,14 @@
1
1
  # 0to1pay Fulfillment SDK
2
2
 
3
- Verify signed payment webhooks, commit them to a PostgreSQL inbox, and grant a digital entitlement with the matching order in a single merchant transaction. Node.js 22.20.0+.
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
- ## Next.js quickstart
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).
6
6
 
7
- Start with the [integration quickstart](https://0to1pay.com/docs#nextjs-quickstart) or [빠른 시작](https://0to1pay.com/docs?lang=ko#nextjs-quickstart).
7
+ ## Next.js quickstart
8
8
 
9
- - **See the result first.** Inspect the chain transaction, signed webhook and grant for a completed test payment. No wallet is required. [Completed order](https://0to1pay.com/guides/nextjs-base-usdc#completed-order)
10
- - **Make a test purchase.** Connect a Base Sepolia wallet with 0.01 test USDC and test ETH for gas. If you already sent the payment, recover that order and sign its proof. [Live checkout](https://0to1pay.com/demo/base-usdc)
9
+ The Next.js example takes a 0.01 test USDC payment on Base Sepolia and grants the buyer one access pass from a signed webhook. Follow the [Next.js quickstart](https://0to1pay.com/docs#nextjs-quickstart) or [한국어 빠른 시작](https://0to1pay.com/docs?lang=ko#nextjs-quickstart). To make a [test purchase](https://0to1pay.com/demo/base-usdc), use a Base Sepolia wallet with test USDC and test ETH for gas. If you have already sent the payment, reopen your original order.
11
10
 
12
- To run the same merchant on your server, 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://pay.0to1pay.com/merchant)
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://pay.0to1pay.com/merchant)
13
12
 
14
13
  ```sh
15
14
  curl -fsSLO https://0to1pay.com/examples/nextjs-base-usdc.zip
@@ -30,7 +29,7 @@ npm run dev
30
29
  npm run worker
31
30
  ```
32
31
 
33
- Preserve the merchant database and private `.merchant/` directory. The example associates one entitlement with its original order and guest. A signed recovery challenge lets the original paying wallet regain access after cookie loss. [Guide, setup measurements and recovery](https://0to1pay.com/guides/nextjs-base-usdc) · [Machine-readable guide](https://0to1pay.com/guides/nextjs-base-usdc.md)
32
+ Preserve the merchant database and private `.merchant/` directory. The example associates one entitlement with its original order and guest. A signed recovery challenge lets the original paying wallet regain access after cookie loss. [Setup and purchase recovery](https://0to1pay.com/guides/nextjs-base-usdc) · [Machine-readable guide](https://0to1pay.com/guides/nextjs-base-usdc.md)
34
33
 
35
34
  ## Add signed fulfillment to an existing app
36
35
 
@@ -46,12 +45,10 @@ Apply each command at most once and keep entitlements for distinct orders indepe
46
45
 
47
46
  For direct USDC and USDT orders, the platform emits fulfillment commands after it verifies the buyer-approved transfer or records an authorized review. Integrate the [buyer approval steps in the public server SDK guide](https://www.npmjs.com/package/@0to1pay/server-sdk#buyer-approval-for-on-chain-checkout) before offering checkout.
48
47
 
49
- ## Beta pricing and verification
48
+ ## Plans and usage
50
49
 
51
50
  The project can use Sandbox for free with 1,000 metered requests per UTC calendar month. Prepay for 30 days with Starter (9 test tokens / 1,000 requests), Growth (29 / 5,000), or Scale (99 / 25,000). The beta accepts test USDC or USDT at zero real cost. All paid plans include Ethereum Sepolia, Base Sepolia, TRON Nile, the core APIs, webhooks and recovery. Pricing is independent of settled volume and successful payment count.
52
51
 
53
52
  One order creation plus one quote creation uses two requests. With no other metered calls, 500 fresh checkouts consume Starter’s 1,000 requests. Include metered list/configuration reads in your estimate. Same-project, same-key, same-content creation retries count once. At 80% and 95% the API flags usage. At 100%, new starts stop and existing verification, fulfillment and redelivery continue. A manual upgrade charges the difference and retains usage and expiry. Renewals require a manual payment. The service does not bill overages. [Estimate your 30-day cost](https://0to1pay.com/pricing)
54
53
 
55
- A single controlled run on Node 22.23.5/PostgreSQL 17 measured 6.534 s for cold-cache package installation and 10.810 s from setup to ready HTTP with database, HTTPS and credentials prepared. Three public Base Sepolia purchases granted three original-buyer passes with zero duplicate grants. First-merchant self-install time remains unmeasured. [Completed-order evidence](https://0to1pay.com/guides/nextjs-base-usdc#completed-order)
56
-
57
54
  The SDK is available under the MIT license. See the `LICENSE` file included in the package.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@0to1pay/fulfillment-sdk",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "description": "0to1Pay signed webhook receiver and PostgreSQL fulfillment worker",
6
+ "description": "Verify signed checkout webhooks for USDC and USDT payments and grant paid access to digital goods with a PostgreSQL worker for Next.js and Node.js apps.",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/0to1pay/sdk.git",
@@ -46,6 +46,8 @@
46
46
  "tron",
47
47
  "nextjs",
48
48
  "webhooks",
49
- "fulfillment"
49
+ "fulfillment",
50
+ "digital-goods",
51
+ "paid-access"
50
52
  ]
51
53
  }