@marcohefti/request-network-api-contracts 0.6.2 → 0.7.0

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": {
@@ -448,6 +600,24 @@
448
600
  "clientUserId": {
449
601
  "type": "string",
450
602
  "description": "Client user identifier associated with the webhook when available."
603
+ },
604
+ "clientId": {
605
+ "type": "string",
606
+ "description": "Platform Client ID associated with the event."
607
+ },
608
+ "orchestratorId": {
609
+ "type": "string",
610
+ "description": "Orchestrator associated with the event when applicable."
611
+ },
612
+ "payerAddress": {
613
+ "type": "string",
614
+ "nullable": true,
615
+ "description": "Resolved payer wallet when available."
616
+ },
617
+ "payerEoaAddress": {
618
+ "type": "string",
619
+ "nullable": true,
620
+ "description": "Connected payer EOA when available."
451
621
  }
452
622
  },
453
623
  "required": [
@@ -731,26 +901,261 @@
731
901
  }
732
902
  ],
733
903
  "description": "Recurring request generated from an existing request."
904
+ },
905
+ "ClientIdLinkedEvent": {
906
+ "allOf": [
907
+ {
908
+ "$ref": "#/components/schemas/WebhookBase"
909
+ },
910
+ {
911
+ "type": "object",
912
+ "additionalProperties": true,
913
+ "properties": {
914
+ "event": {
915
+ "const": "client_id.linked"
916
+ },
917
+ "clientId": {
918
+ "type": "string"
919
+ },
920
+ "orchestratorId": {
921
+ "type": "string"
922
+ },
923
+ "linkId": {
924
+ "type": "string"
925
+ },
926
+ "intentId": {
927
+ "type": "string"
928
+ },
929
+ "externalId": {
930
+ "type": "string"
931
+ },
932
+ "destinationId": {
933
+ "type": "string"
934
+ },
935
+ "destinationWalletAddress": {
936
+ "type": "string"
937
+ },
938
+ "chain": {
939
+ "type": "string"
940
+ },
941
+ "currency": {
942
+ "type": "string"
943
+ },
944
+ "timestamp": {
945
+ "type": "string",
946
+ "format": "date-time"
947
+ }
948
+ },
949
+ "required": [
950
+ "event",
951
+ "clientId",
952
+ "orchestratorId",
953
+ "linkId",
954
+ "intentId",
955
+ "externalId",
956
+ "destinationId",
957
+ "destinationWalletAddress",
958
+ "chain",
959
+ "currency",
960
+ "timestamp"
961
+ ]
962
+ }
963
+ ],
964
+ "description": "Orchestrator-only hosted onboarding completion event."
965
+ },
966
+ "KytScreeningCompletedEvent": {
967
+ "allOf": [
968
+ {
969
+ "$ref": "#/components/schemas/WebhookBase"
970
+ },
971
+ {
972
+ "type": "object",
973
+ "additionalProperties": true,
974
+ "properties": {
975
+ "event": {
976
+ "const": "kyt.screening.completed"
977
+ },
978
+ "paymentToken": {
979
+ "type": "string"
980
+ },
981
+ "clientId": {
982
+ "type": "string"
983
+ },
984
+ "orchestratorId": {
985
+ "type": "string"
986
+ },
987
+ "walletAddress": {
988
+ "type": "string"
989
+ },
990
+ "eoaAddress": {
991
+ "type": "string"
992
+ },
993
+ "smartAccountAddress": {
994
+ "type": "string",
995
+ "nullable": true
996
+ },
997
+ "status": {
998
+ "type": "string",
999
+ "enum": [
1000
+ "approved",
1001
+ "rejected"
1002
+ ]
1003
+ },
1004
+ "provider": {
1005
+ "type": "string"
1006
+ },
1007
+ "policyId": {
1008
+ "type": "string",
1009
+ "nullable": true
1010
+ },
1011
+ "timestamp": {
1012
+ "type": "string",
1013
+ "format": "date-time"
1014
+ }
1015
+ },
1016
+ "required": [
1017
+ "event",
1018
+ "paymentToken",
1019
+ "clientId",
1020
+ "walletAddress",
1021
+ "eoaAddress",
1022
+ "status",
1023
+ "provider",
1024
+ "timestamp"
1025
+ ]
1026
+ }
1027
+ ],
1028
+ "description": "Definitive Secure Payment KYT result."
1029
+ },
1030
+ "SecurePaymentUserEvent": {
1031
+ "allOf": [
1032
+ {
1033
+ "$ref": "#/components/schemas/WebhookBase"
1034
+ },
1035
+ {
1036
+ "type": "object",
1037
+ "additionalProperties": true,
1038
+ "properties": {
1039
+ "event": {
1040
+ "const": "secure_payment.user_event"
1041
+ },
1042
+ "userEvent": {
1043
+ "type": "string",
1044
+ "enum": [
1045
+ "wallet_connected",
1046
+ "payment_sent_to_wallet",
1047
+ "payment_approved_in_wallet"
1048
+ ]
1049
+ },
1050
+ "securePaymentToken": {
1051
+ "type": "string"
1052
+ },
1053
+ "requestId": {
1054
+ "type": "string"
1055
+ },
1056
+ "requestIds": {
1057
+ "type": "array",
1058
+ "items": {
1059
+ "type": "string"
1060
+ }
1061
+ },
1062
+ "clientId": {
1063
+ "type": "string"
1064
+ },
1065
+ "orchestratorId": {
1066
+ "type": "string"
1067
+ },
1068
+ "occurredAt": {
1069
+ "type": "string",
1070
+ "format": "date-time"
1071
+ },
1072
+ "timestamp": {
1073
+ "type": "string",
1074
+ "format": "date-time"
1075
+ },
1076
+ "properties": {
1077
+ "type": "object",
1078
+ "additionalProperties": true
1079
+ }
1080
+ },
1081
+ "required": [
1082
+ "event",
1083
+ "userEvent",
1084
+ "securePaymentToken",
1085
+ "requestIds",
1086
+ "clientId",
1087
+ "occurredAt",
1088
+ "timestamp",
1089
+ "properties"
1090
+ ]
1091
+ }
1092
+ ],
1093
+ "description": "Best-effort browser activity; never settlement proof."
1094
+ },
1095
+ "SecurePaymentAccessRejectedEvent": {
1096
+ "allOf": [
1097
+ {
1098
+ "$ref": "#/components/schemas/WebhookBase"
1099
+ },
1100
+ {
1101
+ "type": "object",
1102
+ "additionalProperties": true,
1103
+ "properties": {
1104
+ "event": {
1105
+ "const": "secure_payment.access_rejected"
1106
+ },
1107
+ "requestId": {
1108
+ "type": "string"
1109
+ },
1110
+ "clientId": {
1111
+ "type": "string"
1112
+ },
1113
+ "orchestratorId": {
1114
+ "type": "string"
1115
+ },
1116
+ "attemptedPayerWalletAddress": {
1117
+ "type": "string"
1118
+ },
1119
+ "timestamp": {
1120
+ "type": "string",
1121
+ "format": "date-time"
1122
+ }
1123
+ },
1124
+ "required": [
1125
+ "event",
1126
+ "requestId",
1127
+ "clientId",
1128
+ "attemptedPayerWalletAddress",
1129
+ "timestamp"
1130
+ ]
1131
+ }
1132
+ ],
1133
+ "description": "Platform-only payer allowlist rejection event."
734
1134
  }
735
1135
  },
736
1136
  "examples": {
737
1137
  "payment_confirmed": {
738
- "summary": "Example from docs",
1138
+ "summary": "Official current settlement example",
739
1139
  "value": {
740
1140
  "event": "payment.confirmed",
741
- "requestId": "req_test123456789abcdef",
742
- "requestID": "req_test123456789abcdef",
743
- "paymentReference": "0x1234567890abcdef1234567890abcdef12345678",
744
- "explorer": "https://scan.request.network/request/req_test123456789abcdef",
1141
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1142
+ "requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1143
+ "paymentReference": "0x2c3366941274c34c",
1144
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1145
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1146
+ "explorer": "https://scan.request.network/request/0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
745
1147
  "amount": "100.0",
746
1148
  "totalAmountPaid": "100.0",
747
1149
  "expectedAmount": "100.0",
748
- "timestamp": "2025-08-28T12:25:45.995Z",
1150
+ "timestamp": "2025-10-03T14:30:00Z",
749
1151
  "txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
1152
+ "payerAddress": "0x92Fc3406Fc6BB7A76aC63b2E8b9d02b1B9C3e4d5",
1153
+ "payerEoaAddress": "0x7A1F20C4D58E9B0A3C6D4E2F1B8A5C7D9E0F1234",
750
1154
  "network": "ethereum",
751
1155
  "currency": "USDC",
752
1156
  "paymentCurrency": "USDC",
753
1157
  "isCryptoToFiat": false,
1158
+ "subStatus": "",
754
1159
  "paymentProcessor": "request-network",
755
1160
  "fees": [
756
1161
  {
@@ -762,12 +1167,15 @@
762
1167
  }
763
1168
  },
764
1169
  "payment_failed": {
765
- "summary": "Minimal failure example (fields vary by flow)",
1170
+ "summary": "Official current failure example",
766
1171
  "value": {
767
1172
  "event": "payment.failed",
768
- "requestId": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
769
- "subStatus": "failed",
770
- "timestamp": "2025-10-10T12:34:56Z"
1173
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1174
+ "requestID": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1175
+ "paymentReference": "0x2c3366941274c34c",
1176
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1177
+ "subStatus": "insufficient_funds",
1178
+ "paymentProcessor": "request-network"
771
1179
  }
772
1180
  },
773
1181
  "payment_processing": {
@@ -844,6 +1252,72 @@
844
1252
  "timestamp": "2025-11-04T05:21:22.149Z",
845
1253
  "paymentProcessor": "request-network"
846
1254
  }
1255
+ },
1256
+ "client_id_linked": {
1257
+ "summary": "Official hosted onboarding example",
1258
+ "value": {
1259
+ "event": "client_id.linked",
1260
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1261
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1262
+ "linkId": "01ARZ3NDEKTSV4RRFFQ69G5FAX",
1263
+ "intentId": "01ARZ3NDEKTSV4RRFFQ69G5FAY",
1264
+ "externalId": "merchant_123",
1265
+ "destinationId": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e@eip155:8453#B4FD67BB:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
1266
+ "destinationWalletAddress": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1267
+ "chain": "base",
1268
+ "currency": "USDC",
1269
+ "timestamp": "2026-08-14T10:00:00.000Z"
1270
+ }
1271
+ },
1272
+ "kyt_screening_completed": {
1273
+ "summary": "Official definitive KYT example",
1274
+ "value": {
1275
+ "event": "kyt.screening.completed",
1276
+ "paymentToken": "01KYM5CZ51K0N1KJ4F8S73BE3N",
1277
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1278
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1279
+ "walletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1280
+ "eoaAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1281
+ "smartAccountAddress": null,
1282
+ "status": "approved",
1283
+ "provider": "hypernative",
1284
+ "policyId": "11111111-1111-4111-8111-811111111111",
1285
+ "timestamp": "2026-08-14T10:00:00.000Z"
1286
+ }
1287
+ },
1288
+ "secure_payment_user_event": {
1289
+ "summary": "Official Secure Payment Page activity example",
1290
+ "value": {
1291
+ "event": "secure_payment.user_event",
1292
+ "userEvent": "payment_approved_in_wallet",
1293
+ "securePaymentToken": "spt_3fk29ax7",
1294
+ "requestId": "01JD3E6JD46KY4KKV7X9V0MZ7W",
1295
+ "requestIds": [
1296
+ "01JD3E6JD46KY4KKV7X9V0MZ7W"
1297
+ ],
1298
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1299
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1300
+ "occurredAt": "2026-08-05T14:03:21.512Z",
1301
+ "timestamp": "2026-08-05T14:03:22.104Z",
1302
+ "properties": {
1303
+ "wallet_provider": "metamask",
1304
+ "payment_submission_id": "0x6a4fe21b",
1305
+ "payment_submission_id_type": "evm_tx_hash",
1306
+ "selected_source_chain": "base",
1307
+ "payment_type": "single"
1308
+ }
1309
+ }
1310
+ },
1311
+ "secure_payment_access_rejected": {
1312
+ "summary": "Official payer allowlist rejection example",
1313
+ "value": {
1314
+ "event": "secure_payment.access_rejected",
1315
+ "requestId": "0151b394e3c482c5aebaa04eb04508a8db70595470760293f1b258ed96d1fafa93",
1316
+ "clientId": "cli_PLATFORM_CLIENT_ID",
1317
+ "orchestratorId": "01ARZ3NDEKTSV4RRFFQ69G5FAW",
1318
+ "attemptedPayerWalletAddress": "0x2e2e5c79f571ef1658d4c2d3684a1fe97dd30570",
1319
+ "timestamp": "2026-08-10T10:05:00.000Z"
1320
+ }
847
1321
  }
848
1322
  }
849
1323
  }