@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.
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "url": "https://api.request.network/open-api/openapi.json",
3
- "fetchedAt": "2026-03-10T07:48:56.668Z",
3
+ "runtimeBaseUrl": "https://api.request.network",
4
+ "fetchedAt": "2026-09-03T09:13:49.531Z",
4
5
  "etag": null,
5
- "lastModified": null
6
+ "lastModified": null,
7
+ "rawSha256": "6b93f5b4a16cbc84e1bd1b65e4dbab804dbcdeb1ce623c125691f39e0e09bb3a",
8
+ "normalizedSha256": "284d42ef291c5ab83cb3328431112f82d847fb24228f9ca41a5b2f9272ca1ecd",
9
+ "patchStats": {
10
+ "nullableUnions": 8,
11
+ "feeEnums": 4,
12
+ "feeAmounts": 7,
13
+ "securePaymentResponses": 5
14
+ }
6
15
  }
@@ -0,0 +1,48 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "source": "https://docs.request.network/api-reference/webhooks",
4
+ "fetchedAt": "2026-09-03",
5
+ "currentEvents": {
6
+ "client_id.linked": {
7
+ "fixture": "client-id-linked.json",
8
+ "recipients": ["orchestrator"]
9
+ },
10
+ "payment.confirmed": {
11
+ "fixture": "payment-confirmed.json",
12
+ "recipients": ["platform", "orchestrator"]
13
+ },
14
+ "payment.failed": {
15
+ "fixture": "payment-failed.json",
16
+ "recipients": ["platform"]
17
+ },
18
+ "kyt.screening.completed": {
19
+ "fixture": "kyt-screening-completed.json",
20
+ "recipients": ["platform", "orchestrator"]
21
+ },
22
+ "secure_payment.user_event": {
23
+ "fixture": "secure-payment-user-event.json",
24
+ "recipients": ["platform", "orchestrator"]
25
+ },
26
+ "secure_payment.access_rejected": {
27
+ "fixture": "secure-payment-access-rejected.json",
28
+ "recipients": ["platform"]
29
+ }
30
+ },
31
+ "legacyEvents": {
32
+ "payment.partial": "payment-partial.json",
33
+ "payment.refunded": "payment-refunded.json",
34
+ "payment.processing": "payment-processing.json",
35
+ "payment_detail.updated": [
36
+ "payment-detail-approved.json",
37
+ "payment-detail-failed.json",
38
+ "payment-detail-pending.json",
39
+ "payment-detail-verified.json"
40
+ ],
41
+ "compliance.updated": [
42
+ "compliance-approved.json",
43
+ "compliance-pending.json",
44
+ "compliance-rejected.json"
45
+ ],
46
+ "request.recurring": "request-recurring.json"
47
+ }
48
+ }
@@ -2,8 +2,8 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Request Network Webhooks",
5
- "version": "0.1.0",
6
- "description": "Webhook events sent by the Request Network API to subscribed endpoints. Each request is signed with an HMAC-SHA256 hex digest in the `x-request-network-signature` header (computed over the raw JSON body using your webhook secret). This community-maintained spec currently models the documented events (`payment.confirmed`, `payment.failed`, `payment.processing`, `payment_detail.updated`, `compliance.updated`). Additional payment lifecycle events such as \"Payment Partial\" or \"Payment Refunded\" are not yet included because the official docs do not publish canonical identifiers or payload schemas for them."
5
+ "version": "0.2.0",
6
+ "description": "Community-maintained schemas for current Request Network platform/orchestrator webhooks and explicitly classified legacy events. Payload examples follow the official webhook guide fetched 2026-09-03."
7
7
  },
8
8
  "webhooks": {
9
9
  "payment.confirmed": {
@@ -317,6 +317,158 @@
317
317
  }
318
318
  ]
319
319
  }
320
+ },
321
+ "client_id.linked": {
322
+ "post": {
323
+ "summary": "Client ID linked through hosted onboarding",
324
+ "parameters": [
325
+ {
326
+ "$ref": "#/components/parameters/XRequestNetworkSignature"
327
+ }
328
+ ],
329
+ "requestBody": {
330
+ "required": true,
331
+ "content": {
332
+ "application/json": {
333
+ "schema": {
334
+ "$ref": "#/components/schemas/ClientIdLinkedEvent"
335
+ },
336
+ "examples": {
337
+ "client_id_linked": {
338
+ "$ref": "#/components/examples/client_id_linked"
339
+ }
340
+ }
341
+ }
342
+ }
343
+ },
344
+ "responses": {
345
+ "200": {
346
+ "description": "Acknowledged"
347
+ },
348
+ "401": {
349
+ "description": "Signature verification failed"
350
+ }
351
+ },
352
+ "security": [
353
+ {
354
+ "RequestSignatureHMAC": []
355
+ }
356
+ ]
357
+ }
358
+ },
359
+ "kyt.screening.completed": {
360
+ "post": {
361
+ "summary": "KYT screening reached a definitive result",
362
+ "parameters": [
363
+ {
364
+ "$ref": "#/components/parameters/XRequestNetworkSignature"
365
+ }
366
+ ],
367
+ "requestBody": {
368
+ "required": true,
369
+ "content": {
370
+ "application/json": {
371
+ "schema": {
372
+ "$ref": "#/components/schemas/KytScreeningCompletedEvent"
373
+ },
374
+ "examples": {
375
+ "kyt_screening_completed": {
376
+ "$ref": "#/components/examples/kyt_screening_completed"
377
+ }
378
+ }
379
+ }
380
+ }
381
+ },
382
+ "responses": {
383
+ "200": {
384
+ "description": "Acknowledged"
385
+ },
386
+ "401": {
387
+ "description": "Signature verification failed"
388
+ }
389
+ },
390
+ "security": [
391
+ {
392
+ "RequestSignatureHMAC": []
393
+ }
394
+ ]
395
+ }
396
+ },
397
+ "secure_payment.user_event": {
398
+ "post": {
399
+ "summary": "Secure Payment Page user activity",
400
+ "parameters": [
401
+ {
402
+ "$ref": "#/components/parameters/XRequestNetworkSignature"
403
+ }
404
+ ],
405
+ "requestBody": {
406
+ "required": true,
407
+ "content": {
408
+ "application/json": {
409
+ "schema": {
410
+ "$ref": "#/components/schemas/SecurePaymentUserEvent"
411
+ },
412
+ "examples": {
413
+ "secure_payment_user_event": {
414
+ "$ref": "#/components/examples/secure_payment_user_event"
415
+ }
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "responses": {
421
+ "200": {
422
+ "description": "Acknowledged"
423
+ },
424
+ "401": {
425
+ "description": "Signature verification failed"
426
+ }
427
+ },
428
+ "security": [
429
+ {
430
+ "RequestSignatureHMAC": []
431
+ }
432
+ ]
433
+ }
434
+ },
435
+ "secure_payment.access_rejected": {
436
+ "post": {
437
+ "summary": "Payer-wallet access rejected",
438
+ "parameters": [
439
+ {
440
+ "$ref": "#/components/parameters/XRequestNetworkSignature"
441
+ }
442
+ ],
443
+ "requestBody": {
444
+ "required": true,
445
+ "content": {
446
+ "application/json": {
447
+ "schema": {
448
+ "$ref": "#/components/schemas/SecurePaymentAccessRejectedEvent"
449
+ },
450
+ "examples": {
451
+ "secure_payment_access_rejected": {
452
+ "$ref": "#/components/examples/secure_payment_access_rejected"
453
+ }
454
+ }
455
+ }
456
+ }
457
+ },
458
+ "responses": {
459
+ "200": {
460
+ "description": "Acknowledged"
461
+ },
462
+ "401": {
463
+ "description": "Signature verification failed"
464
+ }
465
+ },
466
+ "security": [
467
+ {
468
+ "RequestSignatureHMAC": []
469
+ }
470
+ ]
471
+ }
320
472
  }
321
473
  },
322
474
  "components": {
@@ -342,7 +494,7 @@
342
494
  "schemas": {
343
495
  "WebhookFeeItem": {
344
496
  "type": "object",
345
- "additionalProperties": false,
497
+ "additionalProperties": true,
346
498
  "properties": {
347
499
  "type": {
348
500
  "type": "string",
@@ -350,7 +502,8 @@
350
502
  },
351
503
  "amount": {
352
504
  "type": "string",
353
- "description": "Human-readable amount as a string."
505
+ "description": "Human-readable amount as a string when supplied; nullable for fee records without a settled amount.",
506
+ "nullable": true
354
507
  },
355
508
  "currency": {
356
509
  "type": "string",
@@ -448,6 +601,24 @@
448
601
  "clientUserId": {
449
602
  "type": "string",
450
603
  "description": "Client user identifier associated with the webhook when available."
604
+ },
605
+ "clientId": {
606
+ "type": "string",
607
+ "description": "Platform Client ID associated with the event."
608
+ },
609
+ "orchestratorId": {
610
+ "type": "string",
611
+ "description": "Orchestrator associated with the event when applicable."
612
+ },
613
+ "payerAddress": {
614
+ "type": "string",
615
+ "nullable": true,
616
+ "description": "Resolved payer wallet when available."
617
+ },
618
+ "payerEoaAddress": {
619
+ "type": "string",
620
+ "nullable": true,
621
+ "description": "Connected payer EOA when available."
451
622
  }
452
623
  },
453
624
  "required": [
@@ -731,26 +902,261 @@
731
902
  }
732
903
  ],
733
904
  "description": "Recurring request generated from an existing request."
905
+ },
906
+ "ClientIdLinkedEvent": {
907
+ "allOf": [
908
+ {
909
+ "$ref": "#/components/schemas/WebhookBase"
910
+ },
911
+ {
912
+ "type": "object",
913
+ "additionalProperties": true,
914
+ "properties": {
915
+ "event": {
916
+ "const": "client_id.linked"
917
+ },
918
+ "clientId": {
919
+ "type": "string"
920
+ },
921
+ "orchestratorId": {
922
+ "type": "string"
923
+ },
924
+ "linkId": {
925
+ "type": "string"
926
+ },
927
+ "intentId": {
928
+ "type": "string"
929
+ },
930
+ "externalId": {
931
+ "type": "string"
932
+ },
933
+ "destinationId": {
934
+ "type": "string"
935
+ },
936
+ "destinationWalletAddress": {
937
+ "type": "string"
938
+ },
939
+ "chain": {
940
+ "type": "string"
941
+ },
942
+ "currency": {
943
+ "type": "string"
944
+ },
945
+ "timestamp": {
946
+ "type": "string",
947
+ "format": "date-time"
948
+ }
949
+ },
950
+ "required": [
951
+ "event",
952
+ "clientId",
953
+ "orchestratorId",
954
+ "linkId",
955
+ "intentId",
956
+ "externalId",
957
+ "destinationId",
958
+ "destinationWalletAddress",
959
+ "chain",
960
+ "currency",
961
+ "timestamp"
962
+ ]
963
+ }
964
+ ],
965
+ "description": "Orchestrator-only hosted onboarding completion event."
966
+ },
967
+ "KytScreeningCompletedEvent": {
968
+ "allOf": [
969
+ {
970
+ "$ref": "#/components/schemas/WebhookBase"
971
+ },
972
+ {
973
+ "type": "object",
974
+ "additionalProperties": true,
975
+ "properties": {
976
+ "event": {
977
+ "const": "kyt.screening.completed"
978
+ },
979
+ "paymentToken": {
980
+ "type": "string"
981
+ },
982
+ "clientId": {
983
+ "type": "string"
984
+ },
985
+ "orchestratorId": {
986
+ "type": "string"
987
+ },
988
+ "walletAddress": {
989
+ "type": "string"
990
+ },
991
+ "eoaAddress": {
992
+ "type": "string"
993
+ },
994
+ "smartAccountAddress": {
995
+ "type": "string",
996
+ "nullable": true
997
+ },
998
+ "status": {
999
+ "type": "string",
1000
+ "enum": [
1001
+ "approved",
1002
+ "rejected"
1003
+ ]
1004
+ },
1005
+ "provider": {
1006
+ "type": "string"
1007
+ },
1008
+ "policyId": {
1009
+ "type": "string",
1010
+ "nullable": true
1011
+ },
1012
+ "timestamp": {
1013
+ "type": "string",
1014
+ "format": "date-time"
1015
+ }
1016
+ },
1017
+ "required": [
1018
+ "event",
1019
+ "paymentToken",
1020
+ "clientId",
1021
+ "walletAddress",
1022
+ "eoaAddress",
1023
+ "status",
1024
+ "provider",
1025
+ "timestamp"
1026
+ ]
1027
+ }
1028
+ ],
1029
+ "description": "Definitive Secure Payment KYT result."
1030
+ },
1031
+ "SecurePaymentUserEvent": {
1032
+ "allOf": [
1033
+ {
1034
+ "$ref": "#/components/schemas/WebhookBase"
1035
+ },
1036
+ {
1037
+ "type": "object",
1038
+ "additionalProperties": true,
1039
+ "properties": {
1040
+ "event": {
1041
+ "const": "secure_payment.user_event"
1042
+ },
1043
+ "userEvent": {
1044
+ "type": "string",
1045
+ "enum": [
1046
+ "wallet_connected",
1047
+ "payment_sent_to_wallet",
1048
+ "payment_approved_in_wallet"
1049
+ ]
1050
+ },
1051
+ "securePaymentToken": {
1052
+ "type": "string"
1053
+ },
1054
+ "requestId": {
1055
+ "type": "string"
1056
+ },
1057
+ "requestIds": {
1058
+ "type": "array",
1059
+ "items": {
1060
+ "type": "string"
1061
+ }
1062
+ },
1063
+ "clientId": {
1064
+ "type": "string"
1065
+ },
1066
+ "orchestratorId": {
1067
+ "type": "string"
1068
+ },
1069
+ "occurredAt": {
1070
+ "type": "string",
1071
+ "format": "date-time"
1072
+ },
1073
+ "timestamp": {
1074
+ "type": "string",
1075
+ "format": "date-time"
1076
+ },
1077
+ "properties": {
1078
+ "type": "object",
1079
+ "additionalProperties": true
1080
+ }
1081
+ },
1082
+ "required": [
1083
+ "event",
1084
+ "userEvent",
1085
+ "securePaymentToken",
1086
+ "requestIds",
1087
+ "clientId",
1088
+ "occurredAt",
1089
+ "timestamp",
1090
+ "properties"
1091
+ ]
1092
+ }
1093
+ ],
1094
+ "description": "Best-effort browser activity; never settlement proof."
1095
+ },
1096
+ "SecurePaymentAccessRejectedEvent": {
1097
+ "allOf": [
1098
+ {
1099
+ "$ref": "#/components/schemas/WebhookBase"
1100
+ },
1101
+ {
1102
+ "type": "object",
1103
+ "additionalProperties": true,
1104
+ "properties": {
1105
+ "event": {
1106
+ "const": "secure_payment.access_rejected"
1107
+ },
1108
+ "requestId": {
1109
+ "type": "string"
1110
+ },
1111
+ "clientId": {
1112
+ "type": "string"
1113
+ },
1114
+ "orchestratorId": {
1115
+ "type": "string"
1116
+ },
1117
+ "attemptedPayerWalletAddress": {
1118
+ "type": "string"
1119
+ },
1120
+ "timestamp": {
1121
+ "type": "string",
1122
+ "format": "date-time"
1123
+ }
1124
+ },
1125
+ "required": [
1126
+ "event",
1127
+ "requestId",
1128
+ "clientId",
1129
+ "attemptedPayerWalletAddress",
1130
+ "timestamp"
1131
+ ]
1132
+ }
1133
+ ],
1134
+ "description": "Platform-only payer allowlist rejection event."
734
1135
  }
735
1136
  },
736
1137
  "examples": {
737
1138
  "payment_confirmed": {
738
- "summary": "Example from docs",
1139
+ "summary": "Official current settlement example",
739
1140
  "value": {
740
1141
  "event": "payment.confirmed",
741
- "requestId": "req_test123456789abcdef",
742
- "requestID": "req_test123456789abcdef",
743
- "paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
744
- "explorer": "https://scan.request.network/request/req_test123456789abcdef",
1142
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1143
+ "requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1144
+ "paymentReference": "0x2c3366941274c34c",
1145
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1146
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1147
+ "explorer": "https://scan.request.network/request/0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
745
1148
  "amount": "100.0",
746
1149
  "totalAmountPaid": "100.0",
747
1150
  "expectedAmount": "100.0",
748
- "timestamp": "2025-08-28T12:25:45.995Z",
1151
+ "timestamp": "2025-10-03T14:30:00Z",
749
1152
  "txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
1153
+ "payerAddress": "0x92Fc3406Fc6BB7A76aC63b2E8b9d02b1B9C3e4d5",
1154
+ "payerEoaAddress": "0x7A1F20C4D58E9B0A3C6D4E2F1B8A5C7D9E0F1234",
750
1155
  "network": "ethereum",
751
1156
  "currency": "USDC",
752
1157
  "paymentCurrency": "USDC",
753
1158
  "isCryptoToFiat": false,
1159
+ "subStatus": "",
754
1160
  "paymentProcessor": "request-network",
755
1161
  "fees": [
756
1162
  {
@@ -762,12 +1168,15 @@
762
1168
  }
763
1169
  },
764
1170
  "payment_failed": {
765
- "summary": "Minimal failure example (fields vary by flow)",
1171
+ "summary": "Official current failure example",
766
1172
  "value": {
767
1173
  "event": "payment.failed",
768
- "requestId": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
769
- "subStatus": "failed",
770
- "timestamp": "2025-10-10T12:34:56Z"
1174
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1175
+ "requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1176
+ "paymentReference": "0x2c3366941274c34c",
1177
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1178
+ "subStatus": "insufficient_funds",
1179
+ "paymentProcessor": "request-network"
771
1180
  }
772
1181
  },
773
1182
  "payment_processing": {
@@ -844,6 +1253,90 @@
844
1253
  "timestamp": "2025-11-04T05:21:22.149Z",
845
1254
  "paymentProcessor": "request-network"
846
1255
  }
1256
+ },
1257
+ "client_id_linked": {
1258
+ "summary": "Official hosted onboarding example",
1259
+ "value": {
1260
+ "event": "client_id.linked",
1261
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1262
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1263
+ "linkId": "01ARZ3NDEKTSV4RRFFQ69G5FAX",
1264
+ "intentId": "01ARZ3NDEKTSV4RRFFQ69G5FAY",
1265
+ "externalId": "merchant_123",
1266
+ "destinationId": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e@eip155:8453#B4FD67BB:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
1267
+ "destinationWalletAddress": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1268
+ "chain": "base",
1269
+ "currency": "USDC",
1270
+ "timestamp": "2026-08-14T10:00:00.000Z"
1271
+ }
1272
+ },
1273
+ "kyt_screening_completed": {
1274
+ "summary": "Official definitive KYT example",
1275
+ "value": {
1276
+ "event": "kyt.screening.completed",
1277
+ "paymentToken": "01KYM5CZ51K0N1KJ4F8S73BE3N",
1278
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1279
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1280
+ "walletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1281
+ "eoaAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1282
+ "smartAccountAddress": null,
1283
+ "status": "approved",
1284
+ "provider": "hypernative",
1285
+ "policyId": "11111111-1111-4111-8111-811111111111",
1286
+ "timestamp": "2026-08-14T10:00:00.000Z"
1287
+ }
1288
+ },
1289
+ "secure_payment_user_event": {
1290
+ "summary": "Official Secure Payment Page activity example",
1291
+ "value": {
1292
+ "event": "secure_payment.user_event",
1293
+ "userEvent": "payment_approved_in_wallet",
1294
+ "securePaymentToken": "spt_3fk29ax7",
1295
+ "requestId": "01JD3E6JD46KY4KKV7X9V0MZ7W",
1296
+ "requestIds": [
1297
+ "01JD3E6JD46KY4KKV7X9V0MZ7W"
1298
+ ],
1299
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1300
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1301
+ "occurredAt": "2026-08-05T14:03:21.512Z",
1302
+ "timestamp": "2026-08-05T14:03:22.104Z",
1303
+ "properties": {
1304
+ "wallet_provider": "metamask",
1305
+ "payment_submission_id": "0x6a4fe21b",
1306
+ "payment_submission_id_type": "evm_tx_hash",
1307
+ "selected_source_chain": "base",
1308
+ "payment_type": "single"
1309
+ }
1310
+ }
1311
+ },
1312
+ "secure_payment_access_rejected": {
1313
+ "summary": "Official payer allowlist rejection example",
1314
+ "value": {
1315
+ "event": "secure_payment.access_rejected",
1316
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1317
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1318
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1319
+ "attemptedPayerWalletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1320
+ "timestamp": "2026-08-10T10:05:00.000Z"
1321
+ }
1322
+ },
1323
+ "payment_confirmed_fee_extension": {
1324
+ "summary": "Synthetic fee-extension compatibility regression",
1325
+ "value": {
1326
+ "event": "payment.confirmed",
1327
+ "requestId": "synthetic-payment-confirmed-fee-extension",
1328
+ "timestamp": "2026-09-08T00:00:00Z",
1329
+ "fees": [
1330
+ {
1331
+ "type": "network",
1332
+ "amount": null,
1333
+ "currency": "ETH",
1334
+ "syntheticExtension": {
1335
+ "fixture": "contract-regression"
1336
+ }
1337
+ }
1338
+ ]
1339
+ }
847
1340
  }
848
1341
  }
849
1342
  }