@0to1pay/fulfillment-sdk 3.1.0 → 3.1.1
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 +6 -6
- package/package.json +14 -2
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 0to1pay Fulfillment SDK
|
|
2
2
|
|
|
3
|
-
|
|
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+.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @0to1pay/server-sdk
|
|
6
|
+
npm install @0to1pay/server-sdk @0to1pay/fulfillment-sdk pg
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
**Run the complete integration.** The [Next.js Base USDC guide](https://0to1pay.com/guides/nextjs-base-usdc) includes a Base Sepolia checkout, raw-body webhook handler, PostgreSQL worker and protected members' route. The same signed delivery can be retried without issuing another pass. [Try the hosted demo](https://0to1pay.com/demo/base-usdc) · [Download the example](https://0to1pay.com/examples/nextjs-base-usdc.zip).
|
|
10
|
+
|
|
11
|
+
Create a [beta merchant project](https://pay.0to1pay.com/merchant) and issue a scoped test key. Point the server SDK at `https://api.0to1pay.com`. The beta uses test tokens on Base Sepolia, Ethereum Sepolia and TRON Nile. [API reference](https://0to1pay.com/docs) · [OpenAPI JSON](https://api.0to1pay.com/openapi.json) · [Markdown quickstart](https://0to1pay.com/guides/nextjs-base-usdc.md).
|
|
12
12
|
|
|
13
13
|
1. Register an HTTPS webhook endpoint for `fulfillment.requested`. Save the returned signing key ID and base64url secret in your backend's secret store. Configure `FulfillmentInbox` with the merchant ID, project ID and environment of the same project, and decode the signing secret with `Buffer.from(secret, 'base64url')`.
|
|
14
14
|
2. Call `migrateFulfillmentInbox(pool)` on your merchant database. Pass the original HTTP body bytes and headers to `FulfillmentInbox.receive`. Acknowledge delivery after the call resolves.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0to1pay/fulfillment-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "0to1Pay signed webhook receiver and PostgreSQL fulfillment worker",
|
|
@@ -35,5 +35,17 @@
|
|
|
35
35
|
"jsonc-parser": "3.3.1",
|
|
36
36
|
"pg": "8.23.1",
|
|
37
37
|
"yaml": "2.9.1"
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://0to1pay.com/sdk",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"stablecoin-payments",
|
|
42
|
+
"usdc",
|
|
43
|
+
"usdt",
|
|
44
|
+
"base",
|
|
45
|
+
"ethereum",
|
|
46
|
+
"tron",
|
|
47
|
+
"nextjs",
|
|
48
|
+
"webhooks",
|
|
49
|
+
"fulfillment"
|
|
50
|
+
]
|
|
39
51
|
}
|