@0to1pay/server-sdk 1.0.1 → 2.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.
- package/README.md +28 -3
- package/dist/contracts/openapi.yaml +227 -625
- package/dist/packages/server-sdk/index.d.ts +33 -19
- package/dist/packages/server-sdk/index.js +36 -3
- package/dist/packages/server-sdk/schema.d.ts +206 -490
- package/package.json +2 -2
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
|
|
3
3
|
info:
|
|
4
|
-
title:
|
|
4
|
+
title: 0to1pay Payment & Fulfillment API
|
|
5
5
|
version: 1.0.0-design
|
|
6
|
-
description: 'Seller API for
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
across projects that share the same provider account.'
|
|
6
|
+
description: 'Seller API for USDC and USDT payments on supported networks and verified order fulfillment.
|
|
7
|
+
Resource IDs are UUID strings. Merchant API keys are scoped to a merchant, project and environment.
|
|
8
|
+
Historical fiat records are available through read endpoints.'
|
|
10
9
|
servers:
|
|
11
10
|
- url: /v1
|
|
12
11
|
description: Use the origin that serves the OpenAPI document.
|
|
@@ -113,9 +112,6 @@ paths:
|
|
|
113
112
|
x-required-scope: payments:write
|
|
114
113
|
description: Same scoped order_ref/order_revision and identical specification returns the existing resource.
|
|
115
114
|
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
115
|
parameters:
|
|
120
116
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
121
117
|
responses:
|
|
@@ -228,12 +224,12 @@ paths:
|
|
|
228
224
|
- $ref: '#/components/parameters/payment_id'
|
|
229
225
|
post:
|
|
230
226
|
operationId: createQuote
|
|
231
|
-
summary: Freeze
|
|
227
|
+
summary: Freeze stablecoin payable terms
|
|
232
228
|
tags:
|
|
233
229
|
- Quotes
|
|
234
230
|
x-required-scope: payments:write
|
|
235
|
-
description:
|
|
236
|
-
exceed the
|
|
231
|
+
description: Reserve a unique recipient for the selected network and freeze the amount and token.
|
|
232
|
+
Quote expiry cannot exceed the payment expiry.
|
|
237
233
|
parameters:
|
|
238
234
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
239
235
|
responses:
|
|
@@ -305,43 +301,70 @@ paths:
|
|
|
305
301
|
$ref: '#/components/responses/RateLimited'
|
|
306
302
|
'503':
|
|
307
303
|
$ref: '#/components/responses/Unavailable'
|
|
308
|
-
/
|
|
304
|
+
/quotes/{quote_id}/chain-intents:
|
|
309
305
|
parameters:
|
|
310
|
-
- $ref: '#/components/parameters/
|
|
306
|
+
- $ref: '#/components/parameters/quote_id'
|
|
311
307
|
post:
|
|
312
|
-
operationId:
|
|
313
|
-
summary: Create a
|
|
314
|
-
tags:
|
|
315
|
-
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
mapping before exposing next_action. A provider failure does not automatically retry a different payment
|
|
319
|
-
route.
|
|
308
|
+
operationId: createChainIntent
|
|
309
|
+
summary: Create a wallet approval challenge for a buyer checkout
|
|
310
|
+
tags: [Quotes]
|
|
311
|
+
x-required-scope: payments:write
|
|
312
|
+
description: The merchant server must first authenticate the buyer and authorize access to the quote.
|
|
313
|
+
Supply a stable opaque reference for that authenticated checkout. Never send the session credential itself.
|
|
320
314
|
parameters:
|
|
321
315
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
316
|
+
requestBody:
|
|
317
|
+
required: true
|
|
318
|
+
content:
|
|
319
|
+
application/json:
|
|
320
|
+
schema:
|
|
321
|
+
$ref: '#/components/schemas/CreateChainIntent'
|
|
322
322
|
responses:
|
|
323
|
-
'
|
|
324
|
-
description:
|
|
325
|
-
headers:
|
|
326
|
-
X-Request-Id:
|
|
327
|
-
schema:
|
|
328
|
-
type: string
|
|
329
|
-
format: uuid
|
|
323
|
+
'200':
|
|
324
|
+
description: The checkout's payer and wallet approval message.
|
|
330
325
|
content:
|
|
331
326
|
application/json:
|
|
332
327
|
schema:
|
|
333
|
-
$ref: '#/components/schemas/
|
|
334
|
-
'
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
328
|
+
$ref: '#/components/schemas/ChainIntent'
|
|
329
|
+
'400':
|
|
330
|
+
$ref: '#/components/responses/BadRequest'
|
|
331
|
+
'401':
|
|
332
|
+
$ref: '#/components/responses/Unauthorized'
|
|
333
|
+
'403':
|
|
334
|
+
$ref: '#/components/responses/Forbidden'
|
|
335
|
+
'404':
|
|
336
|
+
$ref: '#/components/responses/NotFound'
|
|
337
|
+
'409':
|
|
338
|
+
$ref: '#/components/responses/Conflict'
|
|
339
|
+
'429':
|
|
340
|
+
$ref: '#/components/responses/RateLimited'
|
|
341
|
+
'503':
|
|
342
|
+
$ref: '#/components/responses/Unavailable'
|
|
343
|
+
/quotes/{quote_id}/chain-intents/{intent_id}/authorize:
|
|
344
|
+
parameters:
|
|
345
|
+
- $ref: '#/components/parameters/quote_id'
|
|
346
|
+
- $ref: '#/components/parameters/intent_id'
|
|
347
|
+
post:
|
|
348
|
+
operationId: authorizeChainIntent
|
|
349
|
+
summary: Authorize the frozen quote with the chosen payer wallet
|
|
350
|
+
tags: [Quotes]
|
|
351
|
+
x-required-scope: payments:write
|
|
352
|
+
description: Verify the signature over the exact signing_message returned by createChainIntent.
|
|
353
|
+
parameters:
|
|
354
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
355
|
+
requestBody:
|
|
356
|
+
required: true
|
|
357
|
+
content:
|
|
358
|
+
application/json:
|
|
359
|
+
schema:
|
|
360
|
+
$ref: '#/components/schemas/AuthorizeChainIntent'
|
|
361
|
+
responses:
|
|
362
|
+
'200':
|
|
363
|
+
description: Wallet approval is recorded.
|
|
341
364
|
content:
|
|
342
365
|
application/json:
|
|
343
366
|
schema:
|
|
344
|
-
$ref: '#/components/schemas/
|
|
367
|
+
$ref: '#/components/schemas/ChainIntent'
|
|
345
368
|
'400':
|
|
346
369
|
$ref: '#/components/responses/BadRequest'
|
|
347
370
|
'401':
|
|
@@ -356,34 +379,32 @@ paths:
|
|
|
356
379
|
$ref: '#/components/responses/RateLimited'
|
|
357
380
|
'503':
|
|
358
381
|
$ref: '#/components/responses/Unavailable'
|
|
382
|
+
/quotes/{quote_id}/chain-intents/{intent_id}/submit:
|
|
383
|
+
parameters:
|
|
384
|
+
- $ref: '#/components/parameters/quote_id'
|
|
385
|
+
- $ref: '#/components/parameters/intent_id'
|
|
386
|
+
post:
|
|
387
|
+
operationId: submitChainIntent
|
|
388
|
+
summary: Bind a broadcast transaction to its authorized checkout
|
|
389
|
+
tags: [Quotes]
|
|
390
|
+
x-required-scope: payments:write
|
|
391
|
+
description: Submit a second wallet signature over signing_message followed by a newline and Transaction, a colon,
|
|
392
|
+
a space and the canonical transaction ID. The Worker verifies the actual token source and finalized transfer.
|
|
393
|
+
parameters:
|
|
394
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
359
395
|
requestBody:
|
|
360
396
|
required: true
|
|
361
397
|
content:
|
|
362
398
|
application/json:
|
|
363
399
|
schema:
|
|
364
|
-
$ref: '#/components/schemas/
|
|
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'
|
|
400
|
+
$ref: '#/components/schemas/SubmitChainIntent'
|
|
375
401
|
responses:
|
|
376
402
|
'200':
|
|
377
|
-
description:
|
|
378
|
-
headers:
|
|
379
|
-
X-Request-Id:
|
|
380
|
-
schema:
|
|
381
|
-
type: string
|
|
382
|
-
format: uuid
|
|
403
|
+
description: The transaction claim is recorded for verification. Check the payment for the resulting decision.
|
|
383
404
|
content:
|
|
384
405
|
application/json:
|
|
385
406
|
schema:
|
|
386
|
-
$ref: '#/components/schemas/
|
|
407
|
+
$ref: '#/components/schemas/ChainIntent'
|
|
387
408
|
'400':
|
|
388
409
|
$ref: '#/components/responses/BadRequest'
|
|
389
410
|
'401':
|
|
@@ -398,23 +419,21 @@ paths:
|
|
|
398
419
|
$ref: '#/components/responses/RateLimited'
|
|
399
420
|
'503':
|
|
400
421
|
$ref: '#/components/responses/Unavailable'
|
|
401
|
-
/payments/{payment_id}/
|
|
422
|
+
/payments/{payment_id}/attempts:
|
|
402
423
|
parameters:
|
|
403
424
|
- $ref: '#/components/parameters/payment_id'
|
|
404
425
|
post:
|
|
405
|
-
operationId:
|
|
406
|
-
summary:
|
|
426
|
+
operationId: createAttempt
|
|
427
|
+
summary: Get or open the transfer attempt for an assigned chain quote
|
|
407
428
|
tags:
|
|
408
429
|
- Attempts
|
|
409
|
-
x-required-scope: attempts:
|
|
410
|
-
description:
|
|
411
|
-
IDs are not accepted. Historical imports are observation-only. Inbox events arriving before attachment are
|
|
412
|
-
retained and replayed.
|
|
430
|
+
x-required-scope: attempts:initiate
|
|
431
|
+
description: Chain quotes open a transfer attempt when assigned. Repeating this call returns that attempt.
|
|
413
432
|
parameters:
|
|
414
433
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
415
434
|
responses:
|
|
416
435
|
'201':
|
|
417
|
-
description:
|
|
436
|
+
description: Chain transfer attempt for the assigned quote.
|
|
418
437
|
headers:
|
|
419
438
|
X-Request-Id:
|
|
420
439
|
schema:
|
|
@@ -423,7 +442,7 @@ paths:
|
|
|
423
442
|
content:
|
|
424
443
|
application/json:
|
|
425
444
|
schema:
|
|
426
|
-
$ref: '#/components/schemas/
|
|
445
|
+
$ref: '#/components/schemas/AttemptMutationResult'
|
|
427
446
|
'400':
|
|
428
447
|
$ref: '#/components/responses/BadRequest'
|
|
429
448
|
'401':
|
|
@@ -443,18 +462,17 @@ paths:
|
|
|
443
462
|
content:
|
|
444
463
|
application/json:
|
|
445
464
|
schema:
|
|
446
|
-
$ref: '#/components/schemas/
|
|
447
|
-
/attempts/{attempt_id}:
|
|
448
|
-
parameters:
|
|
449
|
-
- $ref: '#/components/parameters/attempt_id'
|
|
465
|
+
$ref: '#/components/schemas/CreateAttempt'
|
|
450
466
|
get:
|
|
451
|
-
operationId:
|
|
452
|
-
summary:
|
|
467
|
+
operationId: listAttempts
|
|
468
|
+
summary: List every payment attempt
|
|
453
469
|
tags:
|
|
454
470
|
- Attempts
|
|
455
471
|
x-required-scope: payments:read
|
|
456
472
|
description: ''
|
|
457
|
-
parameters:
|
|
473
|
+
parameters:
|
|
474
|
+
- $ref: '#/components/parameters/Cursor'
|
|
475
|
+
- $ref: '#/components/parameters/Limit'
|
|
458
476
|
responses:
|
|
459
477
|
'200':
|
|
460
478
|
description: Success
|
|
@@ -466,7 +484,7 @@ paths:
|
|
|
466
484
|
content:
|
|
467
485
|
application/json:
|
|
468
486
|
schema:
|
|
469
|
-
$ref: '#/components/schemas/
|
|
487
|
+
$ref: '#/components/schemas/AttemptList'
|
|
470
488
|
'400':
|
|
471
489
|
$ref: '#/components/responses/BadRequest'
|
|
472
490
|
'401':
|
|
@@ -481,23 +499,20 @@ paths:
|
|
|
481
499
|
$ref: '#/components/responses/RateLimited'
|
|
482
500
|
'503':
|
|
483
501
|
$ref: '#/components/responses/Unavailable'
|
|
484
|
-
/attempts/{attempt_id}
|
|
502
|
+
/attempts/{attempt_id}:
|
|
485
503
|
parameters:
|
|
486
504
|
- $ref: '#/components/parameters/attempt_id'
|
|
487
|
-
|
|
488
|
-
operationId:
|
|
489
|
-
summary:
|
|
505
|
+
get:
|
|
506
|
+
operationId: getAttempt
|
|
507
|
+
summary: Get current execution state
|
|
490
508
|
tags:
|
|
491
509
|
- Attempts
|
|
492
|
-
x-required-scope:
|
|
493
|
-
description:
|
|
494
|
-
|
|
495
|
-
remaining quote obligation, not a client-provided amount.
|
|
496
|
-
parameters:
|
|
497
|
-
- $ref: '#/components/parameters/IdempotencyKey'
|
|
510
|
+
x-required-scope: payments:read
|
|
511
|
+
description: ''
|
|
512
|
+
parameters: []
|
|
498
513
|
responses:
|
|
499
|
-
'
|
|
500
|
-
description:
|
|
514
|
+
'200':
|
|
515
|
+
description: Success
|
|
501
516
|
headers:
|
|
502
517
|
X-Request-Id:
|
|
503
518
|
schema:
|
|
@@ -506,7 +521,7 @@ paths:
|
|
|
506
521
|
content:
|
|
507
522
|
application/json:
|
|
508
523
|
schema:
|
|
509
|
-
$ref: '#/components/schemas/
|
|
524
|
+
$ref: '#/components/schemas/Attempt'
|
|
510
525
|
'400':
|
|
511
526
|
$ref: '#/components/responses/BadRequest'
|
|
512
527
|
'401':
|
|
@@ -521,12 +536,6 @@ paths:
|
|
|
521
536
|
$ref: '#/components/responses/RateLimited'
|
|
522
537
|
'503':
|
|
523
538
|
$ref: '#/components/responses/Unavailable'
|
|
524
|
-
requestBody:
|
|
525
|
-
required: true
|
|
526
|
-
content:
|
|
527
|
-
application/json:
|
|
528
|
-
schema:
|
|
529
|
-
$ref: '#/components/schemas/ConfirmAttempt'
|
|
530
539
|
/payments/{payment_id}/verify:
|
|
531
540
|
parameters:
|
|
532
541
|
- $ref: '#/components/parameters/payment_id'
|
|
@@ -586,7 +595,7 @@ paths:
|
|
|
586
595
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
587
596
|
responses:
|
|
588
597
|
'202':
|
|
589
|
-
description: Collection closed locally
|
|
598
|
+
description: Collection closed locally. Late transfers remain visible.
|
|
590
599
|
headers:
|
|
591
600
|
X-Request-Id:
|
|
592
601
|
schema:
|
|
@@ -625,7 +634,8 @@ paths:
|
|
|
625
634
|
tags:
|
|
626
635
|
- Verification
|
|
627
636
|
x-required-scope: payments:review
|
|
628
|
-
description: Compare expected_resource_version under lock.
|
|
637
|
+
description: Compare expected_resource_version under lock. accept_unattributed_chain_payment requires
|
|
638
|
+
the ID of one verified exact chain movement and reviewed evidence. accept_late_payment requires independent valid
|
|
629
639
|
evidence, bound order, correct full amount/asset/payee/account and timing-only hold; all other blockers
|
|
630
640
|
fail with 409. It does not reopen collection, manufacture money, clear refunds/disputes, change provenance,
|
|
631
641
|
or reissue an existing grant. keep_on_hold and reject_fulfillment record persistent business restrictions;
|
|
@@ -715,102 +725,10 @@ paths:
|
|
|
715
725
|
$ref: '#/components/responses/RateLimited'
|
|
716
726
|
'503':
|
|
717
727
|
$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
728
|
/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
729
|
get:
|
|
812
730
|
operationId: listConnections
|
|
813
|
-
summary: List
|
|
731
|
+
summary: List chain connections and historical connection records
|
|
814
732
|
tags:
|
|
815
733
|
- Connections
|
|
816
734
|
x-required-scope: connections:read
|
|
@@ -881,100 +799,6 @@ paths:
|
|
|
881
799
|
$ref: '#/components/responses/RateLimited'
|
|
882
800
|
'503':
|
|
883
801
|
$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
802
|
/connections/{connection_id}/disable:
|
|
979
803
|
parameters:
|
|
980
804
|
- $ref: '#/components/parameters/connection_id'
|
|
@@ -1145,40 +969,6 @@ paths:
|
|
|
1145
969
|
application/json:
|
|
1146
970
|
schema:
|
|
1147
971
|
$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
972
|
/events:
|
|
1183
973
|
get:
|
|
1184
974
|
operationId: listEvents
|
|
@@ -1265,7 +1055,7 @@ paths:
|
|
|
1265
1055
|
x-required-scope: fulfillment:execute
|
|
1266
1056
|
description: Idempotency binds request/claim identity but bypasses generic cached-success replay. Always recheck
|
|
1267
1057
|
claim expiry/revocation, current decision and same grant desired_version. claim validity is time-of-check;
|
|
1268
|
-
|
|
1058
|
+
a chain reorganization can require compensation. Same key cannot create a new lease after expiry.
|
|
1269
1059
|
parameters:
|
|
1270
1060
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
1271
1061
|
responses:
|
|
@@ -1462,8 +1252,7 @@ components:
|
|
|
1462
1252
|
in: header
|
|
1463
1253
|
required: true
|
|
1464
1254
|
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.
|
|
1466
|
-
required on provider webhook ingress.
|
|
1255
|
+
Same key with different canonical request -> 409. Claim responses dynamically revalidate validity.
|
|
1467
1256
|
schema:
|
|
1468
1257
|
type: string
|
|
1469
1258
|
minLength: 16
|
|
@@ -1506,6 +1295,13 @@ components:
|
|
|
1506
1295
|
schema:
|
|
1507
1296
|
type: string
|
|
1508
1297
|
format: uuid
|
|
1298
|
+
intent_id:
|
|
1299
|
+
name: intent_id
|
|
1300
|
+
in: path
|
|
1301
|
+
required: true
|
|
1302
|
+
schema:
|
|
1303
|
+
type: string
|
|
1304
|
+
format: uuid
|
|
1509
1305
|
connection_id:
|
|
1510
1306
|
name: connection_id
|
|
1511
1307
|
in: path
|
|
@@ -1542,7 +1338,7 @@ components:
|
|
|
1542
1338
|
schema:
|
|
1543
1339
|
$ref: '#/components/schemas/Error'
|
|
1544
1340
|
Unauthorized:
|
|
1545
|
-
description: Missing
|
|
1341
|
+
description: Missing or invalid server credential.
|
|
1546
1342
|
content:
|
|
1547
1343
|
application/json:
|
|
1548
1344
|
schema:
|
|
@@ -1597,7 +1393,7 @@ components:
|
|
|
1597
1393
|
pattern: '^0x[0-9a-fA-F]{64}$'
|
|
1598
1394
|
ChainSelectorId:
|
|
1599
1395
|
type: integer
|
|
1600
|
-
enum: [1, 999, 8453, 42161,
|
|
1396
|
+
enum: [1, 999, 8453, 42161, 31337, 31338, 31339, 31340, 900001, 900002, 728126428, 900003]
|
|
1601
1397
|
description: EVM or TRON chain ID, or a local or Solana selector. Use network_id for the network reference.
|
|
1602
1398
|
ChainNetworkId:
|
|
1603
1399
|
type: string
|
|
@@ -1653,7 +1449,7 @@ components:
|
|
|
1653
1449
|
starts_at_epoch:
|
|
1654
1450
|
type: integer
|
|
1655
1451
|
minimum: 1
|
|
1656
|
-
description: Earliest eligible
|
|
1452
|
+
description: Earliest eligible transfer time, as a UTC Unix timestamp in seconds.
|
|
1657
1453
|
ChainAssets:
|
|
1658
1454
|
type: object
|
|
1659
1455
|
additionalProperties: false
|
|
@@ -1661,7 +1457,7 @@ components:
|
|
|
1661
1457
|
properties:
|
|
1662
1458
|
data:
|
|
1663
1459
|
type: array
|
|
1664
|
-
maxItems:
|
|
1460
|
+
maxItems: 11
|
|
1665
1461
|
items:
|
|
1666
1462
|
type: object
|
|
1667
1463
|
additionalProperties: false
|
|
@@ -1759,7 +1555,7 @@ components:
|
|
|
1759
1555
|
properties:
|
|
1760
1556
|
asset:
|
|
1761
1557
|
type: string
|
|
1762
|
-
description:
|
|
1558
|
+
description: A stablecoin denomination or exact registered chain asset. Historical responses may contain fiat prices.
|
|
1763
1559
|
minLength: 1
|
|
1764
1560
|
maxLength: 160
|
|
1765
1561
|
amount_atomic:
|
|
@@ -1775,8 +1571,7 @@ components:
|
|
|
1775
1571
|
- amount_atomic
|
|
1776
1572
|
- scale
|
|
1777
1573
|
additionalProperties: false
|
|
1778
|
-
description: The asset registry
|
|
1779
|
-
not net payout. R1 rejects unconfigured assets.
|
|
1574
|
+
description: The asset registry confirms scale. USDC 10.00 is amount_atomic="10000000", scale=6.
|
|
1780
1575
|
NonNegativeMoney:
|
|
1781
1576
|
type: object
|
|
1782
1577
|
properties:
|
|
@@ -1874,7 +1669,14 @@ components:
|
|
|
1874
1669
|
minLength: 1
|
|
1875
1670
|
maxLength: 256
|
|
1876
1671
|
price:
|
|
1877
|
-
|
|
1672
|
+
allOf:
|
|
1673
|
+
- $ref: '#/components/schemas/Money'
|
|
1674
|
+
- type: object
|
|
1675
|
+
properties:
|
|
1676
|
+
asset:
|
|
1677
|
+
enum: ['stable:USDC', 'stable:USDT']
|
|
1678
|
+
scale:
|
|
1679
|
+
const: 6
|
|
1878
1680
|
allowed_connections:
|
|
1879
1681
|
type: array
|
|
1880
1682
|
items:
|
|
@@ -2189,7 +1991,7 @@ components:
|
|
|
2189
1991
|
format: uuid
|
|
2190
1992
|
presentment_asset:
|
|
2191
1993
|
type: string
|
|
2192
|
-
description:
|
|
1994
|
+
description: Use the payment’s stablecoin denomination or the exact registered asset for the selected network.
|
|
2193
1995
|
minLength: 1
|
|
2194
1996
|
maxLength: 160
|
|
2195
1997
|
expires_in_seconds:
|
|
@@ -2285,107 +2087,10 @@ components:
|
|
|
2285
2087
|
quote_id:
|
|
2286
2088
|
type: string
|
|
2287
2089
|
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
2090
|
required:
|
|
2324
2091
|
- connection_id
|
|
2325
2092
|
- 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
2093
|
additionalProperties: false
|
|
2388
|
-
description: Reserved for Release 2; R1 adapters must not emit.
|
|
2389
2094
|
TransferInstructionAction:
|
|
2390
2095
|
type: object
|
|
2391
2096
|
properties:
|
|
@@ -2413,7 +2118,7 @@ components:
|
|
|
2413
2118
|
starts_at_epoch:
|
|
2414
2119
|
type: integer
|
|
2415
2120
|
minimum: 1
|
|
2416
|
-
description: Earliest eligible
|
|
2121
|
+
description: Earliest eligible transfer time, as a UTC Unix timestamp in seconds.
|
|
2417
2122
|
expires_at:
|
|
2418
2123
|
type: string
|
|
2419
2124
|
format: date-time
|
|
@@ -2447,17 +2152,11 @@ components:
|
|
|
2447
2152
|
additionalProperties: false
|
|
2448
2153
|
NextAction:
|
|
2449
2154
|
oneOf:
|
|
2450
|
-
- $ref: '#/components/schemas/RedirectAction'
|
|
2451
|
-
- $ref: '#/components/schemas/ProviderClientAction'
|
|
2452
|
-
- $ref: '#/components/schemas/WalletRequestAction'
|
|
2453
2155
|
- $ref: '#/components/schemas/TransferInstructionAction'
|
|
2454
2156
|
- $ref: '#/components/schemas/NoAction'
|
|
2455
2157
|
discriminator:
|
|
2456
2158
|
propertyName: type
|
|
2457
2159
|
mapping:
|
|
2458
|
-
redirect: '#/components/schemas/RedirectAction'
|
|
2459
|
-
provider_client: '#/components/schemas/ProviderClientAction'
|
|
2460
|
-
wallet_request: '#/components/schemas/WalletRequestAction'
|
|
2461
2160
|
transfer_instruction: '#/components/schemas/TransferInstructionAction'
|
|
2462
2161
|
none: '#/components/schemas/NoAction'
|
|
2463
2162
|
Binding:
|
|
@@ -2575,8 +2274,8 @@ components:
|
|
|
2575
2274
|
- updated_at
|
|
2576
2275
|
- resource_version
|
|
2577
2276
|
additionalProperties: false
|
|
2578
|
-
description:
|
|
2579
|
-
|
|
2277
|
+
description: A transfer instruction identifies the registered asset and assigned recipient for an unfinished quote.
|
|
2278
|
+
The Worker verifies funds from finalized chain evidence. Historical fiat attempts return no action.
|
|
2580
2279
|
allOf:
|
|
2581
2280
|
- if:
|
|
2582
2281
|
properties:
|
|
@@ -2679,18 +2378,77 @@ components:
|
|
|
2679
2378
|
- attempt
|
|
2680
2379
|
- operation
|
|
2681
2380
|
additionalProperties: false
|
|
2682
|
-
|
|
2381
|
+
ChainCheckoutSessionRef:
|
|
2382
|
+
type: string
|
|
2383
|
+
pattern: '^[A-Za-z0-9_-]{16,128}$'
|
|
2384
|
+
description: Stable opaque reference assigned by the merchant server to the authenticated buyer checkout.
|
|
2385
|
+
ChainIntentSignature:
|
|
2386
|
+
type: string
|
|
2387
|
+
pattern: '^0x(?:[0-9A-Fa-f]{128}|[0-9A-Fa-f]{130})$'
|
|
2388
|
+
description: Use a 0x-prefixed wallet signature. Encode raw Solana Ed25519 signature bytes as hex.
|
|
2389
|
+
ChainIntentTransactionId:
|
|
2390
|
+
type: string
|
|
2391
|
+
pattern: '^(0x[0-9A-Fa-f]{64}|[0-9A-Fa-f]{64}|[1-9A-HJ-NP-Za-km-z]{64,88})$'
|
|
2392
|
+
description: EVM and TRON IDs are canonicalized to lowercase 0x-prefixed hex. TRON accepts bare hex. Solana signatures remain case-sensitive base58.
|
|
2393
|
+
CreateChainIntent:
|
|
2683
2394
|
type: object
|
|
2684
2395
|
properties:
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
required:
|
|
2690
|
-
|
|
2396
|
+
checkout_session_ref:
|
|
2397
|
+
$ref: '#/components/schemas/ChainCheckoutSessionRef'
|
|
2398
|
+
payer_address:
|
|
2399
|
+
$ref: '#/components/schemas/ChainAddress'
|
|
2400
|
+
required: [checkout_session_ref, payer_address]
|
|
2401
|
+
additionalProperties: false
|
|
2402
|
+
AuthorizeChainIntent:
|
|
2403
|
+
type: object
|
|
2404
|
+
properties:
|
|
2405
|
+
checkout_session_ref:
|
|
2406
|
+
$ref: '#/components/schemas/ChainCheckoutSessionRef'
|
|
2407
|
+
signature:
|
|
2408
|
+
$ref: '#/components/schemas/ChainIntentSignature'
|
|
2409
|
+
required: [checkout_session_ref, signature]
|
|
2410
|
+
additionalProperties: false
|
|
2411
|
+
SubmitChainIntent:
|
|
2412
|
+
type: object
|
|
2413
|
+
properties:
|
|
2414
|
+
checkout_session_ref:
|
|
2415
|
+
$ref: '#/components/schemas/ChainCheckoutSessionRef'
|
|
2416
|
+
transaction_id:
|
|
2417
|
+
$ref: '#/components/schemas/ChainIntentTransactionId'
|
|
2418
|
+
signature:
|
|
2419
|
+
$ref: '#/components/schemas/ChainIntentSignature'
|
|
2420
|
+
required: [checkout_session_ref, transaction_id, signature]
|
|
2421
|
+
additionalProperties: false
|
|
2422
|
+
ChainIntent:
|
|
2423
|
+
type: object
|
|
2424
|
+
properties:
|
|
2425
|
+
intent_id:
|
|
2426
|
+
type: string
|
|
2427
|
+
format: uuid
|
|
2428
|
+
quote_id:
|
|
2429
|
+
type: string
|
|
2430
|
+
format: uuid
|
|
2431
|
+
family:
|
|
2432
|
+
$ref: '#/components/schemas/ChainFamily'
|
|
2433
|
+
payer_address:
|
|
2434
|
+
$ref: '#/components/schemas/ChainAddress'
|
|
2435
|
+
expires_at:
|
|
2436
|
+
type: string
|
|
2437
|
+
format: date-time
|
|
2438
|
+
signing_message:
|
|
2439
|
+
type: string
|
|
2440
|
+
minLength: 1
|
|
2441
|
+
maxLength: 2048
|
|
2442
|
+
description: Exact UTF-8 message to sign for this checkout and payer. Preserve line endings and spacing.
|
|
2443
|
+
status:
|
|
2444
|
+
type: string
|
|
2445
|
+
enum: [pending, authorized, submitted]
|
|
2446
|
+
transaction_id:
|
|
2447
|
+
anyOf:
|
|
2448
|
+
- $ref: '#/components/schemas/ChainIntentTransactionId'
|
|
2449
|
+
- type: 'null'
|
|
2450
|
+
required: [intent_id, quote_id, family, payer_address, expires_at, signing_message, status, transaction_id]
|
|
2691
2451
|
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
2452
|
VerifyRequest:
|
|
2695
2453
|
type: object
|
|
2696
2454
|
properties:
|
|
@@ -2722,20 +2480,7 @@ components:
|
|
|
2722
2480
|
- expected_resource_version
|
|
2723
2481
|
- reason
|
|
2724
2482
|
additionalProperties: false
|
|
2725
|
-
description: Stops new attempts immediately.
|
|
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.
|
|
2483
|
+
description: Stops new transfer attempts immediately. Previously sent or in-flight transfers can still settle on-chain.
|
|
2739
2484
|
ReviewRequest:
|
|
2740
2485
|
type: object
|
|
2741
2486
|
properties:
|
|
@@ -2747,8 +2492,16 @@ components:
|
|
|
2747
2492
|
type: string
|
|
2748
2493
|
enum:
|
|
2749
2494
|
- accept_late_payment
|
|
2495
|
+
- accept_unattributed_chain_payment
|
|
2750
2496
|
- keep_on_hold
|
|
2751
2497
|
- reject_fulfillment
|
|
2498
|
+
movement_id:
|
|
2499
|
+
type: string
|
|
2500
|
+
format: uuid
|
|
2501
|
+
description: Verified on-chain receipt to apply when accepting an unattributed payment.
|
|
2502
|
+
allow_late_payment:
|
|
2503
|
+
type: boolean
|
|
2504
|
+
description: Explicit operator approval for the specified movement after expiry.
|
|
2752
2505
|
reason:
|
|
2753
2506
|
type: string
|
|
2754
2507
|
description: Required human/business justification; not a replacement payment proof.
|
|
@@ -2759,9 +2512,22 @@ components:
|
|
|
2759
2512
|
- action
|
|
2760
2513
|
- reason
|
|
2761
2514
|
additionalProperties: false
|
|
2515
|
+
allOf:
|
|
2516
|
+
- if:
|
|
2517
|
+
properties:
|
|
2518
|
+
action:
|
|
2519
|
+
const: accept_unattributed_chain_payment
|
|
2520
|
+
then:
|
|
2521
|
+
required: [movement_id]
|
|
2522
|
+
else:
|
|
2523
|
+
not:
|
|
2524
|
+
anyOf:
|
|
2525
|
+
- required: [movement_id]
|
|
2526
|
+
- required: [allow_late_payment]
|
|
2762
2527
|
description: Narrow audited business exception. accept_late_payment only accepts independently valid, bound,
|
|
2763
|
-
correctly funded evidence held for timing
|
|
2764
|
-
|
|
2528
|
+
correctly funded evidence held for timing. accept_unattributed_chain_payment can override missing wallet
|
|
2529
|
+
approval only for the named verified movement. Neither action overrides amount, payee, account, asset,
|
|
2530
|
+
evidence integrity or duplicate allocation.
|
|
2765
2531
|
ReviewResult:
|
|
2766
2532
|
type: object
|
|
2767
2533
|
properties:
|
|
@@ -2775,6 +2541,7 @@ components:
|
|
|
2775
2541
|
type: string
|
|
2776
2542
|
enum:
|
|
2777
2543
|
- accept_late_payment
|
|
2544
|
+
- accept_unattributed_chain_payment
|
|
2778
2545
|
- keep_on_hold
|
|
2779
2546
|
- reject_fulfillment
|
|
2780
2547
|
previous_decision_id:
|
|
@@ -2839,117 +2606,6 @@ components:
|
|
|
2839
2606
|
- enforce_expiry
|
|
2840
2607
|
- binding_methods
|
|
2841
2608
|
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
2609
|
Connection:
|
|
2954
2610
|
type: object
|
|
2955
2611
|
properties:
|
|
@@ -3010,10 +2666,8 @@ components:
|
|
|
3010
2666
|
minItems: 0
|
|
3011
2667
|
maxItems: 1000
|
|
3012
2668
|
webhook_url:
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
format: uri
|
|
3016
|
-
- type: 'null'
|
|
2669
|
+
description: Retained for historical reads.
|
|
2670
|
+
type: 'null'
|
|
3017
2671
|
validated_at:
|
|
3018
2672
|
anyOf:
|
|
3019
2673
|
- type: string
|
|
@@ -3049,9 +2703,7 @@ components:
|
|
|
3049
2703
|
- updated_at
|
|
3050
2704
|
- resource_version
|
|
3051
2705
|
additionalProperties: false
|
|
3052
|
-
description:
|
|
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.
|
|
2706
|
+
description: Ready chain connections can be used for new payments. Historical connection records remain available for reads.
|
|
3055
2707
|
allOf:
|
|
3056
2708
|
- if:
|
|
3057
2709
|
properties:
|
|
@@ -3073,56 +2725,6 @@ components:
|
|
|
3073
2725
|
provider_account_id:
|
|
3074
2726
|
type: string
|
|
3075
2727
|
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
2728
|
ConnectionDisable:
|
|
3127
2729
|
type: object
|
|
3128
2730
|
properties:
|