@0to1pay/server-sdk 3.1.6 → 3.1.7
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 +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Use this server SDK to sell digital goods or one-time paid access in a Next.js or Node.js app. Create a checkout that sends USDC or USDT directly to your merchant wallet. The hosted beta uses test USDC on Base Sepolia and Ethereum Sepolia and test USDT on TRON Nile. 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
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://pay.0to1pay.com/merchant)
|
|
12
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0to1pay/server-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Hosted beta uses testnet tokens only (no real funds). Add USDC or USDT stablecoin wallet checkout for paid access and digital goods in Next.js or Node.js.",
|