@@ -415,6 +415,20 @@ MUST treat this as a server error (HTTP 5xx) rather than a
4154156 . ` 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
4384527 . 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
4544684 . 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