@marcohefti/request-network-api-contracts 0.6.2 → 0.7.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 +14 -25
- package/docs/OPENAPI-0.31.0-AUDIT.md +91 -0
- package/docs/OVERVIEW.md +8 -11
- package/docs/PUBLISHING.md +7 -8
- package/docs/UPDATE-WORKFLOW.md +13 -16
- package/docs/UPDATES.md +18 -0
- package/fixtures/webhooks/client-id-linked.json +13 -0
- package/fixtures/webhooks/kyt-screening-completed.json +13 -0
- package/fixtures/webhooks/payment-confirmed-fee-extension.json +15 -0
- package/fixtures/webhooks/payment-confirmed.json +10 -5
- package/fixtures/webhooks/payment-failed.json +5 -11
- package/fixtures/webhooks/secure-payment-access-rejected.json +8 -0
- package/fixtures/webhooks/secure-payment-user-event.json +20 -0
- package/package.json +4 -1
- package/scripts/sync-openapi.mjs +266 -0
- package/scripts/sync-webhooks.mjs +139 -0
- package/scripts/verify.js +134 -0
- package/specs/README.md +11 -7
- package/specs/openapi/manifest.json +46 -0
- package/specs/openapi/request-network-auth-openapi.json +1 -0
- package/specs/openapi/request-network-auth-openapi.meta.json +13 -0
- package/specs/openapi/request-network-openapi.json +1 -1
- package/specs/openapi/request-network-openapi.meta.json +11 -2
- package/specs/webhooks/manifest.json +48 -0
- package/specs/webhooks/request-network-webhooks.json +507 -14
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ pnpm add -D @marcohefti/request-network-api-contracts
|
|
|
22
22
|
|
|
23
23
|
## Contents
|
|
24
24
|
|
|
25
|
-
- `specs/openapi/` –
|
|
26
|
-
- `specs/webhooks/` – manually curated webhook schema
|
|
25
|
+
- `specs/openapi/` – separate normalized Request API and Auth API contracts, source metadata, and release manifest.
|
|
26
|
+
- `specs/webhooks/` – manually curated webhook schema and current/legacy event manifest.
|
|
27
27
|
- `fixtures/webhooks/*.json` – canonical webhook payloads used across SDK test suites.
|
|
28
28
|
- `docs/` – release log, update instructions, and parity notes.
|
|
29
29
|
|
|
@@ -38,36 +38,25 @@ pnpm add -D @marcohefti/request-network-api-contracts
|
|
|
38
38
|
|
|
39
39
|
## Updating the spec
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Refresh both upstream documents from this repository:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
This downloads the latest OpenAPI document into the contracts package's `specs/openapi/`, refreshes metadata, and regenerates the TypeScript/Zod outputs. Then verify the contracts package:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
cd ../request-network-api-contracts
|
|
44
|
+
npm run sync:openapi
|
|
45
|
+
npm run sync:webhooks
|
|
51
46
|
npm run verify
|
|
52
47
|
```
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Local schema drift patching
|
|
49
|
+
`sync:openapi` fetches and normalizes the production Request and Auth APIs, applies only documented compatibility patches,
|
|
50
|
+
and records raw/normalized hashes. Client code generation remains the responsibility of each client repository.
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
Webhook fee items preserve their required `type`, `amount`, and `currency` fields while accepting additional
|
|
53
|
+
provider-supplied fields. This follows an authenticated `payment.confirmed` payload that included an unmodeled fee
|
|
54
|
+
extension. A nullable fee `amount` is a compatibility inference from the related Request API fee schema, not a field
|
|
55
|
+
independently confirmed by that webhook payload.
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
cd ../request-network-api-client-ts
|
|
62
|
-
pnpm patch:openapi
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
This keeps contracts as the source of truth inside this workspace while upstream OpenAPI catches up.
|
|
66
|
-
|
|
67
|
-
## Future work
|
|
57
|
+
### Local schema drift patching
|
|
68
58
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
- [ ] Document Git submodule workflow for post-split repositories.
|
|
59
|
+
See `docs/OPENAPI-0.31.0-AUDIT.md` for the operation inventory and the evidence behind nullable-union, fee-drift,
|
|
60
|
+
Secure-Payment-response, and Auth webhook-security patches.
|
|
72
61
|
|
|
73
62
|
See `docs/OVERVIEW.md` for deeper architectural context.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Request API 0.31.0 and Auth API 0.14.0 Audit
|
|
2
|
+
|
|
3
|
+
Audit date: 2026-09-03
|
|
4
|
+
Contracts release: 0.7.0
|
|
5
|
+
Scope: Request Network REST APIs only; the legacy Request SDK is excluded.
|
|
6
|
+
|
|
7
|
+
## Result
|
|
8
|
+
|
|
9
|
+
The production Request API grew from 42 operations in 0.16.1 to 82 operations in 0.31.0. The audited delta is 42 added,
|
|
10
|
+
14 schema-changed, 2 removed, and 26 unchanged operations. The separate Auth API 0.14.0 contributes 26 operations on a
|
|
11
|
+
different host and remains a separate contract to avoid path and credential collisions.
|
|
12
|
+
|
|
13
|
+
Only the production hosts are supported runtime defaults. The raw Request API document also advertises staging and local
|
|
14
|
+
servers; those values are retained in the normalized source for provenance but are not supported environments.
|
|
15
|
+
|
|
16
|
+
## Added Request API operations
|
|
17
|
+
|
|
18
|
+
| Domain | Count | Operations |
|
|
19
|
+
| --- | ---: | --- |
|
|
20
|
+
| Orchestrators | 18 | create orchestrator; link/list/unlink Client IDs; create hosted link intent; create/list/update/disable fee configs; create/get/update/remove branding; create/list/test/deactivate/reactivate webhooks |
|
|
21
|
+
| Secure Payments | 9 | create payout and batch-payout links; get token calldata; preview fees; record intent, multicall intent, and user event; refresh bridge transaction; broadcast Tron transaction |
|
|
22
|
+
| Secure Payment multicall | 2 | create and read multicall payout links |
|
|
23
|
+
| Commerce payments | 7 | generate/execute authorization, capture, and void plus payment status |
|
|
24
|
+
| Journey | 3 | create journey, record journey event, read journey |
|
|
25
|
+
| Health/export/history | 3 | health, dashboard request export, wallet transaction history |
|
|
26
|
+
|
|
27
|
+
The exact method/path/operation IDs are the 42 operations present in the checked-in 0.31.0 document and absent from the
|
|
28
|
+
0.16.1 release. `npm run verify` locks the complete inventory at 82 operations so additions or removals cannot be silent.
|
|
29
|
+
|
|
30
|
+
## Changed existing operations
|
|
31
|
+
|
|
32
|
+
All 14 operations whose normalized operation object changed were reviewed:
|
|
33
|
+
|
|
34
|
+
| Operations | Reviewed impact |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `ClientIdV2Controller_create_v2`, `ClientIdV2Controller_update_v2` | Client-ID fee, domain, and access-policy request/response changes. |
|
|
37
|
+
| `PaymentV2Controller_searchPayments_v2` | Expanded amounts, currencies, networks, fee detail, and pagination response data. |
|
|
38
|
+
| `PayoutV2Controller_payBatchRequest_v2` | Batch transaction and request metadata shape changed. |
|
|
39
|
+
| `RequestControllerV1_getPaymentCalldata_v1`, `RequestControllerV1_getRequestPaymentRoutes_v1`, `RequestControllerV1_getRequestStatus_v1` | Legacy v1 calldata, route, status, and fee schemas changed; retained only for existing consumers. |
|
|
40
|
+
| `RequestControllerV2_getPaymentCalldata_v2`, `RequestControllerV2_getRequestPaymentRoutes_v2`, `RequestControllerV2_getRequestStatus_v2`, `RequestControllerV2_listRequests_v2` | Current request status/routes/calldata expanded; list is Client-ID scoped when wallet is omitted and exposes Client ID/Secure Payment state. |
|
|
41
|
+
| `SecurePaymentController_createSecurePayment_v2`, `SecurePaymentController_findSecurePayment_v2`, `SecurePaymentController_getSecurePaymentByToken_v2` | Request fields expanded, but upstream response schemas regressed to fee-plan-only objects; compatibility schemas preserve the documented and observed hosted-payment responses. |
|
|
42
|
+
|
|
43
|
+
The remaining 26 pre-existing operations compare unchanged after canonical JSON ordering.
|
|
44
|
+
|
|
45
|
+
## Removed operations
|
|
46
|
+
|
|
47
|
+
The obsolete payment-intent send operations are intentionally absent:
|
|
48
|
+
|
|
49
|
+
- `RequestControllerV1_sendPaymentIntent_v1` — `POST /v1/request/{paymentIntentId}/send`
|
|
50
|
+
- `RequestControllerV2_sendPaymentIntent_v2` — `POST /v2/request/payment-intents/{paymentIntentId}`
|
|
51
|
+
|
|
52
|
+
## Auth API ownership
|
|
53
|
+
|
|
54
|
+
Auth API 0.14.0 is stored separately as `request-network-auth-openapi.json` and uses
|
|
55
|
+
`https://auth.request.network`. Its 26 operations cover:
|
|
56
|
+
|
|
57
|
+
- wallet-session registration, login/logout, challenge, and verification (5);
|
|
58
|
+
- Client ID CRUD (5);
|
|
59
|
+
- hosted Client-ID link validation/completion and linked KYT update (3);
|
|
60
|
+
- payee destination lifecycle and lookup (7);
|
|
61
|
+
- platform webhook registration/list/test/toggle/delete (5); and
|
|
62
|
+
- health (1).
|
|
63
|
+
|
|
64
|
+
The upstream Auth document names `session_token` without declaring its security scheme and omits the working `x-client-id`
|
|
65
|
+
alternative from platform webhook operations. Production probes verified Client-ID-scoped webhook create/list/test/delete.
|
|
66
|
+
The normalized contract declares both alternatives only for those five webhook operations.
|
|
67
|
+
|
|
68
|
+
## Explicit compatibility patches
|
|
69
|
+
|
|
70
|
+
The normalized specs declare every patch in `x-contract-patches`; metadata records raw and normalized SHA-256 values.
|
|
71
|
+
|
|
72
|
+
| Patch | Evidence and behavior |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `oas30-nullable-unions` | Both upstream documents declare OpenAPI 3.0 but use JSON Schema `type: [T, null]`. Two-member null unions are converted to `type: T` plus `nullable: true`. Verification rejects remaining type arrays. |
|
|
75
|
+
| `runtime-fee-drift` | Production payload evidence includes fee type `protocol` and nullable fee amounts while the upstream schema omits them. The tolerant enum/nullability patch remains active. |
|
|
76
|
+
| `secure-payment-response-shapes` | The upstream 0.31.0 document incorrectly substitutes a fee-plan snapshot for several hosted-payment responses. Public Secure Payments examples and a redacted production create probe establish `requestIds`, `securePaymentUrl`, and `token`; the fee snapshot is represented as optional `feePlan`. |
|
|
77
|
+
| `platform-webhook-client-id-auth` | A production probe verified `x-client-id` for platform webhook management despite incomplete Auth OpenAPI security annotations. |
|
|
78
|
+
|
|
79
|
+
## Webhook catalogue
|
|
80
|
+
|
|
81
|
+
The webhook contract 0.2.0 adds the current platform/orchestrator events `client_id.linked`, `kyt.screening.completed`,
|
|
82
|
+
`secure_payment.user_event`, and `secure_payment.access_rejected`. Its manifest defines recipients and distinguishes the
|
|
83
|
+
current six-event catalogue from retained legacy fixtures. Fixtures are checked against the event registry during
|
|
84
|
+
`npm run verify`.
|
|
85
|
+
|
|
86
|
+
Sources:
|
|
87
|
+
|
|
88
|
+
- https://api.request.network/open-api/openapi.json
|
|
89
|
+
- https://auth.request.network/open-api/openapi.json
|
|
90
|
+
- https://docs.request.network/api-reference/webhooks
|
|
91
|
+
- https://docs.request.network/api-reference/secure-payments
|
package/docs/OVERVIEW.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Centralise the Request Network REST contracts and test fixtures in one place so
|
|
6
6
|
all language clients stay in sync:
|
|
7
7
|
|
|
8
|
-
- **OpenAPI
|
|
8
|
+
- **OpenAPI specs** - separate Request API and Auth API JSON used to generate DTOs, schema validators,
|
|
9
9
|
and parity tests.
|
|
10
10
|
- **OpenAPI metadata** - etag/fetched-at/source info to track when the spec
|
|
11
11
|
last changed.
|
|
@@ -26,7 +26,9 @@ Git dependency.
|
|
|
26
26
|
│ ├── README.md # explains generated vs manual assets
|
|
27
27
|
│ ├── openapi/
|
|
28
28
|
│ │ ├── request-network-openapi.json
|
|
29
|
-
│ │
|
|
29
|
+
│ │ ├── request-network-auth-openapi.json
|
|
30
|
+
│ │ ├── *.meta.json
|
|
31
|
+
│ │ └── manifest.json
|
|
30
32
|
│ └── webhooks/
|
|
31
33
|
│ └── request-network-webhooks.json
|
|
32
34
|
├── fixtures/
|
|
@@ -51,10 +53,9 @@ Git dependency.
|
|
|
51
53
|
|
|
52
54
|
## Update Workflow
|
|
53
55
|
|
|
54
|
-
1. Refresh
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
document and metadata land in `specs/openapi/`.
|
|
56
|
+
1. Refresh both OpenAPI specs with `npm run sync:openapi` (see
|
|
57
|
+
`docs/UPDATE-WORKFLOW.md`). The contracts repository owns fetch,
|
|
58
|
+
normalization, patch provenance, and release metadata.
|
|
58
59
|
2. Update webhook fixtures in `fixtures/webhooks/` when Request publishes new
|
|
59
60
|
payloads. Pair every new fixture with test coverage in each SDK.
|
|
60
61
|
3. Run `npm run verify` from this repository to confirm the expected files are
|
|
@@ -65,8 +66,4 @@ Git dependency.
|
|
|
65
66
|
5. Append an entry to `docs/UPDATES.md` capturing the date, upstream
|
|
66
67
|
reference, and required SDK follow-up.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- **Track contract versioning** - provide a manifest so SDKs can pin/compare revisions.
|
|
71
|
-
- **Webhook fixture parity automation** - ensure both SDKs validate against the shared payload set.
|
|
72
|
-
- **Document submodule workflow** - outline how downstream repositories should consume this package post-split.
|
|
69
|
+
The package is product-neutral: it contains no connector, WooCommerce, or CamelPay behavior.
|
package/docs/PUBLISHING.md
CHANGED
|
@@ -10,13 +10,13 @@ Use this checklist when preparing a release.
|
|
|
10
10
|
|
|
11
11
|
- [x] `package.json` metadata is correct:
|
|
12
12
|
- `name: "@marcohefti/request-network-api-contracts"`
|
|
13
|
-
- `version` bumped according to the
|
|
13
|
+
- `version` bumped according to the reviewed compatibility change.
|
|
14
14
|
- `"private": false` and `"license": "MIT"`.
|
|
15
15
|
- `"files"` includes `specs`, `fixtures`, `docs`, and `README.md`.
|
|
16
16
|
- [x] `README.md` and `docs/OVERVIEW.md` describe the current contents (OpenAPI,
|
|
17
17
|
webhooks, fixtures) and how SDKs should consume them.
|
|
18
|
-
- [x] OpenAPI
|
|
19
|
-
(see `docs/UPDATE-WORKFLOW.md` step 1).
|
|
18
|
+
- [x] Request/Auth OpenAPI specs, metadata, and manifest are refreshed through
|
|
19
|
+
this repository (see `docs/UPDATE-WORKFLOW.md` step 1).
|
|
20
20
|
- [x] Webhook schema (`specs/webhooks/request-network-webhooks.json`) and
|
|
21
21
|
fixtures under `fixtures/webhooks/**` reflect the latest published webhook
|
|
22
22
|
events.
|
|
@@ -27,8 +27,8 @@ Use this checklist when preparing a release.
|
|
|
27
27
|
|
|
28
28
|
- [x] `docs/UPDATES.md` records the latest contract update (date, summary,
|
|
29
29
|
upstream source, required SDK follow-up).
|
|
30
|
-
- [
|
|
31
|
-
version
|
|
30
|
+
- [x] Tags use `v0.x.y`; breaking pre-1.0 client-contract changes increment the
|
|
31
|
+
minor version.
|
|
32
32
|
|
|
33
33
|
## Publishing Steps (Automated via GitHub Actions)
|
|
34
34
|
|
|
@@ -38,9 +38,8 @@ Publishing is fully automated using GitHub Actions and OIDC trusted publishers.
|
|
|
38
38
|
|
|
39
39
|
1. Bump the version using npm:
|
|
40
40
|
```bash
|
|
41
|
-
npm version patch #
|
|
42
|
-
npm version minor #
|
|
43
|
-
npm version major # for breaking changes (0.5.1 -> 1.0.0)
|
|
41
|
+
npm version patch # compatible contract corrections
|
|
42
|
+
npm version minor # breaking pre-1.0 contract changes
|
|
44
43
|
```
|
|
45
44
|
|
|
46
45
|
2. Push the tag to GitHub:
|
package/docs/UPDATE-WORKFLOW.md
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
# Contracts Update Workflow
|
|
2
2
|
|
|
3
|
-
Use this checklist whenever
|
|
3
|
+
Use this checklist whenever either Request Network REST API publishes contract changes.
|
|
4
4
|
|
|
5
5
|
## 1. Refresh the OpenAPI spec
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`type: "protocol"` and nullable fee amounts).
|
|
15
|
-
- If you are only using this repository, fetch the OpenAPI document directly
|
|
16
|
-
from the upstream Request API (`https://api.request.network/open-api/openapi.json`)
|
|
17
|
-
and update both the JSON and `.meta.json` files under `specs/openapi/`, then
|
|
18
|
-
run `pnpm --filter "./packages/request-network-api-client-ts" patch:openapi`
|
|
19
|
-
from the workspace root before regenerating client artifacts.
|
|
7
|
+
- Run `npm run sync:openapi` in this repository.
|
|
8
|
+
- Review both raw upstream sources against the prior release. Record added,
|
|
9
|
+
removed, and schema-changed operations in an audit document.
|
|
10
|
+
- Review every compatibility patch. Remove one only when upstream contract and
|
|
11
|
+
production evidence agree.
|
|
12
|
+
- Confirm `specs/openapi/manifest.json` names only production runtime hosts and
|
|
13
|
+
records both upstream versions, hashes, patch IDs, and compatible clients.
|
|
20
14
|
|
|
21
15
|
## 2. Update webhook schema (if needed)
|
|
22
16
|
|
|
23
|
-
-
|
|
17
|
+
- Update the fixture and `scripts/sync-webhooks.mjs`, then run
|
|
18
|
+
`npm run sync:webhooks` when Request publishes webhook fields or events.
|
|
19
|
+
- Update `specs/webhooks/manifest.json` to classify current versus legacy events
|
|
20
|
+
and their platform/orchestrator recipients.
|
|
24
21
|
- Keep any breaking changes coordinated across SDKs-update shared enums and validation helpers in the clients immediately after adjusting the schema.
|
|
25
22
|
|
|
26
23
|
## 3. Sync webhook fixtures
|
|
@@ -42,6 +39,6 @@ sizes for a quick sanity check.
|
|
|
42
39
|
## 5. Document and commit
|
|
43
40
|
|
|
44
41
|
- Record the change in `docs/UPDATES.md` (date, summary, upstream source, required SDK follow-up).
|
|
45
|
-
-
|
|
42
|
+
- Release this contracts repository before regenerating and releasing clients.
|
|
46
43
|
|
|
47
44
|
Repeat this workflow whenever the upstream API contract or webhook catalogue changes.
|
package/docs/UPDATES.md
CHANGED
|
@@ -12,6 +12,24 @@ change so SDK maintainers know when to regenerate code.
|
|
|
12
12
|
- **Notes:** Regeneration impact, required SDK updates, new fixtures
|
|
13
13
|
|
|
14
14
|
## History
|
|
15
|
+
- **Date:** 2026-09-08
|
|
16
|
+
- **Spec Version:** contracts 0.7.1
|
|
17
|
+
- **Change Summary:** Opened `WebhookFeeItem` to provider-supplied extensions and made its string `amount` nullable;
|
|
18
|
+
the required `type`, `amount`, and `currency` fields remain unchanged. Added a synthetic null-amount/extension
|
|
19
|
+
regression fixture and guards that preserve the behavior through webhook regeneration.
|
|
20
|
+
- **Source:** Authenticated `payment.confirmed` delivery (fee extension) and related Request API fee schema
|
|
21
|
+
(nullable amount).
|
|
22
|
+
- **Notes:** The extra fee field is confirmed by the webhook delivery. Nullable webhook `amount` is an API-schema
|
|
23
|
+
compatibility inference, not an independently observed webhook field. Regenerate TS/PHP clients against 0.7.1.
|
|
24
|
+
|
|
25
|
+
- **Date:** 2026-09-03
|
|
26
|
+
- **Spec Version:** Request API 0.31.0; Auth API 0.14.0; contracts 0.7.0
|
|
27
|
+
- **Change Summary:** Added the separate Auth contract, synchronized all 82 Request operations, removed two obsolete
|
|
28
|
+
payment-intent send operations, added contract provenance, and expanded the current webhook catalogue.
|
|
29
|
+
- **Source:** https://api.request.network/open-api/openapi.json and https://auth.request.network/open-api/openapi.json
|
|
30
|
+
- **Notes:** Breaking pre-1.0 contract update. Preserves documented fee/runtime drift, normalizes invalid OpenAPI 3.0 null
|
|
31
|
+
unions, and repairs known Secure Payment response/Auth webhook security defects. Requires TS/PHP clients 0.7.0+.
|
|
32
|
+
|
|
15
33
|
- **Date:** 2026-03-10
|
|
16
34
|
- **Spec Version:** 0.16.1 (`fetchedAt` 2026-03-10T07:48:56.668Z)
|
|
17
35
|
- **Change Summary:** Refreshed the upstream Request API OpenAPI fetch metadata. The patched contract JSON stayed unchanged after reapplying the local fee-schema drift patch.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"event": "client_id.linked",
|
|
3
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
4
|
+
"orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
|
|
5
|
+
"linkId": "01ARZ3NDEKTSV4RRFFQ69G5FAX",
|
|
6
|
+
"intentId": "01ARZ3NDEKTSV4RRFFQ69G5FAY",
|
|
7
|
+
"externalId": "merchant_123",
|
|
8
|
+
"destinationId": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e@eip155:8453#B4FD67BB:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
|
|
9
|
+
"destinationWalletAddress": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
|
|
10
|
+
"chain": "base",
|
|
11
|
+
"currency": "USDC",
|
|
12
|
+
"timestamp": "2026-08-14T10:00:00.000Z"
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"event": "kyt.screening.completed",
|
|
3
|
+
"paymentToken": "01KYM5CZ51K0N1KJ4F8S73BE3N",
|
|
4
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
5
|
+
"orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
|
|
6
|
+
"walletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
|
|
7
|
+
"eoaAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
|
|
8
|
+
"smartAccountAddress": null,
|
|
9
|
+
"status": "approved",
|
|
10
|
+
"provider": "hypernative",
|
|
11
|
+
"policyId": "11111111-1111-4111-8111-811111111111",
|
|
12
|
+
"timestamp": "2026-08-14T10:00:00.000Z"
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"event": "payment.confirmed",
|
|
3
|
+
"requestId": "synthetic-payment-confirmed-fee-extension",
|
|
4
|
+
"timestamp": "2026-09-08T00:00:00Z",
|
|
5
|
+
"fees": [
|
|
6
|
+
{
|
|
7
|
+
"type": "network",
|
|
8
|
+
"amount": null,
|
|
9
|
+
"currency": "ETH",
|
|
10
|
+
"syntheticExtension": {
|
|
11
|
+
"fixture": "contract-regression"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"event": "payment.confirmed",
|
|
3
|
-
"requestId": "
|
|
4
|
-
"requestID": "
|
|
5
|
-
"paymentReference": "
|
|
6
|
-
"
|
|
3
|
+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
4
|
+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
5
|
+
"paymentReference": "0x2c3366941274c34c",
|
|
6
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
7
|
+
"orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
|
|
8
|
+
"explorer": "https://scan.request.network/request/0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
7
9
|
"amount": "100.0",
|
|
8
10
|
"totalAmountPaid": "100.0",
|
|
9
11
|
"expectedAmount": "100.0",
|
|
10
|
-
"timestamp": "2025-
|
|
12
|
+
"timestamp": "2025-10-03T14:30:00Z",
|
|
11
13
|
"txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
|
|
14
|
+
"payerAddress": "0x92Fc3406Fc6BB7A76aC63b2E8b9d02b1B9C3e4d5",
|
|
15
|
+
"payerEoaAddress": "0x7A1F20C4D58E9B0A3C6D4E2F1B8A5C7D9E0F1234",
|
|
12
16
|
"network": "ethereum",
|
|
13
17
|
"currency": "USDC",
|
|
14
18
|
"paymentCurrency": "USDC",
|
|
15
19
|
"isCryptoToFiat": false,
|
|
20
|
+
"subStatus": "",
|
|
16
21
|
"paymentProcessor": "request-network",
|
|
17
22
|
"fees": [
|
|
18
23
|
{
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"event": "payment.failed",
|
|
3
|
-
"requestId": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"expectedAmount": "100.0",
|
|
8
|
-
"timestamp": "2025-08-28T18:25:45.995Z",
|
|
9
|
-
"paymentCurrency": "USDC",
|
|
10
|
-
"isCryptoToFiat": true,
|
|
11
|
-
"paymentProcessor": "request-network",
|
|
3
|
+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
4
|
+
"requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
5
|
+
"paymentReference": "0x2c3366941274c34c",
|
|
6
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
12
7
|
"subStatus": "insufficient_funds",
|
|
13
|
-
"
|
|
14
|
-
"retryAfter": "2025-08-29T18:25:45.995Z"
|
|
8
|
+
"paymentProcessor": "request-network"
|
|
15
9
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"event": "secure_payment.access_rejected",
|
|
3
|
+
"requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
|
|
4
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
5
|
+
"orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
|
|
6
|
+
"attemptedPayerWalletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
|
|
7
|
+
"timestamp": "2026-08-10T10:05:00.000Z"
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"event": "secure_payment.user_event",
|
|
3
|
+
"userEvent": "payment_approved_in_wallet",
|
|
4
|
+
"securePaymentToken": "spt_3fk29ax7",
|
|
5
|
+
"requestId": "01JD3E6JD46KY4KKV7X9V0MZ7W",
|
|
6
|
+
"requestIds": [
|
|
7
|
+
"01JD3E6JD46KY4KKV7X9V0MZ7W"
|
|
8
|
+
],
|
|
9
|
+
"clientId": "cli_PLATFORM_CLIENT_ID",
|
|
10
|
+
"orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
|
|
11
|
+
"occurredAt": "2026-08-05T14:03:21.512Z",
|
|
12
|
+
"timestamp": "2026-08-05T14:03:22.104Z",
|
|
13
|
+
"properties": {
|
|
14
|
+
"wallet_provider": "metamask",
|
|
15
|
+
"payment_submission_id": "0x6a4fe21b",
|
|
16
|
+
"payment_submission_id_type": "evm_tx_hash",
|
|
17
|
+
"selected_source_chain": "base",
|
|
18
|
+
"payment_type": "single"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcohefti/request-network-api-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared contracts for Request Network API clients (OpenAPI spec, webhook fixtures).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
"specs",
|
|
19
19
|
"fixtures",
|
|
20
20
|
"docs",
|
|
21
|
+
"scripts",
|
|
21
22
|
"README.md"
|
|
22
23
|
],
|
|
23
24
|
"scripts": {
|
|
25
|
+
"sync:openapi": "node scripts/sync-openapi.mjs",
|
|
26
|
+
"sync:webhooks": "node scripts/sync-webhooks.mjs",
|
|
24
27
|
"verify": "node scripts/verify.js"
|
|
25
28
|
}
|
|
26
29
|
}
|