Skip to content

Commit 3861689

Browse files
Move the settlement-failed error to the stellar spec.
1 parent 52215fd commit 3861689

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

specs/core/draft-httpauth-payment-00.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ below, and the canonical base URI for problem types is
576576
| `method-unsupported` | 400 | Method not accepted |
577577
| `malformed-credential` | 402 | Invalid credential format |
578578
| `invalid-challenge` | 402 | Challenge ID unknown, expired, or already used |
579-
| `settlement-failed` | 402 | Credential valid but settlement failed |
580579

581580
## Retry Behavior
582581

specs/methods/stellar/draft-stellar-charge-00.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,20 @@ MUST treat this as a server error (HTTP 5xx) rather than a
415415
6. `timeBounds.maxTime` MUST NOT exceed the `expires` timestamp from the
416416
challenge.
417417

418+
# Error Codes {#error-codes}
419+
420+
This specification defines the following additional error code beyond those
421+
in {{I-D.httpauth-payment}}:
422+
423+
| Code | HTTP | Description |
424+
|------|------|-------------|
425+
| `settlement-failed` | 402 | Credential valid but on-chain settlement failed |
426+
427+
Servers MUST return `settlement-failed` when a credential passes
428+
verification but the Stellar transaction fails on-chain (e.g., insufficient
429+
funds or sequence number conflict). This is distinct from
430+
`verification-failed`, which indicates the credential failed validation checks.
431+
418432
# Settlement Procedure {#settlement}
419433

420434
## Sponsored Flow
@@ -437,7 +451,7 @@ MUST treat this as a server error (HTTP 5xx) rather than a
437451

438452
7. On `SUCCESS`, return a receipt per {{receipt}}. On `FAILED`, the server
439453
MUST return a `settlement-failed` error per
440-
{{I-D.httpauth-payment}}. The credential was valid but the on-chain
454+
{{error-codes}}. The credential was valid but the on-chain
441455
transaction failed (e.g., insufficient funds or sequence number
442456
conflict).
443457

@@ -453,7 +467,7 @@ MUST treat this as a server error (HTTP 5xx) rather than a
453467

454468
4. On `SUCCESS`, return a receipt per {{receipt}}. On `FAILED`, the server
455469
MUST return a `settlement-failed` error per
456-
{{I-D.httpauth-payment}}. The credential was valid but the on-chain
470+
{{error-codes}}. The credential was valid but the on-chain
457471
transaction failed (e.g., insufficient funds or sequence number
458472
conflict).
459473

0 commit comments

Comments
 (0)