@0to1pay/server-sdk 0.0.0-stage → 1.0.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.
@@ -0,0 +1,3862 @@
1
+ openapi: 3.1.0
2
+ jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
3
+ info:
4
+ title: 0to1Pay Payment & Fulfillment API
5
+ version: 1.0.0-design
6
+ description: 'Seller API for verified payments and order fulfillment. Start or connect a Stripe Checkout or PayPal
7
+ Orders/Capture payment, or accept USDC or USDT on supported networks. Resource IDs are UUID strings.
8
+ Merchant API keys are scoped to a merchant, project and environment. Provider payment records are deduplicated
9
+ across projects that share the same provider account.'
10
+ servers:
11
+ - url: /v1
12
+ description: Use the origin that serves the OpenAPI document.
13
+ security:
14
+ - ServerKey: []
15
+ tags:
16
+ - name: Payments
17
+ - name: Quotes
18
+ - name: Attempts
19
+ - name: Verification
20
+ - name: Operations
21
+ - name: Connections
22
+ - name: Webhooks
23
+ - name: Events
24
+ - name: Fulfillment
25
+ paths:
26
+ /chain/assets:
27
+ get:
28
+ operationId: listChainAssets
29
+ summary: List supported USDC and USDT deployments on configured networks
30
+ tags: [Connections]
31
+ x-required-scope: payments:read
32
+ responses:
33
+ '200':
34
+ description: Allowlisted assets in rollout order
35
+ content:
36
+ application/json:
37
+ schema:
38
+ $ref: '#/components/schemas/ChainAssets'
39
+ '401':
40
+ $ref: '#/components/responses/Unauthorized'
41
+ '403':
42
+ $ref: '#/components/responses/Forbidden'
43
+ /chain/connections:
44
+ post:
45
+ operationId: createChainConnection
46
+ summary: Create a watch-only chain connection for the scoped merchant
47
+ tags: [Connections]
48
+ x-required-scope: connections:manage
49
+ parameters:
50
+ - $ref: '#/components/parameters/IdempotencyKey'
51
+ requestBody:
52
+ required: true
53
+ content:
54
+ application/json:
55
+ schema:
56
+ $ref: '#/components/schemas/CreateChainConnection'
57
+ responses:
58
+ '201':
59
+ description: Ready connection for a configured chain
60
+ content:
61
+ application/json:
62
+ schema:
63
+ $ref: '#/components/schemas/Connection'
64
+ '400':
65
+ $ref: '#/components/responses/BadRequest'
66
+ '401':
67
+ $ref: '#/components/responses/Unauthorized'
68
+ '403':
69
+ $ref: '#/components/responses/Forbidden'
70
+ '409':
71
+ $ref: '#/components/responses/Conflict'
72
+ '503':
73
+ $ref: '#/components/responses/Unavailable'
74
+ /connections/{connection_id}/chain-recipients:
75
+ parameters:
76
+ - $ref: '#/components/parameters/connection_id'
77
+ post:
78
+ operationId: registerChainRecipients
79
+ summary: Register merchant-controlled one-use stablecoin recipient addresses
80
+ tags: [Connections]
81
+ x-required-scope: connections:manage
82
+ parameters:
83
+ - $ref: '#/components/parameters/IdempotencyKey'
84
+ requestBody:
85
+ required: true
86
+ content:
87
+ application/json:
88
+ schema:
89
+ $ref: '#/components/schemas/RegisterChainRecipients'
90
+ responses:
91
+ '201':
92
+ description: Registered recipients. Signing material is never returned.
93
+ content:
94
+ application/json:
95
+ schema:
96
+ $ref: '#/components/schemas/ChainRecipients'
97
+ '400':
98
+ $ref: '#/components/responses/BadRequest'
99
+ '401':
100
+ $ref: '#/components/responses/Unauthorized'
101
+ '403':
102
+ $ref: '#/components/responses/Forbidden'
103
+ '404':
104
+ $ref: '#/components/responses/NotFound'
105
+ '409':
106
+ $ref: '#/components/responses/Conflict'
107
+ /payments:
108
+ post:
109
+ operationId: createPayment
110
+ summary: Create immutable order payment obligation
111
+ tags:
112
+ - Payments
113
+ x-required-scope: payments:write
114
+ description: Same scoped order_ref/order_revision and identical specification returns the existing resource.
115
+ Changed snapshot requires explicit revision but retains the same business grant identity.
116
+ A project's monthly quota counts distinct orders first created in the current UTC month, including unpaid orders.
117
+ When the quota is reached, new orders return HTTP 429 with code QUOTA_REACHED before any checkout is issued.
118
+ Existing orders can be retried, revised, verified and fulfilled under the usual payment rules.
119
+ parameters:
120
+ - $ref: '#/components/parameters/IdempotencyKey'
121
+ responses:
122
+ '201':
123
+ description: Payment persisted. No money has been charged.
124
+ headers:
125
+ X-Request-Id:
126
+ schema:
127
+ type: string
128
+ format: uuid
129
+ content:
130
+ application/json:
131
+ schema:
132
+ $ref: '#/components/schemas/Payment'
133
+ '400':
134
+ $ref: '#/components/responses/BadRequest'
135
+ '401':
136
+ $ref: '#/components/responses/Unauthorized'
137
+ '403':
138
+ $ref: '#/components/responses/Forbidden'
139
+ '404':
140
+ $ref: '#/components/responses/NotFound'
141
+ '409':
142
+ $ref: '#/components/responses/Conflict'
143
+ '429':
144
+ $ref: '#/components/responses/RateLimited'
145
+ '503':
146
+ $ref: '#/components/responses/Unavailable'
147
+ requestBody:
148
+ required: true
149
+ content:
150
+ application/json:
151
+ schema:
152
+ $ref: '#/components/schemas/CreatePayment'
153
+ get:
154
+ operationId: listPayments
155
+ summary: List scoped payments
156
+ tags:
157
+ - Payments
158
+ x-required-scope: payments:read
159
+ description: ''
160
+ parameters:
161
+ - $ref: '#/components/parameters/Cursor'
162
+ - $ref: '#/components/parameters/Limit'
163
+ responses:
164
+ '200':
165
+ description: Success
166
+ headers:
167
+ X-Request-Id:
168
+ schema:
169
+ type: string
170
+ format: uuid
171
+ content:
172
+ application/json:
173
+ schema:
174
+ $ref: '#/components/schemas/PaymentList'
175
+ '400':
176
+ $ref: '#/components/responses/BadRequest'
177
+ '401':
178
+ $ref: '#/components/responses/Unauthorized'
179
+ '403':
180
+ $ref: '#/components/responses/Forbidden'
181
+ '404':
182
+ $ref: '#/components/responses/NotFound'
183
+ '409':
184
+ $ref: '#/components/responses/Conflict'
185
+ '429':
186
+ $ref: '#/components/responses/RateLimited'
187
+ '503':
188
+ $ref: '#/components/responses/Unavailable'
189
+ /payments/{payment_id}:
190
+ parameters:
191
+ - $ref: '#/components/parameters/payment_id'
192
+ get:
193
+ operationId: getPayment
194
+ summary: Get payment, decision and fulfillment projections
195
+ tags:
196
+ - Payments
197
+ x-required-scope: payments:read
198
+ description: ''
199
+ parameters: []
200
+ responses:
201
+ '200':
202
+ description: Success
203
+ headers:
204
+ X-Request-Id:
205
+ schema:
206
+ type: string
207
+ format: uuid
208
+ content:
209
+ application/json:
210
+ schema:
211
+ $ref: '#/components/schemas/Payment'
212
+ '400':
213
+ $ref: '#/components/responses/BadRequest'
214
+ '401':
215
+ $ref: '#/components/responses/Unauthorized'
216
+ '403':
217
+ $ref: '#/components/responses/Forbidden'
218
+ '404':
219
+ $ref: '#/components/responses/NotFound'
220
+ '409':
221
+ $ref: '#/components/responses/Conflict'
222
+ '429':
223
+ $ref: '#/components/responses/RateLimited'
224
+ '503':
225
+ $ref: '#/components/responses/Unavailable'
226
+ /payments/{payment_id}/quotes:
227
+ parameters:
228
+ - $ref: '#/components/parameters/payment_id'
229
+ post:
230
+ operationId: createQuote
231
+ summary: Freeze provider payable terms
232
+ tags:
233
+ - Quotes
234
+ x-required-scope: payments:write
235
+ description: R1 fiat amount is derived from Payment; no caller amount/recipient override. Quote expiry cannot
236
+ exceed the relevant Payment collection window.
237
+ parameters:
238
+ - $ref: '#/components/parameters/IdempotencyKey'
239
+ responses:
240
+ '201':
241
+ description: Immutable quote created.
242
+ headers:
243
+ X-Request-Id:
244
+ schema:
245
+ type: string
246
+ format: uuid
247
+ content:
248
+ application/json:
249
+ schema:
250
+ $ref: '#/components/schemas/Quote'
251
+ '400':
252
+ $ref: '#/components/responses/BadRequest'
253
+ '401':
254
+ $ref: '#/components/responses/Unauthorized'
255
+ '403':
256
+ $ref: '#/components/responses/Forbidden'
257
+ '404':
258
+ $ref: '#/components/responses/NotFound'
259
+ '409':
260
+ $ref: '#/components/responses/Conflict'
261
+ '429':
262
+ $ref: '#/components/responses/RateLimited'
263
+ '503':
264
+ $ref: '#/components/responses/Unavailable'
265
+ requestBody:
266
+ required: true
267
+ content:
268
+ application/json:
269
+ schema:
270
+ $ref: '#/components/schemas/CreateQuote'
271
+ /quotes/{quote_id}:
272
+ parameters:
273
+ - $ref: '#/components/parameters/quote_id'
274
+ get:
275
+ operationId: getQuote
276
+ summary: Read a frozen quote
277
+ tags:
278
+ - Quotes
279
+ x-required-scope: payments:read
280
+ description: ''
281
+ parameters: []
282
+ responses:
283
+ '200':
284
+ description: Success
285
+ headers:
286
+ X-Request-Id:
287
+ schema:
288
+ type: string
289
+ format: uuid
290
+ content:
291
+ application/json:
292
+ schema:
293
+ $ref: '#/components/schemas/Quote'
294
+ '400':
295
+ $ref: '#/components/responses/BadRequest'
296
+ '401':
297
+ $ref: '#/components/responses/Unauthorized'
298
+ '403':
299
+ $ref: '#/components/responses/Forbidden'
300
+ '404':
301
+ $ref: '#/components/responses/NotFound'
302
+ '409':
303
+ $ref: '#/components/responses/Conflict'
304
+ '429':
305
+ $ref: '#/components/responses/RateLimited'
306
+ '503':
307
+ $ref: '#/components/responses/Unavailable'
308
+ /payments/{payment_id}/attempts:
309
+ parameters:
310
+ - $ref: '#/components/parameters/payment_id'
311
+ post:
312
+ operationId: createAttempt
313
+ summary: Create a provider checkout through 0to1Pay
314
+ tags:
315
+ - Attempts
316
+ x-required-scope: attempts:initiate
317
+ description: Persist Operation/request hash/provider idempotency key before outbound I/O. Persist external
318
+ mapping before exposing next_action. A provider failure does not automatically retry a different payment
319
+ route.
320
+ parameters:
321
+ - $ref: '#/components/parameters/IdempotencyKey'
322
+ responses:
323
+ '201':
324
+ description: Attempt mapping persisted and next action ready.
325
+ headers:
326
+ X-Request-Id:
327
+ schema:
328
+ type: string
329
+ format: uuid
330
+ content:
331
+ application/json:
332
+ schema:
333
+ $ref: '#/components/schemas/AttemptMutationResult'
334
+ '202':
335
+ description: Attempt operation persisted; processing or unknown outcome. Poll same operation.
336
+ headers:
337
+ X-Request-Id:
338
+ schema:
339
+ type: string
340
+ format: uuid
341
+ content:
342
+ application/json:
343
+ schema:
344
+ $ref: '#/components/schemas/AttemptMutationResult'
345
+ '400':
346
+ $ref: '#/components/responses/BadRequest'
347
+ '401':
348
+ $ref: '#/components/responses/Unauthorized'
349
+ '403':
350
+ $ref: '#/components/responses/Forbidden'
351
+ '404':
352
+ $ref: '#/components/responses/NotFound'
353
+ '409':
354
+ $ref: '#/components/responses/Conflict'
355
+ '429':
356
+ $ref: '#/components/responses/RateLimited'
357
+ '503':
358
+ $ref: '#/components/responses/Unavailable'
359
+ requestBody:
360
+ required: true
361
+ content:
362
+ application/json:
363
+ schema:
364
+ $ref: '#/components/schemas/CreateAttempt'
365
+ get:
366
+ operationId: listAttempts
367
+ summary: List every payment attempt
368
+ tags:
369
+ - Attempts
370
+ x-required-scope: payments:read
371
+ description: ''
372
+ parameters:
373
+ - $ref: '#/components/parameters/Cursor'
374
+ - $ref: '#/components/parameters/Limit'
375
+ responses:
376
+ '200':
377
+ description: Success
378
+ headers:
379
+ X-Request-Id:
380
+ schema:
381
+ type: string
382
+ format: uuid
383
+ content:
384
+ application/json:
385
+ schema:
386
+ $ref: '#/components/schemas/AttemptList'
387
+ '400':
388
+ $ref: '#/components/responses/BadRequest'
389
+ '401':
390
+ $ref: '#/components/responses/Unauthorized'
391
+ '403':
392
+ $ref: '#/components/responses/Forbidden'
393
+ '404':
394
+ $ref: '#/components/responses/NotFound'
395
+ '409':
396
+ $ref: '#/components/responses/Conflict'
397
+ '429':
398
+ $ref: '#/components/responses/RateLimited'
399
+ '503':
400
+ $ref: '#/components/responses/Unavailable'
401
+ /payments/{payment_id}/external-attempts:
402
+ parameters:
403
+ - $ref: '#/components/parameters/payment_id'
404
+ post:
405
+ operationId: attachExternalAttempt
406
+ summary: Attach merchant-created checkout
407
+ tags:
408
+ - Attempts
409
+ x-required-scope: attempts:attach
410
+ description: Server only. Verify account/env/order/binding against provider. Bindings from browser-submitted
411
+ IDs are not accepted. Historical imports are observation-only. Inbox events arriving before attachment are
412
+ retained and replayed.
413
+ parameters:
414
+ - $ref: '#/components/parameters/IdempotencyKey'
415
+ responses:
416
+ '201':
417
+ description: External attempt registered for authoritative verification.
418
+ headers:
419
+ X-Request-Id:
420
+ schema:
421
+ type: string
422
+ format: uuid
423
+ content:
424
+ application/json:
425
+ schema:
426
+ $ref: '#/components/schemas/Attempt'
427
+ '400':
428
+ $ref: '#/components/responses/BadRequest'
429
+ '401':
430
+ $ref: '#/components/responses/Unauthorized'
431
+ '403':
432
+ $ref: '#/components/responses/Forbidden'
433
+ '404':
434
+ $ref: '#/components/responses/NotFound'
435
+ '409':
436
+ $ref: '#/components/responses/Conflict'
437
+ '429':
438
+ $ref: '#/components/responses/RateLimited'
439
+ '503':
440
+ $ref: '#/components/responses/Unavailable'
441
+ requestBody:
442
+ required: true
443
+ content:
444
+ application/json:
445
+ schema:
446
+ $ref: '#/components/schemas/AttachExternalAttempt'
447
+ /attempts/{attempt_id}:
448
+ parameters:
449
+ - $ref: '#/components/parameters/attempt_id'
450
+ get:
451
+ operationId: getAttempt
452
+ summary: Get current execution state
453
+ tags:
454
+ - Attempts
455
+ x-required-scope: payments:read
456
+ description: ''
457
+ parameters: []
458
+ responses:
459
+ '200':
460
+ description: Success
461
+ headers:
462
+ X-Request-Id:
463
+ schema:
464
+ type: string
465
+ format: uuid
466
+ content:
467
+ application/json:
468
+ schema:
469
+ $ref: '#/components/schemas/Attempt'
470
+ '400':
471
+ $ref: '#/components/responses/BadRequest'
472
+ '401':
473
+ $ref: '#/components/responses/Unauthorized'
474
+ '403':
475
+ $ref: '#/components/responses/Forbidden'
476
+ '404':
477
+ $ref: '#/components/responses/NotFound'
478
+ '409':
479
+ $ref: '#/components/responses/Conflict'
480
+ '429':
481
+ $ref: '#/components/responses/RateLimited'
482
+ '503':
483
+ $ref: '#/components/responses/Unavailable'
484
+ /attempts/{attempt_id}/confirm:
485
+ parameters:
486
+ - $ref: '#/components/parameters/attempt_id'
487
+ post:
488
+ operationId: confirmAttempt
489
+ summary: Perform required provider confirmation or capture
490
+ tags:
491
+ - Attempts
492
+ x-required-scope: attempts:confirm
493
+ description: PayPal capture may be required after buyer approval. Adapter capability and initiation permission
494
+ are checked. Browser return is only a trigger; authoritative state is reloaded. R1 capture is the exact
495
+ remaining quote obligation, not a client-provided amount.
496
+ parameters:
497
+ - $ref: '#/components/parameters/IdempotencyKey'
498
+ responses:
499
+ '202':
500
+ description: Logical confirm/capture operation durably accepted.
501
+ headers:
502
+ X-Request-Id:
503
+ schema:
504
+ type: string
505
+ format: uuid
506
+ content:
507
+ application/json:
508
+ schema:
509
+ $ref: '#/components/schemas/Operation'
510
+ '400':
511
+ $ref: '#/components/responses/BadRequest'
512
+ '401':
513
+ $ref: '#/components/responses/Unauthorized'
514
+ '403':
515
+ $ref: '#/components/responses/Forbidden'
516
+ '404':
517
+ $ref: '#/components/responses/NotFound'
518
+ '409':
519
+ $ref: '#/components/responses/Conflict'
520
+ '429':
521
+ $ref: '#/components/responses/RateLimited'
522
+ '503':
523
+ $ref: '#/components/responses/Unavailable'
524
+ requestBody:
525
+ required: true
526
+ content:
527
+ application/json:
528
+ schema:
529
+ $ref: '#/components/schemas/ConfirmAttempt'
530
+ /payments/{payment_id}/verify:
531
+ parameters:
532
+ - $ref: '#/components/parameters/payment_id'
533
+ post:
534
+ operationId: requestVerification
535
+ summary: Schedule authoritative evidence verification
536
+ tags:
537
+ - Verification
538
+ x-required-scope: payments:verify
539
+ description: Does not accept paid=true or set success. Requesting verification does not allocate unverified
540
+ evidence.
541
+ parameters:
542
+ - $ref: '#/components/parameters/IdempotencyKey'
543
+ responses:
544
+ '202':
545
+ description: Verification operation queued.
546
+ headers:
547
+ X-Request-Id:
548
+ schema:
549
+ type: string
550
+ format: uuid
551
+ content:
552
+ application/json:
553
+ schema:
554
+ $ref: '#/components/schemas/Operation'
555
+ '400':
556
+ $ref: '#/components/responses/BadRequest'
557
+ '401':
558
+ $ref: '#/components/responses/Unauthorized'
559
+ '403':
560
+ $ref: '#/components/responses/Forbidden'
561
+ '404':
562
+ $ref: '#/components/responses/NotFound'
563
+ '409':
564
+ $ref: '#/components/responses/Conflict'
565
+ '429':
566
+ $ref: '#/components/responses/RateLimited'
567
+ '503':
568
+ $ref: '#/components/responses/Unavailable'
569
+ requestBody:
570
+ required: true
571
+ content:
572
+ application/json:
573
+ schema:
574
+ $ref: '#/components/schemas/VerifyRequest'
575
+ /payments/{payment_id}/cancel:
576
+ parameters:
577
+ - $ref: '#/components/parameters/payment_id'
578
+ post:
579
+ operationId: cancelPayment
580
+ summary: Stop new collection attempts
581
+ tags:
582
+ - Payments
583
+ x-required-scope: payments:write
584
+ description: Preserve every in-flight attempt and late payment. Never infer funds returned from local cancellation.
585
+ parameters:
586
+ - $ref: '#/components/parameters/IdempotencyKey'
587
+ responses:
588
+ '202':
589
+ description: Collection closed locally; any provider cancellation is tracked separately.
590
+ headers:
591
+ X-Request-Id:
592
+ schema:
593
+ type: string
594
+ format: uuid
595
+ content:
596
+ application/json:
597
+ schema:
598
+ $ref: '#/components/schemas/Operation'
599
+ '400':
600
+ $ref: '#/components/responses/BadRequest'
601
+ '401':
602
+ $ref: '#/components/responses/Unauthorized'
603
+ '403':
604
+ $ref: '#/components/responses/Forbidden'
605
+ '404':
606
+ $ref: '#/components/responses/NotFound'
607
+ '409':
608
+ $ref: '#/components/responses/Conflict'
609
+ '429':
610
+ $ref: '#/components/responses/RateLimited'
611
+ '503':
612
+ $ref: '#/components/responses/Unavailable'
613
+ requestBody:
614
+ required: true
615
+ content:
616
+ application/json:
617
+ schema:
618
+ $ref: '#/components/schemas/CancelPayment'
619
+ /payments/{payment_id}/reviews:
620
+ parameters:
621
+ - $ref: '#/components/parameters/payment_id'
622
+ post:
623
+ operationId: reviewPayment
624
+ summary: Record a narrow audited fulfillment decision
625
+ tags:
626
+ - Verification
627
+ x-required-scope: payments:review
628
+ description: Compare expected_resource_version under lock. accept_late_payment requires independent valid
629
+ evidence, bound order, correct full amount/asset/payee/account and timing-only hold; all other blockers
630
+ fail with 409. It does not reopen collection, manufacture money, clear refunds/disputes, change provenance,
631
+ or reissue an existing grant. keep_on_hold and reject_fulfillment record persistent business restrictions;
632
+ reconciliation must not silently discard them. If an effect is already claimed/applied/unknown, preserve
633
+ that fact and return conflict or review without pretending to undo it. Actor comes from auth; reason and
634
+ prior/new decision are immutable audit data. New command/outbox, if justified, uses the existing order/action
635
+ grant identity.
636
+ parameters:
637
+ - $ref: '#/components/parameters/IdempotencyKey'
638
+ responses:
639
+ '201':
640
+ description: Review audit and resulting decision committed atomically.
641
+ headers:
642
+ X-Request-Id:
643
+ schema:
644
+ type: string
645
+ format: uuid
646
+ content:
647
+ application/json:
648
+ schema:
649
+ $ref: '#/components/schemas/ReviewResult'
650
+ '200':
651
+ description: Identical previous review result; no repeated grant.
652
+ headers:
653
+ X-Request-Id:
654
+ schema:
655
+ type: string
656
+ format: uuid
657
+ content:
658
+ application/json:
659
+ schema:
660
+ $ref: '#/components/schemas/ReviewResult'
661
+ '400':
662
+ $ref: '#/components/responses/BadRequest'
663
+ '401':
664
+ $ref: '#/components/responses/Unauthorized'
665
+ '403':
666
+ $ref: '#/components/responses/Forbidden'
667
+ '404':
668
+ $ref: '#/components/responses/NotFound'
669
+ '409':
670
+ $ref: '#/components/responses/Conflict'
671
+ '429':
672
+ $ref: '#/components/responses/RateLimited'
673
+ '503':
674
+ $ref: '#/components/responses/Unavailable'
675
+ requestBody:
676
+ required: true
677
+ content:
678
+ application/json:
679
+ schema:
680
+ $ref: '#/components/schemas/ReviewRequest'
681
+ /operations/{operation_id}:
682
+ parameters:
683
+ - $ref: '#/components/parameters/operation_id'
684
+ get:
685
+ operationId: getOperation
686
+ summary: Inspect an operation without repeating it
687
+ tags:
688
+ - Operations
689
+ x-required-scope: operations:read
690
+ description: ''
691
+ parameters: []
692
+ responses:
693
+ '200':
694
+ description: Success
695
+ headers:
696
+ X-Request-Id:
697
+ schema:
698
+ type: string
699
+ format: uuid
700
+ content:
701
+ application/json:
702
+ schema:
703
+ $ref: '#/components/schemas/Operation'
704
+ '400':
705
+ $ref: '#/components/responses/BadRequest'
706
+ '401':
707
+ $ref: '#/components/responses/Unauthorized'
708
+ '403':
709
+ $ref: '#/components/responses/Forbidden'
710
+ '404':
711
+ $ref: '#/components/responses/NotFound'
712
+ '409':
713
+ $ref: '#/components/responses/Conflict'
714
+ '429':
715
+ $ref: '#/components/responses/RateLimited'
716
+ '503':
717
+ $ref: '#/components/responses/Unavailable'
718
+ /operations/{operation_id}/recover:
719
+ parameters:
720
+ - $ref: '#/components/parameters/operation_id'
721
+ post:
722
+ operationId: recoverOperation
723
+ summary: Recover the same unknown operation
724
+ tags:
725
+ - Operations
726
+ x-required-scope: operations:recover
727
+ description: Never change provider identity/key just to make unknown work look failed. Recovery consults provider
728
+ idempotency retention/capabilities and requires review when safety cannot be established.
729
+ parameters:
730
+ - $ref: '#/components/parameters/IdempotencyKey'
731
+ responses:
732
+ '202':
733
+ description: Recovery scheduled; original operation identity retained.
734
+ headers:
735
+ X-Request-Id:
736
+ schema:
737
+ type: string
738
+ format: uuid
739
+ content:
740
+ application/json:
741
+ schema:
742
+ $ref: '#/components/schemas/Operation'
743
+ '400':
744
+ $ref: '#/components/responses/BadRequest'
745
+ '401':
746
+ $ref: '#/components/responses/Unauthorized'
747
+ '403':
748
+ $ref: '#/components/responses/Forbidden'
749
+ '404':
750
+ $ref: '#/components/responses/NotFound'
751
+ '409':
752
+ $ref: '#/components/responses/Conflict'
753
+ '429':
754
+ $ref: '#/components/responses/RateLimited'
755
+ '503':
756
+ $ref: '#/components/responses/Unavailable'
757
+ requestBody:
758
+ required: true
759
+ content:
760
+ application/json:
761
+ schema:
762
+ $ref: '#/components/schemas/RecoverOperation'
763
+ /connections:
764
+ post:
765
+ operationId: createConnection
766
+ summary: Register provisional merchant provider configuration
767
+ tags:
768
+ - Connections
769
+ x-required-scope: connections:manage
770
+ description: Do not return/log credentials. Creation may persist encrypted provisional configuration WITHOUT
771
+ reserving canonical provider_accounts identity. Caller expected_provider_account_id alone never reserves
772
+ another merchant account. No ready/create/attach is allowed before actual identity and remaining readiness
773
+ checks succeed. Operator-only secret references must already be tenant bound. Canonical account reservation
774
+ occurs only after credentials and authoritative evidence establish actual account/environment/authority;
775
+ then identity is shared across the same merchant projects.
776
+ parameters:
777
+ - $ref: '#/components/parameters/IdempotencyKey'
778
+ responses:
779
+ '201':
780
+ description: Encrypted provisional configuration persisted; identity_verified=false, provider_account_id=null
781
+ until authoritative validation.
782
+ headers:
783
+ X-Request-Id:
784
+ schema:
785
+ type: string
786
+ format: uuid
787
+ content:
788
+ application/json:
789
+ schema:
790
+ $ref: '#/components/schemas/Connection'
791
+ '400':
792
+ $ref: '#/components/responses/BadRequest'
793
+ '401':
794
+ $ref: '#/components/responses/Unauthorized'
795
+ '403':
796
+ $ref: '#/components/responses/Forbidden'
797
+ '404':
798
+ $ref: '#/components/responses/NotFound'
799
+ '409':
800
+ $ref: '#/components/responses/Conflict'
801
+ '429':
802
+ $ref: '#/components/responses/RateLimited'
803
+ '503':
804
+ $ref: '#/components/responses/Unavailable'
805
+ requestBody:
806
+ required: true
807
+ content:
808
+ application/json:
809
+ schema:
810
+ $ref: '#/components/schemas/CreateConnection'
811
+ get:
812
+ operationId: listConnections
813
+ summary: List provider connections
814
+ tags:
815
+ - Connections
816
+ x-required-scope: connections:read
817
+ description: ''
818
+ parameters:
819
+ - $ref: '#/components/parameters/Cursor'
820
+ - $ref: '#/components/parameters/Limit'
821
+ responses:
822
+ '200':
823
+ description: Success
824
+ headers:
825
+ X-Request-Id:
826
+ schema:
827
+ type: string
828
+ format: uuid
829
+ content:
830
+ application/json:
831
+ schema:
832
+ $ref: '#/components/schemas/ConnectionList'
833
+ '400':
834
+ $ref: '#/components/responses/BadRequest'
835
+ '401':
836
+ $ref: '#/components/responses/Unauthorized'
837
+ '403':
838
+ $ref: '#/components/responses/Forbidden'
839
+ '404':
840
+ $ref: '#/components/responses/NotFound'
841
+ '409':
842
+ $ref: '#/components/responses/Conflict'
843
+ '429':
844
+ $ref: '#/components/responses/RateLimited'
845
+ '503':
846
+ $ref: '#/components/responses/Unavailable'
847
+ /connections/{connection_id}:
848
+ parameters:
849
+ - $ref: '#/components/parameters/connection_id'
850
+ get:
851
+ operationId: getConnection
852
+ summary: Get metadata and capabilities, never secrets
853
+ tags:
854
+ - Connections
855
+ x-required-scope: connections:read
856
+ description: ''
857
+ parameters: []
858
+ responses:
859
+ '200':
860
+ description: Success
861
+ headers:
862
+ X-Request-Id:
863
+ schema:
864
+ type: string
865
+ format: uuid
866
+ content:
867
+ application/json:
868
+ schema:
869
+ $ref: '#/components/schemas/Connection'
870
+ '400':
871
+ $ref: '#/components/responses/BadRequest'
872
+ '401':
873
+ $ref: '#/components/responses/Unauthorized'
874
+ '403':
875
+ $ref: '#/components/responses/Forbidden'
876
+ '404':
877
+ $ref: '#/components/responses/NotFound'
878
+ '409':
879
+ $ref: '#/components/responses/Conflict'
880
+ '429':
881
+ $ref: '#/components/responses/RateLimited'
882
+ '503':
883
+ $ref: '#/components/responses/Unavailable'
884
+ /connections/{connection_id}/validate:
885
+ parameters:
886
+ - $ref: '#/components/parameters/connection_id'
887
+ post:
888
+ operationId: validateConnection
889
+ summary: Validate actual account/environment and permissions
890
+ tags:
891
+ - Connections
892
+ x-required-scope: connections:manage
893
+ description: Use official allowlisted endpoints. Optional identity_evidence references a controlled merchant-created
894
+ PayPal Order/Capture retrieved with these credentials. Verify authoritative payee against expected identity
895
+ and these credentials seller context/default payee or independently established provider authority; a caller
896
+ string or arbitrary readable order is insufficient. Reserve canonical provider account only after verified
897
+ identity, under uniqueness/ownership transaction. No automatic real payment/capture is made for validation.
898
+ Unavailable/insufficient evidence leaves identity_verified=false and no canonical reservation.
899
+ parameters:
900
+ - $ref: '#/components/parameters/IdempotencyKey'
901
+ responses:
902
+ '202':
903
+ description: Validation scheduled; provisional connection remains unusable until completed.
904
+ headers:
905
+ X-Request-Id:
906
+ schema:
907
+ type: string
908
+ format: uuid
909
+ content:
910
+ application/json:
911
+ schema:
912
+ $ref: '#/components/schemas/Operation'
913
+ '400':
914
+ $ref: '#/components/responses/BadRequest'
915
+ '401':
916
+ $ref: '#/components/responses/Unauthorized'
917
+ '403':
918
+ $ref: '#/components/responses/Forbidden'
919
+ '404':
920
+ $ref: '#/components/responses/NotFound'
921
+ '409':
922
+ $ref: '#/components/responses/Conflict'
923
+ '429':
924
+ $ref: '#/components/responses/RateLimited'
925
+ '503':
926
+ $ref: '#/components/responses/Unavailable'
927
+ requestBody:
928
+ required: true
929
+ content:
930
+ application/json:
931
+ schema:
932
+ $ref: '#/components/schemas/ConnectionValidation'
933
+ /connections/{connection_id}/credentials:
934
+ parameters:
935
+ - $ref: '#/components/parameters/connection_id'
936
+ post:
937
+ operationId: rotateConnectionCredentials
938
+ summary: Rotate encrypted provider credentials
939
+ tags:
940
+ - Connections
941
+ x-required-scope: connections:manage
942
+ description: Old in-flight webhook secret support follows an explicit rotation window. Secrets are never read
943
+ back.
944
+ parameters:
945
+ - $ref: '#/components/parameters/IdempotencyKey'
946
+ responses:
947
+ '200':
948
+ description: New secret version stored; connection requires validation.
949
+ headers:
950
+ X-Request-Id:
951
+ schema:
952
+ type: string
953
+ format: uuid
954
+ content:
955
+ application/json:
956
+ schema:
957
+ $ref: '#/components/schemas/Connection'
958
+ '400':
959
+ $ref: '#/components/responses/BadRequest'
960
+ '401':
961
+ $ref: '#/components/responses/Unauthorized'
962
+ '403':
963
+ $ref: '#/components/responses/Forbidden'
964
+ '404':
965
+ $ref: '#/components/responses/NotFound'
966
+ '409':
967
+ $ref: '#/components/responses/Conflict'
968
+ '429':
969
+ $ref: '#/components/responses/RateLimited'
970
+ '503':
971
+ $ref: '#/components/responses/Unavailable'
972
+ requestBody:
973
+ required: true
974
+ content:
975
+ application/json:
976
+ schema:
977
+ $ref: '#/components/schemas/RotateConnectionCredentials'
978
+ /connections/{connection_id}/disable:
979
+ parameters:
980
+ - $ref: '#/components/parameters/connection_id'
981
+ post:
982
+ operationId: disableConnection
983
+ summary: Stop new actions for this connection
984
+ tags:
985
+ - Connections
986
+ x-required-scope: connections:manage
987
+ description: Do not erase pending/unknown operations or delivery work.
988
+ parameters:
989
+ - $ref: '#/components/parameters/IdempotencyKey'
990
+ responses:
991
+ '200':
992
+ description: Connection disabled; historic operations/evidence retained.
993
+ headers:
994
+ X-Request-Id:
995
+ schema:
996
+ type: string
997
+ format: uuid
998
+ content:
999
+ application/json:
1000
+ schema:
1001
+ $ref: '#/components/schemas/Connection'
1002
+ '400':
1003
+ $ref: '#/components/responses/BadRequest'
1004
+ '401':
1005
+ $ref: '#/components/responses/Unauthorized'
1006
+ '403':
1007
+ $ref: '#/components/responses/Forbidden'
1008
+ '404':
1009
+ $ref: '#/components/responses/NotFound'
1010
+ '409':
1011
+ $ref: '#/components/responses/Conflict'
1012
+ '429':
1013
+ $ref: '#/components/responses/RateLimited'
1014
+ '503':
1015
+ $ref: '#/components/responses/Unavailable'
1016
+ requestBody:
1017
+ required: true
1018
+ content:
1019
+ application/json:
1020
+ schema:
1021
+ $ref: '#/components/schemas/ConnectionDisable'
1022
+ /webhook-endpoints:
1023
+ post:
1024
+ operationId: createWebhookEndpoint
1025
+ summary: Register merchant event destination
1026
+ tags:
1027
+ - Webhooks
1028
+ x-required-scope: webhooks:manage
1029
+ description: Validate public HTTPS destination, DNS resolution, redirect policy, private networks and tenant
1030
+ ownership rules; localhost only explicit test allowlist. Store one-time creation response encrypted for
1031
+ narrowly scoped idempotent retry; ordinary reads never expose secret.
1032
+ parameters:
1033
+ - $ref: '#/components/parameters/IdempotencyKey'
1034
+ responses:
1035
+ '201':
1036
+ description: Endpoint and one-time signing secret created.
1037
+ headers:
1038
+ X-Request-Id:
1039
+ schema:
1040
+ type: string
1041
+ format: uuid
1042
+ content:
1043
+ application/json:
1044
+ schema:
1045
+ $ref: '#/components/schemas/EndpointCreated'
1046
+ '400':
1047
+ $ref: '#/components/responses/BadRequest'
1048
+ '401':
1049
+ $ref: '#/components/responses/Unauthorized'
1050
+ '403':
1051
+ $ref: '#/components/responses/Forbidden'
1052
+ '404':
1053
+ $ref: '#/components/responses/NotFound'
1054
+ '409':
1055
+ $ref: '#/components/responses/Conflict'
1056
+ '429':
1057
+ $ref: '#/components/responses/RateLimited'
1058
+ '503':
1059
+ $ref: '#/components/responses/Unavailable'
1060
+ requestBody:
1061
+ required: true
1062
+ content:
1063
+ application/json:
1064
+ schema:
1065
+ $ref: '#/components/schemas/CreateWebhookEndpoint'
1066
+ /webhook-endpoints/{endpoint_id}:
1067
+ parameters:
1068
+ - $ref: '#/components/parameters/endpoint_id'
1069
+ get:
1070
+ operationId: getWebhookEndpoint
1071
+ summary: Get merchant event destination metadata
1072
+ tags:
1073
+ - Webhooks
1074
+ x-required-scope: webhooks:read
1075
+ description: ''
1076
+ parameters: []
1077
+ responses:
1078
+ '200':
1079
+ description: Success
1080
+ headers:
1081
+ X-Request-Id:
1082
+ schema:
1083
+ type: string
1084
+ format: uuid
1085
+ content:
1086
+ application/json:
1087
+ schema:
1088
+ $ref: '#/components/schemas/WebhookEndpoint'
1089
+ '400':
1090
+ $ref: '#/components/responses/BadRequest'
1091
+ '401':
1092
+ $ref: '#/components/responses/Unauthorized'
1093
+ '403':
1094
+ $ref: '#/components/responses/Forbidden'
1095
+ '404':
1096
+ $ref: '#/components/responses/NotFound'
1097
+ '409':
1098
+ $ref: '#/components/responses/Conflict'
1099
+ '429':
1100
+ $ref: '#/components/responses/RateLimited'
1101
+ '503':
1102
+ $ref: '#/components/responses/Unavailable'
1103
+ /webhook-endpoints/{endpoint_id}/rotate-secret:
1104
+ parameters:
1105
+ - $ref: '#/components/parameters/endpoint_id'
1106
+ post:
1107
+ operationId: rotateWebhookSecret
1108
+ summary: Rotate merchant event signing secret
1109
+ tags:
1110
+ - Webhooks
1111
+ x-required-scope: webhooks:manage
1112
+ description: Different key_id, overlap bounded; sender chooses new key and consumer accepts allowed old key
1113
+ until cutoff.
1114
+ parameters:
1115
+ - $ref: '#/components/parameters/IdempotencyKey'
1116
+ responses:
1117
+ '200':
1118
+ description: New one-time secret and overlap metadata.
1119
+ headers:
1120
+ X-Request-Id:
1121
+ schema:
1122
+ type: string
1123
+ format: uuid
1124
+ content:
1125
+ application/json:
1126
+ schema:
1127
+ $ref: '#/components/schemas/EndpointCreated'
1128
+ '400':
1129
+ $ref: '#/components/responses/BadRequest'
1130
+ '401':
1131
+ $ref: '#/components/responses/Unauthorized'
1132
+ '403':
1133
+ $ref: '#/components/responses/Forbidden'
1134
+ '404':
1135
+ $ref: '#/components/responses/NotFound'
1136
+ '409':
1137
+ $ref: '#/components/responses/Conflict'
1138
+ '429':
1139
+ $ref: '#/components/responses/RateLimited'
1140
+ '503':
1141
+ $ref: '#/components/responses/Unavailable'
1142
+ requestBody:
1143
+ required: true
1144
+ content:
1145
+ application/json:
1146
+ schema:
1147
+ $ref: '#/components/schemas/RotateWebhookSecret'
1148
+ /webhooks/providers/{connection_id}:
1149
+ parameters:
1150
+ - $ref: '#/components/parameters/connection_id'
1151
+ post:
1152
+ operationId: ingestProviderWebhook
1153
+ summary: Receive original provider webhook bytes
1154
+ tags:
1155
+ - Webhooks
1156
+ security: []
1157
+ description: Provider-specific cryptographic authentication is mandatory despite no bearer scheme. Preserve
1158
+ exact raw body; validate signature, canonical account and environment. Stripe-Signature or the PayPal transmission
1159
+ headers are interpreted by the selected adapter. No 0to1Pay Idempotency-Key is required. Return 2xx only
1160
+ after authenticated inbox persistence (including dedup). Do not synchronously fulfill. Never proxy arbitrary
1161
+ certificate URLs.
1162
+ requestBody:
1163
+ required: true
1164
+ description: Schema differs by pinned provider event version. Raw bytes, not parsed/re-serialized JSON,
1165
+ feed signature verification.
1166
+ content:
1167
+ application/json:
1168
+ schema:
1169
+ type: object
1170
+ additionalProperties: true
1171
+ responses:
1172
+ '202':
1173
+ description: Authenticated event persisted or already present; not payment/fulfillment approval.
1174
+ '400':
1175
+ $ref: '#/components/responses/BadRequest'
1176
+ '401':
1177
+ $ref: '#/components/responses/Unauthorized'
1178
+ '403':
1179
+ $ref: '#/components/responses/Forbidden'
1180
+ '503':
1181
+ $ref: '#/components/responses/Unavailable'
1182
+ /events:
1183
+ get:
1184
+ operationId: listEvents
1185
+ summary: Replay project events by opaque cursor
1186
+ tags:
1187
+ - Events
1188
+ x-required-scope: events:read
1189
+ description: Ordered by committed event sequence within this project/environment. Event bodies immutable.
1190
+ Re-reading events does not reissue grants.
1191
+ parameters:
1192
+ - $ref: '#/components/parameters/Cursor'
1193
+ - $ref: '#/components/parameters/Limit'
1194
+ responses:
1195
+ '200':
1196
+ description: Success
1197
+ headers:
1198
+ X-Request-Id:
1199
+ schema:
1200
+ type: string
1201
+ format: uuid
1202
+ content:
1203
+ application/json:
1204
+ schema:
1205
+ $ref: '#/components/schemas/EventList'
1206
+ '400':
1207
+ $ref: '#/components/responses/BadRequest'
1208
+ '401':
1209
+ $ref: '#/components/responses/Unauthorized'
1210
+ '403':
1211
+ $ref: '#/components/responses/Forbidden'
1212
+ '404':
1213
+ $ref: '#/components/responses/NotFound'
1214
+ '409':
1215
+ $ref: '#/components/responses/Conflict'
1216
+ '429':
1217
+ $ref: '#/components/responses/RateLimited'
1218
+ '503':
1219
+ $ref: '#/components/responses/Unavailable'
1220
+ /fulfillments/{command_id}:
1221
+ parameters:
1222
+ - $ref: '#/components/parameters/command_id'
1223
+ get:
1224
+ operationId: getFulfillment
1225
+ summary: Get command and current execution projections
1226
+ tags:
1227
+ - Fulfillment
1228
+ x-required-scope: fulfillment:read
1229
+ description: ''
1230
+ parameters: []
1231
+ responses:
1232
+ '200':
1233
+ description: Success
1234
+ headers:
1235
+ X-Request-Id:
1236
+ schema:
1237
+ type: string
1238
+ format: uuid
1239
+ content:
1240
+ application/json:
1241
+ schema:
1242
+ $ref: '#/components/schemas/FulfillmentCommand'
1243
+ '400':
1244
+ $ref: '#/components/responses/BadRequest'
1245
+ '401':
1246
+ $ref: '#/components/responses/Unauthorized'
1247
+ '403':
1248
+ $ref: '#/components/responses/Forbidden'
1249
+ '404':
1250
+ $ref: '#/components/responses/NotFound'
1251
+ '409':
1252
+ $ref: '#/components/responses/Conflict'
1253
+ '429':
1254
+ $ref: '#/components/responses/RateLimited'
1255
+ '503':
1256
+ $ref: '#/components/responses/Unavailable'
1257
+ /fulfillments/{command_id}/claim:
1258
+ parameters:
1259
+ - $ref: '#/components/parameters/command_id'
1260
+ post:
1261
+ operationId: claimFulfillment
1262
+ summary: Request fresh execution permission
1263
+ tags:
1264
+ - Fulfillment
1265
+ x-required-scope: fulfillment:execute
1266
+ description: Idempotency binds request/claim identity but bypasses generic cached-success replay. Always recheck
1267
+ claim expiry/revocation, current decision and same grant desired_version. claim validity is time-of-check;
1268
+ later provider changes can require compensation. Same key cannot create a new lease after expiry.
1269
+ parameters:
1270
+ - $ref: '#/components/parameters/IdempotencyKey'
1271
+ responses:
1272
+ '200':
1273
+ description: Current decision, possibly valid=false. Never use HTTP success alone as execution permission.
1274
+ headers:
1275
+ X-Request-Id:
1276
+ schema:
1277
+ type: string
1278
+ format: uuid
1279
+ content:
1280
+ application/json:
1281
+ schema:
1282
+ $ref: '#/components/schemas/Claim'
1283
+ '400':
1284
+ $ref: '#/components/responses/BadRequest'
1285
+ '401':
1286
+ $ref: '#/components/responses/Unauthorized'
1287
+ '403':
1288
+ $ref: '#/components/responses/Forbidden'
1289
+ '404':
1290
+ $ref: '#/components/responses/NotFound'
1291
+ '409':
1292
+ $ref: '#/components/responses/Conflict'
1293
+ '429':
1294
+ $ref: '#/components/responses/RateLimited'
1295
+ '503':
1296
+ $ref: '#/components/responses/Unavailable'
1297
+ requestBody:
1298
+ required: true
1299
+ content:
1300
+ application/json:
1301
+ schema:
1302
+ $ref: '#/components/schemas/ClaimRequest'
1303
+ /fulfillments/{command_id}/results:
1304
+ parameters:
1305
+ - $ref: '#/components/parameters/command_id'
1306
+ post:
1307
+ operationId: reportFulfillmentResult
1308
+ summary: Record the merchant-reported outcome
1309
+ tags:
1310
+ - Fulfillment
1311
+ x-required-scope: fulfillment:results
1312
+ description: A receipt attests the merchant commit; it does not independently prove delivery. Accept late
1313
+ results belonging to a real prior claim, even expired/superseded, and mark review as needed. Conflicting
1314
+ reports append a review record and return conflict; never overwrite silently.
1315
+ parameters:
1316
+ - $ref: '#/components/parameters/IdempotencyKey'
1317
+ responses:
1318
+ '201':
1319
+ description: Outcome durably recorded.
1320
+ headers:
1321
+ X-Request-Id:
1322
+ schema:
1323
+ type: string
1324
+ format: uuid
1325
+ content:
1326
+ application/json:
1327
+ schema:
1328
+ $ref: '#/components/schemas/FulfillmentResult'
1329
+ '200':
1330
+ description: Identical previous outcome returned.
1331
+ headers:
1332
+ X-Request-Id:
1333
+ schema:
1334
+ type: string
1335
+ format: uuid
1336
+ content:
1337
+ application/json:
1338
+ schema:
1339
+ $ref: '#/components/schemas/FulfillmentResult'
1340
+ '400':
1341
+ $ref: '#/components/responses/BadRequest'
1342
+ '401':
1343
+ $ref: '#/components/responses/Unauthorized'
1344
+ '403':
1345
+ $ref: '#/components/responses/Forbidden'
1346
+ '404':
1347
+ $ref: '#/components/responses/NotFound'
1348
+ '409':
1349
+ $ref: '#/components/responses/Conflict'
1350
+ '429':
1351
+ $ref: '#/components/responses/RateLimited'
1352
+ '503':
1353
+ $ref: '#/components/responses/Unavailable'
1354
+ requestBody:
1355
+ required: true
1356
+ content:
1357
+ application/json:
1358
+ schema:
1359
+ $ref: '#/components/schemas/FulfillmentResultInput'
1360
+ /fulfillments/{command_id}/retry-delivery:
1361
+ parameters:
1362
+ - $ref: '#/components/parameters/command_id'
1363
+ post:
1364
+ operationId: retryFulfillmentDelivery
1365
+ summary: Redeliver the same immutable command
1366
+ tags:
1367
+ - Fulfillment
1368
+ x-required-scope: fulfillment:retry
1369
+ description: No new grant identity, no reset of applied/unknown side effects.
1370
+ parameters:
1371
+ - $ref: '#/components/parameters/IdempotencyKey'
1372
+ responses:
1373
+ '202':
1374
+ description: Same command/event queued for delivery retry.
1375
+ headers:
1376
+ X-Request-Id:
1377
+ schema:
1378
+ type: string
1379
+ format: uuid
1380
+ content:
1381
+ application/json:
1382
+ schema:
1383
+ $ref: '#/components/schemas/Operation'
1384
+ '400':
1385
+ $ref: '#/components/responses/BadRequest'
1386
+ '401':
1387
+ $ref: '#/components/responses/Unauthorized'
1388
+ '403':
1389
+ $ref: '#/components/responses/Forbidden'
1390
+ '404':
1391
+ $ref: '#/components/responses/NotFound'
1392
+ '409':
1393
+ $ref: '#/components/responses/Conflict'
1394
+ '429':
1395
+ $ref: '#/components/responses/RateLimited'
1396
+ '503':
1397
+ $ref: '#/components/responses/Unavailable'
1398
+ requestBody:
1399
+ required: true
1400
+ content:
1401
+ application/json:
1402
+ schema:
1403
+ $ref: '#/components/schemas/RetryDelivery'
1404
+ webhooks:
1405
+ stablepayEvent:
1406
+ post:
1407
+ operationId: receiveStablePayEvent
1408
+ summary: Outbound event delivered to merchant registered endpoint
1409
+ security: []
1410
+ description: Authenticate StablePay-Signature against the endpoint key. Exact signing input is UTF8("stablepay.webhook.v1\n"
1411
+ + event_id + "\n" + delivery_id + "\n" + t + "\n") || raw_body_bytes. HMAC-SHA256 lower hex, t Unix seconds;
1412
+ timing-safe compare; default 300 second clock tolerance. Sender refreshes t/delivery_id each network attempt,
1413
+ event body and command identity unchanged. Durable inbox before ACK. 2xx is receipt only.
1414
+ parameters:
1415
+ - name: StablePay-Signature
1416
+ in: header
1417
+ required: true
1418
+ schema:
1419
+ type: string
1420
+ description: t=<unix_seconds>,kid=<key_uuid>,v1=<lowercase_hmac_sha256_hex>
1421
+ - name: StablePay-Event-Id
1422
+ in: header
1423
+ required: true
1424
+ schema:
1425
+ type: string
1426
+ format: uuid
1427
+ description: Must equal immutable body.event_id.
1428
+ - name: StablePay-Delivery-Id
1429
+ in: header
1430
+ required: true
1431
+ schema:
1432
+ type: string
1433
+ format: uuid
1434
+ description: New UUID per network delivery attempt; not in immutable event body.
1435
+ requestBody:
1436
+ required: true
1437
+ content:
1438
+ application/json:
1439
+ schema:
1440
+ $ref: '#/components/schemas/EventEnvelope'
1441
+ responses:
1442
+ '200':
1443
+ description: Event durably accepted; no implication of completed fulfillment.
1444
+ '202':
1445
+ description: Durably queued by merchant.
1446
+ '400':
1447
+ description: Invalid body or conflicting identity.
1448
+ '401':
1449
+ description: Invalid signature or timestamp.
1450
+ '503':
1451
+ description: Not durably accepted; retry same event/command.
1452
+ components:
1453
+ securitySchemes:
1454
+ ServerKey:
1455
+ type: http
1456
+ scheme: bearer
1457
+ description: Opaque secret, hashed in key registry, bound to merchant/project/environment and explicit scopes.
1458
+ Never exposed to browser. No tenant selection headers.
1459
+ parameters:
1460
+ IdempotencyKey:
1461
+ name: Idempotency-Key
1462
+ in: header
1463
+ required: true
1464
+ description: Stable per logical caller mutation, scoped to bound merchant/project/environment + operation.
1465
+ Same key with different canonical request -> 409. Claim responses dynamically revalidate validity. Never
1466
+ required on provider webhook ingress.
1467
+ schema:
1468
+ type: string
1469
+ minLength: 16
1470
+ maxLength: 128
1471
+ pattern: ^[A-Za-z0-9._:-]+$
1472
+ Cursor:
1473
+ name: cursor
1474
+ in: query
1475
+ required: false
1476
+ schema:
1477
+ type: string
1478
+ maxLength: 2048
1479
+ Limit:
1480
+ name: limit
1481
+ in: query
1482
+ required: false
1483
+ schema:
1484
+ type: integer
1485
+ minimum: 1
1486
+ maximum: 100
1487
+ default: 50
1488
+ payment_id:
1489
+ name: payment_id
1490
+ in: path
1491
+ required: true
1492
+ schema:
1493
+ type: string
1494
+ format: uuid
1495
+ attempt_id:
1496
+ name: attempt_id
1497
+ in: path
1498
+ required: true
1499
+ schema:
1500
+ type: string
1501
+ format: uuid
1502
+ quote_id:
1503
+ name: quote_id
1504
+ in: path
1505
+ required: true
1506
+ schema:
1507
+ type: string
1508
+ format: uuid
1509
+ connection_id:
1510
+ name: connection_id
1511
+ in: path
1512
+ required: true
1513
+ schema:
1514
+ type: string
1515
+ format: uuid
1516
+ operation_id:
1517
+ name: operation_id
1518
+ in: path
1519
+ required: true
1520
+ schema:
1521
+ type: string
1522
+ format: uuid
1523
+ command_id:
1524
+ name: command_id
1525
+ in: path
1526
+ required: true
1527
+ schema:
1528
+ type: string
1529
+ format: uuid
1530
+ endpoint_id:
1531
+ name: endpoint_id
1532
+ in: path
1533
+ required: true
1534
+ schema:
1535
+ type: string
1536
+ format: uuid
1537
+ responses:
1538
+ BadRequest:
1539
+ description: Malformed input / unsupported asset or action.
1540
+ content:
1541
+ application/json:
1542
+ schema:
1543
+ $ref: '#/components/schemas/Error'
1544
+ Unauthorized:
1545
+ description: Missing/invalid server credential or provider signature.
1546
+ content:
1547
+ application/json:
1548
+ schema:
1549
+ $ref: '#/components/schemas/Error'
1550
+ Forbidden:
1551
+ description: Scope, environment, account or resource ownership denied.
1552
+ content:
1553
+ application/json:
1554
+ schema:
1555
+ $ref: '#/components/schemas/Error'
1556
+ NotFound:
1557
+ description: Resource not found in caller scope; cross-tenant existence is not disclosed.
1558
+ content:
1559
+ application/json:
1560
+ schema:
1561
+ $ref: '#/components/schemas/Error'
1562
+ Conflict:
1563
+ description: Idempotency payload mismatch, stale revision, unsafe duplicate operation, binding/allocation
1564
+ conflict or contradictory result.
1565
+ content:
1566
+ application/json:
1567
+ schema:
1568
+ $ref: '#/components/schemas/Error'
1569
+ RateLimited:
1570
+ description: Rate limit. Retry read-only operations after Retry-After; retain logical mutation key.
1571
+ headers:
1572
+ Retry-After:
1573
+ schema:
1574
+ type: string
1575
+ content:
1576
+ application/json:
1577
+ schema:
1578
+ $ref: '#/components/schemas/Error'
1579
+ Unavailable:
1580
+ description: Required service unavailable. An external mutation may still have executed; retain/poll operation
1581
+ ID instead of creating a new payment.
1582
+ content:
1583
+ application/json:
1584
+ schema:
1585
+ $ref: '#/components/schemas/Error'
1586
+ schemas:
1587
+ Environment:
1588
+ type: string
1589
+ enum:
1590
+ - test
1591
+ - live
1592
+ EvmAddress:
1593
+ type: string
1594
+ pattern: '^0x[0-9a-fA-F]{40}$'
1595
+ EvmHash:
1596
+ type: string
1597
+ pattern: '^0x[0-9a-fA-F]{64}$'
1598
+ ChainSelectorId:
1599
+ type: integer
1600
+ enum: [1, 999, 8453, 42161, 84532, 11155111, 31337, 31338, 31339, 31340, 900001, 900002, 728126428, 900003]
1601
+ description: EVM or TRON chain ID, or a local or Solana selector. Use network_id for the network reference.
1602
+ ChainNetworkId:
1603
+ type: string
1604
+ pattern: '^(eip155:[1-9][0-9]*|solana:[1-9A-HJ-NP-Za-km-z]{32}|tron:(728126428|900003|0x2b6653dc))$'
1605
+ description: Decimal TRON identifiers are emitted. The hexadecimal TRON mainnet alias is accepted on connection creation.
1606
+ ChainFamily:
1607
+ type: string
1608
+ enum: [evm, solana, tron]
1609
+ StableDenomination:
1610
+ type: string
1611
+ enum: ['stable:USDC', 'stable:USDT']
1612
+ description: Order denomination, expressed in six decimal places.
1613
+ ChainTokenSymbol:
1614
+ type: string
1615
+ enum: [USDC, USDT, USDT0]
1616
+ description: Display ticker. USDT0 is the ASCII display spelling of USD₮0.
1617
+ ChainAssetRepresentation:
1618
+ type: string
1619
+ enum: [native, usdt0, standard_bridge, fixture]
1620
+ description: Token deployment type. USDT0 and the registered Standard Bridge token settle stable:USDT quotes on their respective networks.
1621
+ ChainAddress:
1622
+ oneOf:
1623
+ - $ref: '#/components/schemas/EvmAddress'
1624
+ - type: string
1625
+ pattern: '^[1-9A-HJ-NP-Za-km-z]{32,44}$'
1626
+ ChainQuoteTerms:
1627
+ type: object
1628
+ additionalProperties: false
1629
+ required: [chain_id, token_address, start_block, anchor_hash, starts_at_epoch]
1630
+ properties:
1631
+ chain_id:
1632
+ $ref: '#/components/schemas/ChainSelectorId'
1633
+ network_id:
1634
+ $ref: '#/components/schemas/ChainNetworkId'
1635
+ family:
1636
+ $ref: '#/components/schemas/ChainFamily'
1637
+ denomination:
1638
+ $ref: '#/components/schemas/StableDenomination'
1639
+ symbol:
1640
+ $ref: '#/components/schemas/ChainTokenSymbol'
1641
+ representation:
1642
+ $ref: '#/components/schemas/ChainAssetRepresentation'
1643
+ token_address:
1644
+ $ref: '#/components/schemas/ChainAddress'
1645
+ recipient_owner:
1646
+ $ref: '#/components/schemas/ChainAddress'
1647
+ start_block:
1648
+ type: string
1649
+ pattern: '^[1-9][0-9]{0,18}$'
1650
+ description: First block or slot eligible for observation.
1651
+ anchor_hash:
1652
+ $ref: '#/components/schemas/EvmHash'
1653
+ starts_at_epoch:
1654
+ type: integer
1655
+ minimum: 1
1656
+ description: Earliest eligible chain block timestamp, in Unix seconds. Wait until this time before paying against the quote.
1657
+ ChainAssets:
1658
+ type: object
1659
+ additionalProperties: false
1660
+ required: [data]
1661
+ properties:
1662
+ data:
1663
+ type: array
1664
+ maxItems: 13
1665
+ items:
1666
+ type: object
1667
+ additionalProperties: false
1668
+ required: [asset, denomination, symbol, representation, token_address, chain_id, decimals, priority, finality, network_id, network_name, family]
1669
+ properties:
1670
+ asset:
1671
+ type: string
1672
+ denomination:
1673
+ $ref: '#/components/schemas/StableDenomination'
1674
+ symbol:
1675
+ $ref: '#/components/schemas/ChainTokenSymbol'
1676
+ representation:
1677
+ $ref: '#/components/schemas/ChainAssetRepresentation'
1678
+ token_address:
1679
+ $ref: '#/components/schemas/ChainAddress'
1680
+ chain_id:
1681
+ $ref: '#/components/schemas/ChainSelectorId'
1682
+ network_id:
1683
+ $ref: '#/components/schemas/ChainNetworkId'
1684
+ network_name:
1685
+ type: string
1686
+ family:
1687
+ $ref: '#/components/schemas/ChainFamily'
1688
+ decimals:
1689
+ const: 6
1690
+ priority:
1691
+ type: integer
1692
+ minimum: 1
1693
+ maximum: 6
1694
+ finality:
1695
+ const: finalized
1696
+ CreateChainConnection:
1697
+ type: object
1698
+ additionalProperties: false
1699
+ required: [display_name]
1700
+ oneOf:
1701
+ - required: [chain_id]
1702
+ - required: [network_id]
1703
+ properties:
1704
+ display_name:
1705
+ type: string
1706
+ minLength: 1
1707
+ maxLength: 128
1708
+ chain_id:
1709
+ $ref: '#/components/schemas/ChainSelectorId'
1710
+ network_id:
1711
+ $ref: '#/components/schemas/ChainNetworkId'
1712
+ RegisterChainRecipients:
1713
+ type: object
1714
+ additionalProperties: false
1715
+ required: [recipients]
1716
+ properties:
1717
+ denomination:
1718
+ $ref: '#/components/schemas/StableDenomination'
1719
+ description: Determines the denomination for recipient registration. Omission selects USDC on EVM and Solana or USDT on TRON. EVM recipients are shared before a quote is assigned.
1720
+ recipients:
1721
+ type: array
1722
+ minItems: 1
1723
+ maxItems: 32
1724
+ items:
1725
+ type: object
1726
+ additionalProperties: false
1727
+ required: [address, signature]
1728
+ properties:
1729
+ address:
1730
+ $ref: '#/components/schemas/ChainAddress'
1731
+ description: Seller wallet address. On Solana the service derives the associated token account for the selected mint.
1732
+ signature:
1733
+ type: string
1734
+ writeOnly: true
1735
+ pattern: '^0x[0-9a-fA-F]{128}([0-9a-fA-F]{2})?$'
1736
+ description: Scoped EIP-191 proof on EVM, TIP-191 personal proof on TRON, or Ed25519 proof on Solana, encoded as hex.
1737
+ ChainRecipients:
1738
+ type: object
1739
+ additionalProperties: false
1740
+ required: [connection_id, chain_id, addresses]
1741
+ properties:
1742
+ connection_id:
1743
+ type: string
1744
+ format: uuid
1745
+ chain_id:
1746
+ $ref: '#/components/schemas/ChainSelectorId'
1747
+ network_id:
1748
+ $ref: '#/components/schemas/ChainNetworkId'
1749
+ denomination:
1750
+ $ref: '#/components/schemas/StableDenomination'
1751
+ description: Solana denomination for these mint-specific addresses.
1752
+ addresses:
1753
+ type: array
1754
+ description: Address pool entries. On Solana these are associated token accounts for the selected mint.
1755
+ items:
1756
+ $ref: '#/components/schemas/ChainAddress'
1757
+ Money:
1758
+ type: object
1759
+ properties:
1760
+ asset:
1761
+ type: string
1762
+ description: Immutable fiat registry, stable:USDC or stable:USDT denomination, or an exact registered chain asset for a frozen quote.
1763
+ minLength: 1
1764
+ maxLength: 160
1765
+ amount_atomic:
1766
+ type: string
1767
+ description: Positive integer in the asset minor unit; never a float.
1768
+ pattern: ^[1-9][0-9]{0,77}$
1769
+ scale:
1770
+ type: integer
1771
+ minimum: 0
1772
+ maximum: 36
1773
+ required:
1774
+ - asset
1775
+ - amount_atomic
1776
+ - scale
1777
+ additionalProperties: false
1778
+ description: The asset registry must confirm scale. USD 10.00 is amount_atomic="1000", scale=2. Gross obligation,
1779
+ not net payout. R1 rejects unconfigured assets.
1780
+ NonNegativeMoney:
1781
+ type: object
1782
+ properties:
1783
+ asset:
1784
+ type: string
1785
+ minLength: 1
1786
+ maxLength: 160
1787
+ amount_atomic:
1788
+ type: string
1789
+ pattern: ^(0|[1-9][0-9]{0,77})$
1790
+ scale:
1791
+ type: integer
1792
+ minimum: 0
1793
+ maximum: 36
1794
+ required:
1795
+ - asset
1796
+ - amount_atomic
1797
+ - scale
1798
+ additionalProperties: false
1799
+ Error:
1800
+ type: object
1801
+ properties:
1802
+ error:
1803
+ type: object
1804
+ properties:
1805
+ code:
1806
+ type: string
1807
+ message:
1808
+ type: string
1809
+ request_id:
1810
+ type: string
1811
+ format: uuid
1812
+ details:
1813
+ type: object
1814
+ additionalProperties: true
1815
+ required:
1816
+ - code
1817
+ - message
1818
+ - request_id
1819
+ additionalProperties: false
1820
+ required:
1821
+ - error
1822
+ additionalProperties: false
1823
+ FulfillmentSpec:
1824
+ type: object
1825
+ properties:
1826
+ mode:
1827
+ type: string
1828
+ enum:
1829
+ - merchant_action
1830
+ - webhook_only
1831
+ action_ref:
1832
+ type: string
1833
+ description: Stable per order business effect; reuse across payment/price retries.
1834
+ minLength: 1
1835
+ maxLength: 128
1836
+ action:
1837
+ type: string
1838
+ minLength: 1
1839
+ maxLength: 128
1840
+ target_ref:
1841
+ type: string
1842
+ description: Merchant-owned identity fixed before payment.
1843
+ minLength: 1
1844
+ maxLength: 256
1845
+ endpoint_id:
1846
+ type: string
1847
+ format: uuid
1848
+ payload:
1849
+ type: object
1850
+ additionalProperties: true
1851
+ required:
1852
+ - mode
1853
+ - action_ref
1854
+ - action
1855
+ - target_ref
1856
+ - endpoint_id
1857
+ - payload
1858
+ additionalProperties: false
1859
+ description: R1 has one immutable business action per Payment. Multi-item carts should be one merchant action
1860
+ with an immutable line snapshot; splitting business effects requires explicit independent action identities.
1861
+ CreatePayment:
1862
+ type: object
1863
+ properties:
1864
+ order_ref:
1865
+ type: string
1866
+ minLength: 1
1867
+ maxLength: 128
1868
+ order_revision:
1869
+ type: integer
1870
+ minimum: 1
1871
+ maximum: 9007199254740991
1872
+ customer_ref:
1873
+ type: string
1874
+ minLength: 1
1875
+ maxLength: 256
1876
+ price:
1877
+ $ref: '#/components/schemas/Money'
1878
+ allowed_connections:
1879
+ type: array
1880
+ items:
1881
+ type: string
1882
+ format: uuid
1883
+ minItems: 1
1884
+ maxItems: 16
1885
+ policy_ref:
1886
+ type: string
1887
+ minLength: 1
1888
+ maxLength: 128
1889
+ expires_in_seconds:
1890
+ type: integer
1891
+ minimum: 60
1892
+ maximum: 86400
1893
+ default: 1800
1894
+ fulfillment:
1895
+ $ref: '#/components/schemas/FulfillmentSpec'
1896
+ metadata:
1897
+ type: object
1898
+ additionalProperties:
1899
+ type: string
1900
+ maxLength: 500
1901
+ maxProperties: 20
1902
+ required:
1903
+ - order_ref
1904
+ - order_revision
1905
+ - customer_ref
1906
+ - price
1907
+ - allowed_connections
1908
+ - policy_ref
1909
+ - expires_in_seconds
1910
+ - fulfillment
1911
+ additionalProperties: false
1912
+ Assurance:
1913
+ type: object
1914
+ properties:
1915
+ kind:
1916
+ type: string
1917
+ enum:
1918
+ - none
1919
+ - provider_authorized
1920
+ - provider_capture
1921
+ - chain_included
1922
+ - chain_finalized
1923
+ - merchant_attested
1924
+ reversible:
1925
+ type: boolean
1926
+ details:
1927
+ type: object
1928
+ additionalProperties: true
1929
+ required:
1930
+ - kind
1931
+ - reversible
1932
+ additionalProperties: false
1933
+ Verification:
1934
+ type: object
1935
+ properties:
1936
+ status:
1937
+ type: string
1938
+ enum:
1939
+ - pending
1940
+ - valid
1941
+ - invalid
1942
+ - unavailable
1943
+ basis:
1944
+ anyOf:
1945
+ - type: string
1946
+ enum:
1947
+ - provider_api
1948
+ - provider_signed_event
1949
+ - canonical_chain
1950
+ - merchant_attestation
1951
+ - type: 'null'
1952
+ binding:
1953
+ type: string
1954
+ enum:
1955
+ - bound
1956
+ - unbound
1957
+ - ambiguous
1958
+ assurance:
1959
+ $ref: '#/components/schemas/Assurance'
1960
+ checked_at:
1961
+ anyOf:
1962
+ - type: string
1963
+ format: date-time
1964
+ - type: 'null'
1965
+ reason_codes:
1966
+ type: array
1967
+ items:
1968
+ type: string
1969
+ minItems: 0
1970
+ maxItems: 32
1971
+ required:
1972
+ - status
1973
+ - basis
1974
+ - binding
1975
+ - assurance
1976
+ - checked_at
1977
+ - reason_codes
1978
+ additionalProperties: false
1979
+ Decision:
1980
+ type: object
1981
+ properties:
1982
+ id:
1983
+ type: string
1984
+ format: uuid
1985
+ version:
1986
+ type: integer
1987
+ minimum: 1
1988
+ maximum: 9007199254740991
1989
+ status:
1990
+ type: string
1991
+ enum:
1992
+ - awaiting
1993
+ - eligible
1994
+ - held
1995
+ - revoked
1996
+ reason_codes:
1997
+ type: array
1998
+ items:
1999
+ type: string
2000
+ minItems: 0
2001
+ maxItems: 32
2002
+ policy_ref:
2003
+ type: string
2004
+ observed_at:
2005
+ type: string
2006
+ format: date-time
2007
+ evidence_ids:
2008
+ type: array
2009
+ items:
2010
+ type: string
2011
+ format: uuid
2012
+ minItems: 0
2013
+ maxItems: 100
2014
+ required:
2015
+ - id
2016
+ - version
2017
+ - status
2018
+ - reason_codes
2019
+ - policy_ref
2020
+ - observed_at
2021
+ - evidence_ids
2022
+ additionalProperties: false
2023
+ FulfillmentSummary:
2024
+ type: object
2025
+ properties:
2026
+ command_id:
2027
+ anyOf:
2028
+ - type: string
2029
+ format: uuid
2030
+ - type: 'null'
2031
+ delivery_status:
2032
+ type: string
2033
+ enum:
2034
+ - pending
2035
+ - delivered
2036
+ - retrying
2037
+ - exhausted
2038
+ execution_status:
2039
+ type: string
2040
+ enum:
2041
+ - pending
2042
+ - applied
2043
+ - noop
2044
+ - failed
2045
+ - unknown
2046
+ required:
2047
+ - command_id
2048
+ - delivery_status
2049
+ - execution_status
2050
+ additionalProperties: false
2051
+ Adjustment:
2052
+ type: object
2053
+ properties:
2054
+ adjustment_id:
2055
+ type: string
2056
+ format: uuid
2057
+ kind:
2058
+ type: string
2059
+ enum:
2060
+ - refund
2061
+ - dispute
2062
+ - reversal
2063
+ - reorg
2064
+ - manual_review
2065
+ status:
2066
+ type: string
2067
+ description: Provider-specific substate preserved.
2068
+ money:
2069
+ anyOf:
2070
+ - $ref: '#/components/schemas/NonNegativeMoney'
2071
+ - type: 'null'
2072
+ external_ref:
2073
+ anyOf:
2074
+ - type: string
2075
+ - type: 'null'
2076
+ observed_at:
2077
+ type: string
2078
+ format: date-time
2079
+ required:
2080
+ - adjustment_id
2081
+ - kind
2082
+ - status
2083
+ - money
2084
+ - external_ref
2085
+ - observed_at
2086
+ additionalProperties: false
2087
+ Payment:
2088
+ type: object
2089
+ properties:
2090
+ merchant_id:
2091
+ type: string
2092
+ format: uuid
2093
+ project_id:
2094
+ type: string
2095
+ format: uuid
2096
+ environment:
2097
+ $ref: '#/components/schemas/Environment'
2098
+ payment_id:
2099
+ type: string
2100
+ format: uuid
2101
+ order_ref:
2102
+ type: string
2103
+ order_revision:
2104
+ type: integer
2105
+ minimum: 1
2106
+ maximum: 9007199254740991
2107
+ customer_ref:
2108
+ type: string
2109
+ price:
2110
+ $ref: '#/components/schemas/Money'
2111
+ allowed_connections:
2112
+ type: array
2113
+ items:
2114
+ type: string
2115
+ format: uuid
2116
+ minItems: 1
2117
+ maxItems: 16
2118
+ policy_ref:
2119
+ type: string
2120
+ lifecycle:
2121
+ type: string
2122
+ enum:
2123
+ - open
2124
+ - expired
2125
+ - canceled
2126
+ - closed
2127
+ funding_status:
2128
+ type: string
2129
+ enum:
2130
+ - unfunded
2131
+ - partial
2132
+ - funded
2133
+ - excess
2134
+ verification:
2135
+ $ref: '#/components/schemas/Verification'
2136
+ decision:
2137
+ $ref: '#/components/schemas/Decision'
2138
+ fulfillment:
2139
+ $ref: '#/components/schemas/FulfillmentSummary'
2140
+ fulfillment_spec:
2141
+ $ref: '#/components/schemas/FulfillmentSpec'
2142
+ adjustments:
2143
+ type: array
2144
+ items:
2145
+ $ref: '#/components/schemas/Adjustment'
2146
+ minItems: 0
2147
+ maxItems: 1000
2148
+ expires_at:
2149
+ type: string
2150
+ format: date-time
2151
+ created_at:
2152
+ type: string
2153
+ format: date-time
2154
+ updated_at:
2155
+ type: string
2156
+ format: date-time
2157
+ resource_version:
2158
+ type: integer
2159
+ minimum: 1
2160
+ maximum: 9007199254740991
2161
+ required:
2162
+ - merchant_id
2163
+ - project_id
2164
+ - environment
2165
+ - payment_id
2166
+ - order_ref
2167
+ - order_revision
2168
+ - customer_ref
2169
+ - price
2170
+ - allowed_connections
2171
+ - policy_ref
2172
+ - lifecycle
2173
+ - funding_status
2174
+ - verification
2175
+ - decision
2176
+ - fulfillment
2177
+ - fulfillment_spec
2178
+ - adjustments
2179
+ - expires_at
2180
+ - created_at
2181
+ - updated_at
2182
+ - resource_version
2183
+ additionalProperties: false
2184
+ CreateQuote:
2185
+ type: object
2186
+ properties:
2187
+ connection_id:
2188
+ type: string
2189
+ format: uuid
2190
+ presentment_asset:
2191
+ type: string
2192
+ description: Fiat must equal Payment.price.asset. A chain quote accepts the same stablecoin denomination or the exact registered asset for that denomination and selected network.
2193
+ minLength: 1
2194
+ maxLength: 160
2195
+ expires_in_seconds:
2196
+ type: integer
2197
+ minimum: 30
2198
+ maximum: 1800
2199
+ default: 900
2200
+ required:
2201
+ - connection_id
2202
+ - presentment_asset
2203
+ - expires_in_seconds
2204
+ additionalProperties: false
2205
+ Quote:
2206
+ type: object
2207
+ properties:
2208
+ merchant_id:
2209
+ type: string
2210
+ format: uuid
2211
+ project_id:
2212
+ type: string
2213
+ format: uuid
2214
+ environment:
2215
+ $ref: '#/components/schemas/Environment'
2216
+ quote_id:
2217
+ type: string
2218
+ format: uuid
2219
+ payment_id:
2220
+ type: string
2221
+ format: uuid
2222
+ connection_id:
2223
+ type: string
2224
+ format: uuid
2225
+ pricing_revision:
2226
+ type: integer
2227
+ minimum: 1
2228
+ maximum: 9007199254740991
2229
+ payable:
2230
+ $ref: '#/components/schemas/Money'
2231
+ chain:
2232
+ $ref: '#/components/schemas/ChainQuoteTerms'
2233
+ recipient_account:
2234
+ type: string
2235
+ pricing_terms_hash:
2236
+ type: string
2237
+ pattern: ^[0-9a-f]{64}$
2238
+ expires_at:
2239
+ type: string
2240
+ format: date-time
2241
+ created_at:
2242
+ type: string
2243
+ format: date-time
2244
+ required:
2245
+ - merchant_id
2246
+ - project_id
2247
+ - environment
2248
+ - quote_id
2249
+ - payment_id
2250
+ - connection_id
2251
+ - pricing_revision
2252
+ - payable
2253
+ - recipient_account
2254
+ - pricing_terms_hash
2255
+ - expires_at
2256
+ - created_at
2257
+ additionalProperties: false
2258
+ description: Quote is immutable. Server derives payable and recipient from registered Payment/Connection;
2259
+ callers cannot redirect funds.
2260
+ ExternalResource:
2261
+ type: object
2262
+ properties:
2263
+ type:
2264
+ type: string
2265
+ enum:
2266
+ - checkout_session
2267
+ - payment_intent
2268
+ - paypal_order
2269
+ - paypal_capture
2270
+ - chain_transaction
2271
+ id:
2272
+ type: string
2273
+ minLength: 1
2274
+ maxLength: 256
2275
+ required:
2276
+ - type
2277
+ - id
2278
+ additionalProperties: false
2279
+ CreateAttempt:
2280
+ type: object
2281
+ properties:
2282
+ connection_id:
2283
+ type: string
2284
+ format: uuid
2285
+ quote_id:
2286
+ type: string
2287
+ format: uuid
2288
+ return_url:
2289
+ description: Required for Stripe and PayPal. Omit for an EVM transfer instruction.
2290
+ type: string
2291
+ format: uri
2292
+ maxLength: 2048
2293
+ cancel_url:
2294
+ type: string
2295
+ format: uri
2296
+ maxLength: 2048
2297
+ required:
2298
+ - connection_id
2299
+ - quote_id
2300
+ additionalProperties: false
2301
+ AttachExternalAttempt:
2302
+ type: object
2303
+ properties:
2304
+ connection_id:
2305
+ type: string
2306
+ format: uuid
2307
+ quote_id:
2308
+ type: string
2309
+ format: uuid
2310
+ resource:
2311
+ $ref: '#/components/schemas/ExternalResource'
2312
+ binding_ref:
2313
+ type: string
2314
+ description: Merchant backend creation-operation reference; never a standalone proof.
2315
+ minLength: 1
2316
+ maxLength: 256
2317
+ import_mode:
2318
+ type: string
2319
+ description: Historical imports never emit a grant in R1.
2320
+ enum:
2321
+ - current
2322
+ - historical_observe_only
2323
+ required:
2324
+ - connection_id
2325
+ - quote_id
2326
+ - resource
2327
+ - binding_ref
2328
+ - import_mode
2329
+ additionalProperties: false
2330
+ RedirectAction:
2331
+ type: object
2332
+ properties:
2333
+ type:
2334
+ const: redirect
2335
+ url:
2336
+ type: string
2337
+ format: uri
2338
+ expires_at:
2339
+ anyOf:
2340
+ - type: string
2341
+ format: date-time
2342
+ - type: 'null'
2343
+ required:
2344
+ - type
2345
+ - url
2346
+ - expires_at
2347
+ additionalProperties: false
2348
+ ProviderClientAction:
2349
+ type: object
2350
+ properties:
2351
+ type:
2352
+ const: provider_client
2353
+ provider:
2354
+ type: string
2355
+ enum:
2356
+ - stripe
2357
+ - paypal
2358
+ client_capability:
2359
+ type: string
2360
+ description: Scoped provider client secret. Never a server API credential.
2361
+ writeOnly: false
2362
+ expires_at:
2363
+ anyOf:
2364
+ - type: string
2365
+ format: date-time
2366
+ - type: 'null'
2367
+ required:
2368
+ - type
2369
+ - provider
2370
+ - client_capability
2371
+ - expires_at
2372
+ additionalProperties: false
2373
+ WalletRequestAction:
2374
+ type: object
2375
+ properties:
2376
+ type:
2377
+ const: wallet_request
2378
+ chain_id:
2379
+ type: string
2380
+ request:
2381
+ type: object
2382
+ additionalProperties: true
2383
+ required:
2384
+ - type
2385
+ - chain_id
2386
+ - request
2387
+ additionalProperties: false
2388
+ description: Reserved for Release 2; R1 adapters must not emit.
2389
+ TransferInstructionAction:
2390
+ type: object
2391
+ properties:
2392
+ type:
2393
+ const: transfer_instruction
2394
+ quote_id:
2395
+ type: string
2396
+ format: uuid
2397
+ chain_id:
2398
+ $ref: '#/components/schemas/ChainSelectorId'
2399
+ token_address:
2400
+ $ref: '#/components/schemas/ChainAddress'
2401
+ network_id:
2402
+ $ref: '#/components/schemas/ChainNetworkId'
2403
+ family:
2404
+ $ref: '#/components/schemas/ChainFamily'
2405
+ denomination:
2406
+ $ref: '#/components/schemas/StableDenomination'
2407
+ symbol:
2408
+ $ref: '#/components/schemas/ChainTokenSymbol'
2409
+ representation:
2410
+ $ref: '#/components/schemas/ChainAssetRepresentation'
2411
+ recipient_owner:
2412
+ $ref: '#/components/schemas/ChainAddress'
2413
+ starts_at_epoch:
2414
+ type: integer
2415
+ minimum: 1
2416
+ description: Earliest eligible chain block timestamp, in Unix seconds. Broadcast the transfer at or after this time.
2417
+ expires_at:
2418
+ type: string
2419
+ format: date-time
2420
+ recipient:
2421
+ type: string
2422
+ reference:
2423
+ anyOf:
2424
+ - type: string
2425
+ - type: 'null'
2426
+ payable:
2427
+ $ref: '#/components/schemas/Money'
2428
+ required:
2429
+ - type
2430
+ - quote_id
2431
+ - chain_id
2432
+ - token_address
2433
+ - starts_at_epoch
2434
+ - expires_at
2435
+ - recipient
2436
+ - reference
2437
+ - payable
2438
+ additionalProperties: false
2439
+ description: Watch-only stablecoin payment with the exact registered deployment and permanently assigned recipient in the quote.
2440
+ NoAction:
2441
+ type: object
2442
+ properties:
2443
+ type:
2444
+ const: none
2445
+ required:
2446
+ - type
2447
+ additionalProperties: false
2448
+ NextAction:
2449
+ oneOf:
2450
+ - $ref: '#/components/schemas/RedirectAction'
2451
+ - $ref: '#/components/schemas/ProviderClientAction'
2452
+ - $ref: '#/components/schemas/WalletRequestAction'
2453
+ - $ref: '#/components/schemas/TransferInstructionAction'
2454
+ - $ref: '#/components/schemas/NoAction'
2455
+ discriminator:
2456
+ propertyName: type
2457
+ mapping:
2458
+ redirect: '#/components/schemas/RedirectAction'
2459
+ provider_client: '#/components/schemas/ProviderClientAction'
2460
+ wallet_request: '#/components/schemas/WalletRequestAction'
2461
+ transfer_instruction: '#/components/schemas/TransferInstructionAction'
2462
+ none: '#/components/schemas/NoAction'
2463
+ Binding:
2464
+ type: object
2465
+ properties:
2466
+ status:
2467
+ type: string
2468
+ enum:
2469
+ - bound
2470
+ - unbound
2471
+ - ambiguous
2472
+ method:
2473
+ type: string
2474
+ enum:
2475
+ - provider_resource_mapping
2476
+ - provider_invoice_reference
2477
+ - unique_recipient
2478
+ - invoice_event
2479
+ - merchant_attestation
2480
+ reference:
2481
+ type: string
2482
+ registered_at:
2483
+ type: string
2484
+ format: date-time
2485
+ verified_at:
2486
+ anyOf:
2487
+ - type: string
2488
+ format: date-time
2489
+ - type: 'null'
2490
+ required:
2491
+ - status
2492
+ - method
2493
+ - reference
2494
+ - registered_at
2495
+ - verified_at
2496
+ additionalProperties: false
2497
+ Attempt:
2498
+ type: object
2499
+ properties:
2500
+ merchant_id:
2501
+ type: string
2502
+ format: uuid
2503
+ project_id:
2504
+ type: string
2505
+ format: uuid
2506
+ environment:
2507
+ $ref: '#/components/schemas/Environment'
2508
+ attempt_id:
2509
+ type: string
2510
+ format: uuid
2511
+ payment_id:
2512
+ type: string
2513
+ format: uuid
2514
+ quote_id:
2515
+ type: string
2516
+ format: uuid
2517
+ connection_id:
2518
+ type: string
2519
+ format: uuid
2520
+ mode:
2521
+ type: string
2522
+ enum:
2523
+ - managed
2524
+ - external
2525
+ execution_status:
2526
+ type: string
2527
+ enum:
2528
+ - created
2529
+ - requires_action
2530
+ - processing
2531
+ - unknown
2532
+ - succeeded
2533
+ - failed
2534
+ - canceled
2535
+ operation_id:
2536
+ anyOf:
2537
+ - type: string
2538
+ format: uuid
2539
+ - type: 'null'
2540
+ external_resources:
2541
+ type: array
2542
+ items:
2543
+ $ref: '#/components/schemas/ExternalResource'
2544
+ minItems: 0
2545
+ maxItems: 32
2546
+ binding:
2547
+ $ref: '#/components/schemas/Binding'
2548
+ next_action:
2549
+ $ref: '#/components/schemas/NextAction'
2550
+ created_at:
2551
+ type: string
2552
+ format: date-time
2553
+ updated_at:
2554
+ type: string
2555
+ format: date-time
2556
+ resource_version:
2557
+ type: integer
2558
+ minimum: 1
2559
+ maximum: 9007199254740991
2560
+ required:
2561
+ - merchant_id
2562
+ - project_id
2563
+ - environment
2564
+ - attempt_id
2565
+ - payment_id
2566
+ - quote_id
2567
+ - connection_id
2568
+ - mode
2569
+ - execution_status
2570
+ - operation_id
2571
+ - external_resources
2572
+ - binding
2573
+ - next_action
2574
+ - created_at
2575
+ - updated_at
2576
+ - resource_version
2577
+ additionalProperties: false
2578
+ description: Unknown attempt must have next_action.type=none. A successful create operation means an external
2579
+ resource was created, not that money was paid. Core verifies payment separately.
2580
+ allOf:
2581
+ - if:
2582
+ properties:
2583
+ execution_status:
2584
+ const: unknown
2585
+ then:
2586
+ properties:
2587
+ next_action:
2588
+ $ref: '#/components/schemas/NoAction'
2589
+ Operation:
2590
+ type: object
2591
+ properties:
2592
+ merchant_id:
2593
+ type: string
2594
+ format: uuid
2595
+ project_id:
2596
+ type: string
2597
+ format: uuid
2598
+ environment:
2599
+ $ref: '#/components/schemas/Environment'
2600
+ operation_id:
2601
+ type: string
2602
+ format: uuid
2603
+ kind:
2604
+ type: string
2605
+ enum:
2606
+ - create_attempt
2607
+ - confirm_attempt
2608
+ - cancel_payment
2609
+ - verify_payment
2610
+ - recover_operation
2611
+ - validate_connection
2612
+ - retry_delivery
2613
+ status:
2614
+ type: string
2615
+ enum:
2616
+ - prepared
2617
+ - running
2618
+ - unknown
2619
+ - succeeded
2620
+ - failed
2621
+ - review_required
2622
+ resource_id:
2623
+ type: string
2624
+ format: uuid
2625
+ request_hash:
2626
+ type: string
2627
+ pattern: ^[0-9a-f]{64}$
2628
+ provider_request_ref:
2629
+ anyOf:
2630
+ - type: string
2631
+ - type: 'null'
2632
+ result_ref:
2633
+ anyOf:
2634
+ - type: string
2635
+ - type: 'null'
2636
+ reason_codes:
2637
+ type: array
2638
+ items:
2639
+ type: string
2640
+ minItems: 0
2641
+ maxItems: 32
2642
+ created_at:
2643
+ type: string
2644
+ format: date-time
2645
+ updated_at:
2646
+ type: string
2647
+ format: date-time
2648
+ next_check_at:
2649
+ anyOf:
2650
+ - type: string
2651
+ format: date-time
2652
+ - type: 'null'
2653
+ required:
2654
+ - merchant_id
2655
+ - project_id
2656
+ - environment
2657
+ - operation_id
2658
+ - kind
2659
+ - status
2660
+ - resource_id
2661
+ - request_hash
2662
+ - provider_request_ref
2663
+ - result_ref
2664
+ - reason_codes
2665
+ - created_at
2666
+ - updated_at
2667
+ - next_check_at
2668
+ additionalProperties: false
2669
+ AttemptMutationResult:
2670
+ type: object
2671
+ properties:
2672
+ attempt:
2673
+ $ref: '#/components/schemas/Attempt'
2674
+ operation:
2675
+ anyOf:
2676
+ - $ref: '#/components/schemas/Operation'
2677
+ - type: 'null'
2678
+ required:
2679
+ - attempt
2680
+ - operation
2681
+ additionalProperties: false
2682
+ ConfirmAttempt:
2683
+ type: object
2684
+ properties:
2685
+ expected_resource_version:
2686
+ type: integer
2687
+ minimum: 1
2688
+ maximum: 9007199254740991
2689
+ required:
2690
+ - expected_resource_version
2691
+ additionalProperties: false
2692
+ description: Server-only action; the stored provider order and immutable quote determine capture amount/payee.
2693
+ Browser approval callback is only a hint. No arbitrary resource ID or amount is accepted.
2694
+ VerifyRequest:
2695
+ type: object
2696
+ properties:
2697
+ attempt_id:
2698
+ type: string
2699
+ format: uuid
2700
+ reason:
2701
+ type: string
2702
+ enum:
2703
+ - buyer_return
2704
+ - merchant_request
2705
+ - reconciliation
2706
+ - support_retry
2707
+ required:
2708
+ - reason
2709
+ additionalProperties: false
2710
+ CancelPayment:
2711
+ type: object
2712
+ properties:
2713
+ expected_resource_version:
2714
+ type: integer
2715
+ minimum: 1
2716
+ maximum: 9007199254740991
2717
+ reason:
2718
+ type: string
2719
+ minLength: 1
2720
+ maxLength: 500
2721
+ required:
2722
+ - expected_resource_version
2723
+ - reason
2724
+ additionalProperties: false
2725
+ description: Stops new attempts immediately. Provider cancel is separately confirmed; cancellation cannot
2726
+ erase money already sent or guarantee in-flight remote payment cancellation.
2727
+ RecoverOperation:
2728
+ type: object
2729
+ properties:
2730
+ reason:
2731
+ type: string
2732
+ minLength: 1
2733
+ maxLength: 500
2734
+ required:
2735
+ - reason
2736
+ additionalProperties: false
2737
+ description: Queries/retries the same logical provider operation only when supported idempotency rules prove
2738
+ that safe. Never issues a new logical payment after an ambiguous result.
2739
+ ReviewRequest:
2740
+ type: object
2741
+ properties:
2742
+ expected_resource_version:
2743
+ type: integer
2744
+ minimum: 1
2745
+ maximum: 9007199254740991
2746
+ action:
2747
+ type: string
2748
+ enum:
2749
+ - accept_late_payment
2750
+ - keep_on_hold
2751
+ - reject_fulfillment
2752
+ reason:
2753
+ type: string
2754
+ description: Required human/business justification; not a replacement payment proof.
2755
+ minLength: 8
2756
+ maxLength: 2000
2757
+ required:
2758
+ - expected_resource_version
2759
+ - action
2760
+ - reason
2761
+ additionalProperties: false
2762
+ description: Narrow audited business exception. accept_late_payment only accepts independently valid, bound,
2763
+ correctly funded evidence held for timing; it cannot override amount, payee, account, asset, evidence integrity
2764
+ or duplicate allocation. No paid=true or evidence mutation.
2765
+ ReviewResult:
2766
+ type: object
2767
+ properties:
2768
+ review_id:
2769
+ type: string
2770
+ format: uuid
2771
+ payment_id:
2772
+ type: string
2773
+ format: uuid
2774
+ action:
2775
+ type: string
2776
+ enum:
2777
+ - accept_late_payment
2778
+ - keep_on_hold
2779
+ - reject_fulfillment
2780
+ previous_decision_id:
2781
+ type: string
2782
+ format: uuid
2783
+ decision:
2784
+ $ref: '#/components/schemas/Decision'
2785
+ actor_ref:
2786
+ type: string
2787
+ description: Server-derived authenticated principal; caller cannot choose it.
2788
+ reason:
2789
+ type: string
2790
+ created_at:
2791
+ type: string
2792
+ format: date-time
2793
+ required:
2794
+ - review_id
2795
+ - payment_id
2796
+ - action
2797
+ - previous_decision_id
2798
+ - decision
2799
+ - actor_ref
2800
+ - reason
2801
+ - created_at
2802
+ additionalProperties: false
2803
+ description: Immutable review/audit record plus resulting decision committed together. review_id may be the
2804
+ audit_events primary key. Existing grant identity is reused; no duplicate grant or automatic compensation
2805
+ is manufactured.
2806
+ Capabilities:
2807
+ type: object
2808
+ properties:
2809
+ create_checkout:
2810
+ type: boolean
2811
+ confirm_payment:
2812
+ type: boolean
2813
+ retrieve_evidence:
2814
+ type: boolean
2815
+ signed_events:
2816
+ type: boolean
2817
+ reconcile_changes:
2818
+ type: boolean
2819
+ observe_refunds:
2820
+ type: boolean
2821
+ observe_disputes:
2822
+ type: boolean
2823
+ enforce_expiry:
2824
+ type: boolean
2825
+ binding_methods:
2826
+ type: array
2827
+ items:
2828
+ type: string
2829
+ minItems: 1
2830
+ maxItems: 16
2831
+ required:
2832
+ - create_checkout
2833
+ - confirm_payment
2834
+ - retrieve_evidence
2835
+ - signed_events
2836
+ - reconcile_changes
2837
+ - observe_refunds
2838
+ - observe_disputes
2839
+ - enforce_expiry
2840
+ - binding_methods
2841
+ additionalProperties: false
2842
+ StripeCredentials:
2843
+ type: object
2844
+ properties:
2845
+ kind:
2846
+ const: stripe_secret
2847
+ restricted_api_key:
2848
+ type: string
2849
+ description: Validated and encrypted before persistence; never logged.
2850
+ minLength: 1
2851
+ maxLength: 4096
2852
+ writeOnly: true
2853
+ webhook_signing_secret:
2854
+ type: string
2855
+ description: For the exact registered 0to1Pay ingress endpoint. May be omitted only at unvalidated bootstrap;
2856
+ ready validation requires it.
2857
+ minLength: 1
2858
+ maxLength: 4096
2859
+ writeOnly: true
2860
+ required:
2861
+ - kind
2862
+ - restricted_api_key
2863
+ additionalProperties: false
2864
+ PayPalCredentials:
2865
+ type: object
2866
+ properties:
2867
+ kind:
2868
+ const: paypal_secret
2869
+ client_id:
2870
+ type: string
2871
+ description: PayPal application client ID; returned Connection omits it.
2872
+ minLength: 1
2873
+ maxLength: 4096
2874
+ writeOnly: true
2875
+ client_secret:
2876
+ type: string
2877
+ description: Encrypted before persistence.
2878
+ minLength: 1
2879
+ maxLength: 4096
2880
+ writeOnly: true
2881
+ webhook_id:
2882
+ type: string
2883
+ description: Registered PayPal webhook ID. Not a signing key; may be omitted only at unvalidated bootstrap.
2884
+ Ready validation requires it.
2885
+ minLength: 1
2886
+ maxLength: 4096
2887
+ writeOnly: true
2888
+ required:
2889
+ - kind
2890
+ - client_id
2891
+ - client_secret
2892
+ additionalProperties: false
2893
+ SecretReference:
2894
+ type: object
2895
+ properties:
2896
+ kind:
2897
+ const: preprovisioned_secret_ref
2898
+ credential_ref:
2899
+ type: string
2900
+ description: Operator-only preallocated reference bound to this tenant/project/environment. No arbitrary
2901
+ filesystem or URL lookup.
2902
+ minLength: 1
2903
+ maxLength: 256
2904
+ required:
2905
+ - kind
2906
+ - credential_ref
2907
+ additionalProperties: false
2908
+ CreateConnection:
2909
+ type: object
2910
+ properties:
2911
+ provider:
2912
+ type: string
2913
+ enum:
2914
+ - stripe
2915
+ - paypal
2916
+ display_name:
2917
+ type: string
2918
+ minLength: 1
2919
+ maxLength: 128
2920
+ mode:
2921
+ type: string
2922
+ enum:
2923
+ - observe
2924
+ - initiate
2925
+ expected_provider_account_id:
2926
+ type: string
2927
+ minLength: 1
2928
+ maxLength: 256
2929
+ credentials:
2930
+ oneOf:
2931
+ - $ref: '#/components/schemas/StripeCredentials'
2932
+ - $ref: '#/components/schemas/PayPalCredentials'
2933
+ - $ref: '#/components/schemas/SecretReference'
2934
+ writeOnly: true
2935
+ return_origins:
2936
+ type: array
2937
+ items:
2938
+ type: string
2939
+ format: uri
2940
+ minItems: 1
2941
+ maxItems: 32
2942
+ required:
2943
+ - provider
2944
+ - display_name
2945
+ - mode
2946
+ - expected_provider_account_id
2947
+ - credentials
2948
+ - return_origins
2949
+ additionalProperties: false
2950
+ description: Provider/credential kind must agree. Auth key determines tenant/environment. Validation compares
2951
+ actual resource/account/env against expected identity. Preprovisioned reference requires operator permission;
2952
+ regular tenants supply writeOnly credentials.
2953
+ Connection:
2954
+ type: object
2955
+ properties:
2956
+ merchant_id:
2957
+ type: string
2958
+ format: uuid
2959
+ project_id:
2960
+ type: string
2961
+ format: uuid
2962
+ environment:
2963
+ $ref: '#/components/schemas/Environment'
2964
+ connection_id:
2965
+ type: string
2966
+ format: uuid
2967
+ provider:
2968
+ type: string
2969
+ enum:
2970
+ - stripe
2971
+ - paypal
2972
+ - evm
2973
+ - solana
2974
+ - tron
2975
+ chain_id:
2976
+ $ref: '#/components/schemas/ChainSelectorId'
2977
+ network_id:
2978
+ $ref: '#/components/schemas/ChainNetworkId'
2979
+ network_name:
2980
+ type: string
2981
+ display_name:
2982
+ type: string
2983
+ mode:
2984
+ type: string
2985
+ enum:
2986
+ - observe
2987
+ - initiate
2988
+ expected_provider_account_id:
2989
+ type: string
2990
+ provider_account_id:
2991
+ anyOf:
2992
+ - type: string
2993
+ - type: 'null'
2994
+ identity_verified:
2995
+ type: boolean
2996
+ status:
2997
+ type: string
2998
+ enum:
2999
+ - unvalidated
3000
+ - ready
3001
+ - disabled
3002
+ - error
3003
+ capabilities:
3004
+ $ref: '#/components/schemas/Capabilities'
3005
+ return_origins:
3006
+ type: array
3007
+ items:
3008
+ type: string
3009
+ format: uri
3010
+ minItems: 0
3011
+ maxItems: 1000
3012
+ webhook_url:
3013
+ anyOf:
3014
+ - type: string
3015
+ format: uri
3016
+ - type: 'null'
3017
+ validated_at:
3018
+ anyOf:
3019
+ - type: string
3020
+ format: date-time
3021
+ - type: 'null'
3022
+ created_at:
3023
+ type: string
3024
+ format: date-time
3025
+ updated_at:
3026
+ type: string
3027
+ format: date-time
3028
+ resource_version:
3029
+ type: integer
3030
+ minimum: 1
3031
+ maximum: 9007199254740991
3032
+ required:
3033
+ - merchant_id
3034
+ - project_id
3035
+ - environment
3036
+ - connection_id
3037
+ - provider
3038
+ - display_name
3039
+ - mode
3040
+ - expected_provider_account_id
3041
+ - provider_account_id
3042
+ - identity_verified
3043
+ - status
3044
+ - capabilities
3045
+ - return_origins
3046
+ - webhook_url
3047
+ - validated_at
3048
+ - created_at
3049
+ - updated_at
3050
+ - resource_version
3051
+ additionalProperties: false
3052
+ description: Provisional connections have identity_verified=false and provider_account_id=null and reserve
3053
+ no canonical account. No credentials, webhook secrets or credential references are returned. Only identity-verified
3054
+ and otherwise-ready connections may create/attach attempts.
3055
+ allOf:
3056
+ - if:
3057
+ properties:
3058
+ status:
3059
+ const: ready
3060
+ then:
3061
+ properties:
3062
+ identity_verified:
3063
+ const: true
3064
+ provider_account_id:
3065
+ type: string
3066
+ minLength: 1
3067
+ - if:
3068
+ properties:
3069
+ identity_verified:
3070
+ const: true
3071
+ then:
3072
+ properties:
3073
+ provider_account_id:
3074
+ type: string
3075
+ minLength: 1
3076
+ IdentityEvidence:
3077
+ type: object
3078
+ properties:
3079
+ type:
3080
+ type: string
3081
+ enum:
3082
+ - paypal_order
3083
+ - paypal_capture
3084
+ id:
3085
+ type: string
3086
+ minLength: 1
3087
+ maxLength: 256
3088
+ required:
3089
+ - type
3090
+ - id
3091
+ additionalProperties: false
3092
+ description: Optional controlled merchant-created resource, retrieved with supplied credentials. Must establish
3093
+ these credentials seller context/default payee or independently verified provider authorization; a matching
3094
+ caller string/arbitrary readable order alone is insufficient. No automatic real charge/capture is performed
3095
+ for identity validation.
3096
+ ConnectionValidation:
3097
+ type: object
3098
+ properties:
3099
+ reason:
3100
+ type: string
3101
+ maxLength: 500
3102
+ identity_evidence:
3103
+ $ref: '#/components/schemas/IdentityEvidence'
3104
+ required: []
3105
+ additionalProperties: false
3106
+ description: Optional PayPal order/capture evidence enables provisional bootstrap. Retrieve authoritative
3107
+ resource and payee with these credentials, compare expected identity and verified seller context before
3108
+ canonical account reservation. Unsupported evidence/provider combinations are rejected.
3109
+ RotateConnectionCredentials:
3110
+ type: object
3111
+ properties:
3112
+ credentials:
3113
+ oneOf:
3114
+ - $ref: '#/components/schemas/StripeCredentials'
3115
+ - $ref: '#/components/schemas/PayPalCredentials'
3116
+ - $ref: '#/components/schemas/SecretReference'
3117
+ writeOnly: true
3118
+ expected_resource_version:
3119
+ type: integer
3120
+ minimum: 1
3121
+ maximum: 9007199254740991
3122
+ required:
3123
+ - credentials
3124
+ - expected_resource_version
3125
+ additionalProperties: false
3126
+ ConnectionDisable:
3127
+ type: object
3128
+ properties:
3129
+ reason:
3130
+ type: string
3131
+ minLength: 1
3132
+ maxLength: 500
3133
+ expected_resource_version:
3134
+ type: integer
3135
+ minimum: 1
3136
+ maximum: 9007199254740991
3137
+ required:
3138
+ - reason
3139
+ - expected_resource_version
3140
+ additionalProperties: false
3141
+ CreateWebhookEndpoint:
3142
+ type: object
3143
+ properties:
3144
+ url:
3145
+ type: string
3146
+ description: HTTPS in live. Local test exception only explicit dev allowlist.
3147
+ format: uri
3148
+ maxLength: 2048
3149
+ description:
3150
+ type: string
3151
+ maxLength: 256
3152
+ event_types:
3153
+ type: array
3154
+ items:
3155
+ type: string
3156
+ enum:
3157
+ - fulfillment.requested
3158
+ - payment.decision_changed
3159
+ - payment.adjusted
3160
+ - payment.review_required
3161
+ - fulfillment.result_recorded
3162
+ minItems: 1
3163
+ maxItems: 5
3164
+ required:
3165
+ - url
3166
+ - event_types
3167
+ additionalProperties: false
3168
+ WebhookEndpoint:
3169
+ type: object
3170
+ properties:
3171
+ merchant_id:
3172
+ type: string
3173
+ format: uuid
3174
+ project_id:
3175
+ type: string
3176
+ format: uuid
3177
+ environment:
3178
+ $ref: '#/components/schemas/Environment'
3179
+ endpoint_id:
3180
+ type: string
3181
+ format: uuid
3182
+ url:
3183
+ type: string
3184
+ format: uri
3185
+ event_types:
3186
+ type: array
3187
+ items:
3188
+ type: string
3189
+ minItems: 0
3190
+ maxItems: 1000
3191
+ status:
3192
+ type: string
3193
+ enum:
3194
+ - active
3195
+ - disabled
3196
+ signing_key_id:
3197
+ type: string
3198
+ format: uuid
3199
+ created_at:
3200
+ type: string
3201
+ format: date-time
3202
+ updated_at:
3203
+ type: string
3204
+ format: date-time
3205
+ required:
3206
+ - merchant_id
3207
+ - project_id
3208
+ - environment
3209
+ - endpoint_id
3210
+ - url
3211
+ - event_types
3212
+ - status
3213
+ - signing_key_id
3214
+ - created_at
3215
+ - updated_at
3216
+ additionalProperties: false
3217
+ description: Secret is returned only in the one-time creation/rotation envelope, not reads.
3218
+ EndpointSecret:
3219
+ type: object
3220
+ properties:
3221
+ key_id:
3222
+ type: string
3223
+ format: uuid
3224
+ secret_base64url:
3225
+ type: string
3226
+ description: 32 random bytes, unpadded base64url. Display once and redact.
3227
+ minLength: 43
3228
+ maxLength: 43
3229
+ pattern: ^[A-Za-z0-9_-]{43}$
3230
+ not_before:
3231
+ type: string
3232
+ format: date-time
3233
+ previous_key_accept_until:
3234
+ anyOf:
3235
+ - type: string
3236
+ format: date-time
3237
+ - type: 'null'
3238
+ required:
3239
+ - key_id
3240
+ - secret_base64url
3241
+ - not_before
3242
+ - previous_key_accept_until
3243
+ additionalProperties: false
3244
+ EndpointCreated:
3245
+ type: object
3246
+ properties:
3247
+ endpoint:
3248
+ $ref: '#/components/schemas/WebhookEndpoint'
3249
+ signing_secret:
3250
+ $ref: '#/components/schemas/EndpointSecret'
3251
+ required:
3252
+ - endpoint
3253
+ - signing_secret
3254
+ additionalProperties: false
3255
+ RotateWebhookSecret:
3256
+ type: object
3257
+ properties:
3258
+ overlap_seconds:
3259
+ type: integer
3260
+ minimum: 0
3261
+ maximum: 86400
3262
+ default: 3600
3263
+ required:
3264
+ - overlap_seconds
3265
+ additionalProperties: false
3266
+ FulfillmentCommand:
3267
+ type: object
3268
+ properties:
3269
+ merchant_id:
3270
+ type: string
3271
+ format: uuid
3272
+ project_id:
3273
+ type: string
3274
+ format: uuid
3275
+ environment:
3276
+ $ref: '#/components/schemas/Environment'
3277
+ command_id:
3278
+ type: string
3279
+ format: uuid
3280
+ payment_id:
3281
+ type: string
3282
+ format: uuid
3283
+ order_ref:
3284
+ type: string
3285
+ action_ref:
3286
+ type: string
3287
+ grant_key:
3288
+ type: string
3289
+ format: uuid
3290
+ kind:
3291
+ type: string
3292
+ enum:
3293
+ - grant
3294
+ - revoke
3295
+ - adjust
3296
+ - reinstate
3297
+ desired_version:
3298
+ type: integer
3299
+ minimum: 1
3300
+ maximum: 9007199254740991
3301
+ decision_id:
3302
+ type: string
3303
+ format: uuid
3304
+ target_ref:
3305
+ type: string
3306
+ action:
3307
+ type: string
3308
+ payload:
3309
+ type: object
3310
+ additionalProperties: true
3311
+ payload_hash:
3312
+ type: string
3313
+ description: Lowercase SHA256 hex of RFC8785 JCS(payload) UTF8.
3314
+ pattern: ^[0-9a-f]{64}$
3315
+ delivery_status:
3316
+ type: string
3317
+ enum:
3318
+ - pending
3319
+ - delivered
3320
+ - retrying
3321
+ - exhausted
3322
+ execution_status:
3323
+ type: string
3324
+ enum:
3325
+ - pending
3326
+ - applied
3327
+ - noop
3328
+ - failed
3329
+ - unknown
3330
+ created_at:
3331
+ type: string
3332
+ format: date-time
3333
+ updated_at:
3334
+ type: string
3335
+ format: date-time
3336
+ required:
3337
+ - merchant_id
3338
+ - project_id
3339
+ - environment
3340
+ - command_id
3341
+ - payment_id
3342
+ - order_ref
3343
+ - action_ref
3344
+ - grant_key
3345
+ - kind
3346
+ - desired_version
3347
+ - decision_id
3348
+ - target_ref
3349
+ - action
3350
+ - payload
3351
+ - payload_hash
3352
+ - delivery_status
3353
+ - execution_status
3354
+ - created_at
3355
+ - updated_at
3356
+ additionalProperties: false
3357
+ description: Immutable semantic fields. desired_version is monotonic across commands targeting the same grant
3358
+ resource. Delivery/execution projections may change. Generic R1 auto-reversal is review; typed compensation
3359
+ requires explicit policy.
3360
+ ClaimRequest:
3361
+ type: object
3362
+ properties:
3363
+ execution_id:
3364
+ type: string
3365
+ format: uuid
3366
+ instance_id:
3367
+ type: string
3368
+ minLength: 1
3369
+ maxLength: 128
3370
+ expected_desired_version:
3371
+ type: integer
3372
+ minimum: 1
3373
+ maximum: 9007199254740991
3374
+ required:
3375
+ - execution_id
3376
+ - instance_id
3377
+ - expected_desired_version
3378
+ additionalProperties: false
3379
+ description: Stable execution identity. Replaying its key preserves claim identity but always re-evaluates
3380
+ current validity; no stale successful cache.
3381
+ Claim:
3382
+ type: object
3383
+ properties:
3384
+ claim_id:
3385
+ type: string
3386
+ format: uuid
3387
+ command_id:
3388
+ type: string
3389
+ format: uuid
3390
+ execution_id:
3391
+ type: string
3392
+ format: uuid
3393
+ decision:
3394
+ type: string
3395
+ enum:
3396
+ - execute
3397
+ - superseded
3398
+ - blocked
3399
+ - review_required
3400
+ - expired
3401
+ valid:
3402
+ type: boolean
3403
+ generation:
3404
+ type: integer
3405
+ minimum: 1
3406
+ maximum: 9007199254740991
3407
+ decision_version:
3408
+ type: integer
3409
+ minimum: 1
3410
+ maximum: 9007199254740991
3411
+ desired_version:
3412
+ type: integer
3413
+ minimum: 1
3414
+ maximum: 9007199254740991
3415
+ issued_at:
3416
+ type: string
3417
+ format: date-time
3418
+ expires_at:
3419
+ type: string
3420
+ format: date-time
3421
+ reason_codes:
3422
+ type: array
3423
+ items:
3424
+ type: string
3425
+ minItems: 0
3426
+ maxItems: 32
3427
+ required:
3428
+ - claim_id
3429
+ - command_id
3430
+ - execution_id
3431
+ - decision
3432
+ - valid
3433
+ - generation
3434
+ - decision_version
3435
+ - desired_version
3436
+ - issued_at
3437
+ - expires_at
3438
+ - reason_codes
3439
+ additionalProperties: false
3440
+ description: valid=true iff decision=execute and current claim is unexpired/not revoked. HTTP 200 can contain
3441
+ valid=false. A claim is not a distributed transaction; later external refunds may require compensation.
3442
+ allOf:
3443
+ - if:
3444
+ properties:
3445
+ decision:
3446
+ const: execute
3447
+ then:
3448
+ properties:
3449
+ valid:
3450
+ const: true
3451
+ else:
3452
+ properties:
3453
+ valid:
3454
+ const: false
3455
+ FulfillmentResultInput:
3456
+ type: object
3457
+ properties:
3458
+ execution_id:
3459
+ type: string
3460
+ format: uuid
3461
+ claim_id:
3462
+ type: string
3463
+ format: uuid
3464
+ lease_generation:
3465
+ type: integer
3466
+ minimum: 1
3467
+ maximum: 9007199254740991
3468
+ result:
3469
+ type: string
3470
+ enum:
3471
+ - applied
3472
+ - noop
3473
+ - failed
3474
+ - unknown
3475
+ reason_code:
3476
+ type: string
3477
+ description: Required for noop, e.g. ALREADY_APPLIED, SUPERSEDED, NO_EFFECT_REQUIRED. Explain why no new
3478
+ effect occurred.
3479
+ minLength: 1
3480
+ maxLength: 128
3481
+ applied_version:
3482
+ type: integer
3483
+ minimum: 1
3484
+ maximum: 9007199254740991
3485
+ effect_reference:
3486
+ type: string
3487
+ minLength: 1
3488
+ maxLength: 256
3489
+ applied_at:
3490
+ type: string
3491
+ format: date-time
3492
+ error_code:
3493
+ type: string
3494
+ minLength: 1
3495
+ maxLength: 128
3496
+ error_message:
3497
+ type: string
3498
+ maxLength: 1000
3499
+ required:
3500
+ - execution_id
3501
+ - claim_id
3502
+ - lease_generation
3503
+ - result
3504
+ additionalProperties: false
3505
+ description: applied requires applied_version, applied_at and effect_reference. noop requires reason_code;
3506
+ known-existing-effect metadata is optional only as a complete group, never invented for no effect. Failed
3507
+ requires error_code. The server validates claim ownership but records late results even if lease expired/canceled.
3508
+ Contradictory results are retained as conflicts, not last-write-wins.
3509
+ allOf:
3510
+ - if:
3511
+ properties:
3512
+ result:
3513
+ const: applied
3514
+ then:
3515
+ required:
3516
+ - applied_version
3517
+ - effect_reference
3518
+ - applied_at
3519
+ - if:
3520
+ properties:
3521
+ result:
3522
+ const: noop
3523
+ then:
3524
+ required:
3525
+ - reason_code
3526
+ - if:
3527
+ properties:
3528
+ result:
3529
+ const: failed
3530
+ then:
3531
+ required:
3532
+ - error_code
3533
+ - if:
3534
+ anyOf:
3535
+ - required:
3536
+ - applied_version
3537
+ - required:
3538
+ - effect_reference
3539
+ - required:
3540
+ - applied_at
3541
+ then:
3542
+ required:
3543
+ - applied_version
3544
+ - effect_reference
3545
+ - applied_at
3546
+ FulfillmentResult:
3547
+ type: object
3548
+ properties:
3549
+ result_id:
3550
+ type: string
3551
+ format: uuid
3552
+ command_id:
3553
+ type: string
3554
+ format: uuid
3555
+ execution_id:
3556
+ type: string
3557
+ format: uuid
3558
+ result:
3559
+ type: string
3560
+ enum:
3561
+ - applied
3562
+ - noop
3563
+ - failed
3564
+ - unknown
3565
+ reason_code:
3566
+ anyOf:
3567
+ - type: string
3568
+ minLength: 1
3569
+ maxLength: 128
3570
+ - type: 'null'
3571
+ applied_version:
3572
+ anyOf:
3573
+ - type: integer
3574
+ minimum: 1
3575
+ maximum: 9007199254740991
3576
+ - type: 'null'
3577
+ effect_reference:
3578
+ anyOf:
3579
+ - type: string
3580
+ minLength: 1
3581
+ - type: 'null'
3582
+ applied_at:
3583
+ anyOf:
3584
+ - type: string
3585
+ format: date-time
3586
+ - type: 'null'
3587
+ received_at:
3588
+ type: string
3589
+ format: date-time
3590
+ review_required:
3591
+ type: boolean
3592
+ reason_codes:
3593
+ type: array
3594
+ items:
3595
+ type: string
3596
+ minItems: 0
3597
+ maxItems: 32
3598
+ required:
3599
+ - result_id
3600
+ - command_id
3601
+ - execution_id
3602
+ - result
3603
+ - reason_code
3604
+ - applied_version
3605
+ - effect_reference
3606
+ - applied_at
3607
+ - received_at
3608
+ - review_required
3609
+ - reason_codes
3610
+ additionalProperties: false
3611
+ allOf:
3612
+ - if:
3613
+ properties:
3614
+ result:
3615
+ const: applied
3616
+ then:
3617
+ properties:
3618
+ applied_version:
3619
+ type: integer
3620
+ minimum: 1
3621
+ maximum: 9007199254740991
3622
+ effect_reference:
3623
+ type: string
3624
+ minLength: 1
3625
+ applied_at:
3626
+ type: string
3627
+ format: date-time
3628
+ - if:
3629
+ properties:
3630
+ result:
3631
+ const: noop
3632
+ then:
3633
+ properties:
3634
+ reason_code:
3635
+ type: string
3636
+ minLength: 1
3637
+ maxLength: 128
3638
+ - oneOf:
3639
+ - properties:
3640
+ applied_version:
3641
+ type: 'null'
3642
+ effect_reference:
3643
+ type: 'null'
3644
+ applied_at:
3645
+ type: 'null'
3646
+ - properties:
3647
+ applied_version:
3648
+ type: integer
3649
+ minimum: 1
3650
+ maximum: 9007199254740991
3651
+ effect_reference:
3652
+ type: string
3653
+ minLength: 1
3654
+ applied_at:
3655
+ type: string
3656
+ format: date-time
3657
+ RetryDelivery:
3658
+ type: object
3659
+ properties:
3660
+ reason:
3661
+ type: string
3662
+ minLength: 1
3663
+ maxLength: 500
3664
+ required:
3665
+ - reason
3666
+ additionalProperties: false
3667
+ description: Retries the same command/event identity. Does not create another grant or reset an applied/unknown
3668
+ effect to pending.
3669
+ EventEnvelope:
3670
+ type: object
3671
+ properties:
3672
+ merchant_id:
3673
+ type: string
3674
+ format: uuid
3675
+ project_id:
3676
+ type: string
3677
+ format: uuid
3678
+ environment:
3679
+ $ref: '#/components/schemas/Environment'
3680
+ schema_type:
3681
+ const: stablepay.event.v1
3682
+ event_id:
3683
+ type: string
3684
+ format: uuid
3685
+ type:
3686
+ type: string
3687
+ enum:
3688
+ - fulfillment.requested
3689
+ - payment.decision_changed
3690
+ - payment.adjusted
3691
+ - payment.review_required
3692
+ - fulfillment.result_recorded
3693
+ occurred_at:
3694
+ type: string
3695
+ format: date-time
3696
+ resource_id:
3697
+ type: string
3698
+ format: uuid
3699
+ resource_version:
3700
+ type: integer
3701
+ minimum: 1
3702
+ maximum: 9007199254740991
3703
+ data:
3704
+ oneOf:
3705
+ - $ref: '#/components/schemas/FulfillmentEventData'
3706
+ - $ref: '#/components/schemas/PaymentEventData'
3707
+ - $ref: '#/components/schemas/ResultEventData'
3708
+ required:
3709
+ - merchant_id
3710
+ - project_id
3711
+ - environment
3712
+ - schema_type
3713
+ - event_id
3714
+ - type
3715
+ - occurred_at
3716
+ - resource_id
3717
+ - resource_version
3718
+ - data
3719
+ additionalProperties: false
3720
+ description: Event body is immutable. Delivery ID/timestamp/signature are headers and refreshed per network
3721
+ attempt. Consumers fetch current resource/claim when freshness matters.
3722
+ allOf:
3723
+ - if:
3724
+ properties:
3725
+ type:
3726
+ const: fulfillment.requested
3727
+ then:
3728
+ properties:
3729
+ data:
3730
+ $ref: '#/components/schemas/FulfillmentEventData'
3731
+ - if:
3732
+ properties:
3733
+ type:
3734
+ enum:
3735
+ - payment.decision_changed
3736
+ - payment.adjusted
3737
+ - payment.review_required
3738
+ then:
3739
+ properties:
3740
+ data:
3741
+ $ref: '#/components/schemas/PaymentEventData'
3742
+ - if:
3743
+ properties:
3744
+ type:
3745
+ const: fulfillment.result_recorded
3746
+ then:
3747
+ properties:
3748
+ data:
3749
+ $ref: '#/components/schemas/ResultEventData'
3750
+ FulfillmentEventData:
3751
+ type: object
3752
+ properties:
3753
+ kind:
3754
+ const: fulfillment_command
3755
+ command:
3756
+ $ref: '#/components/schemas/FulfillmentCommand'
3757
+ required:
3758
+ - kind
3759
+ - command
3760
+ additionalProperties: false
3761
+ PaymentEventData:
3762
+ type: object
3763
+ properties:
3764
+ kind:
3765
+ const: payment_snapshot
3766
+ payment:
3767
+ $ref: '#/components/schemas/Payment'
3768
+ required:
3769
+ - kind
3770
+ - payment
3771
+ additionalProperties: false
3772
+ ResultEventData:
3773
+ type: object
3774
+ properties:
3775
+ kind:
3776
+ const: fulfillment_result
3777
+ result:
3778
+ $ref: '#/components/schemas/FulfillmentResult'
3779
+ required:
3780
+ - kind
3781
+ - result
3782
+ additionalProperties: false
3783
+ PaymentList:
3784
+ type: object
3785
+ properties:
3786
+ data:
3787
+ type: array
3788
+ items:
3789
+ $ref: '#/components/schemas/Payment'
3790
+ minItems: 0
3791
+ maxItems: 100
3792
+ next_cursor:
3793
+ anyOf:
3794
+ - type: string
3795
+ - type: 'null'
3796
+ has_more:
3797
+ type: boolean
3798
+ required:
3799
+ - data
3800
+ - next_cursor
3801
+ - has_more
3802
+ additionalProperties: false
3803
+ AttemptList:
3804
+ type: object
3805
+ properties:
3806
+ data:
3807
+ type: array
3808
+ items:
3809
+ $ref: '#/components/schemas/Attempt'
3810
+ minItems: 0
3811
+ maxItems: 100
3812
+ next_cursor:
3813
+ anyOf:
3814
+ - type: string
3815
+ - type: 'null'
3816
+ has_more:
3817
+ type: boolean
3818
+ required:
3819
+ - data
3820
+ - next_cursor
3821
+ - has_more
3822
+ additionalProperties: false
3823
+ ConnectionList:
3824
+ type: object
3825
+ properties:
3826
+ data:
3827
+ type: array
3828
+ items:
3829
+ $ref: '#/components/schemas/Connection'
3830
+ minItems: 0
3831
+ maxItems: 100
3832
+ next_cursor:
3833
+ anyOf:
3834
+ - type: string
3835
+ - type: 'null'
3836
+ has_more:
3837
+ type: boolean
3838
+ required:
3839
+ - data
3840
+ - next_cursor
3841
+ - has_more
3842
+ additionalProperties: false
3843
+ EventList:
3844
+ type: object
3845
+ properties:
3846
+ data:
3847
+ type: array
3848
+ items:
3849
+ $ref: '#/components/schemas/EventEnvelope'
3850
+ minItems: 0
3851
+ maxItems: 100
3852
+ next_cursor:
3853
+ anyOf:
3854
+ - type: string
3855
+ - type: 'null'
3856
+ has_more:
3857
+ type: boolean
3858
+ required:
3859
+ - data
3860
+ - next_cursor
3861
+ - has_more
3862
+ additionalProperties: false