commit 0e2a6619441de78c9dedfbb2322aa69b76f86486
parent 557a030c62dcde7db5cb46e20322fb3b6cb377c9
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 2 Feb 2026 10:30:33 +0100
specification change for #10615
Diffstat:
1 file changed, 31 insertions(+), 8 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -4604,7 +4604,8 @@ Inspecting orders
.. ts:def:: CheckPaymentUnpaidResponse
interface CheckPaymentUnpaidResponse {
- // The order was neither claimed nor paid.
+ // The order was not yet claimed (and thus certainly also
+ // not yet paid).
order_status: "unpaid";
// URI that the wallet must process to complete the payment.
@@ -4615,13 +4616,24 @@ Inspecting orders
// Deadline when the offer expires; the customer must pay before.
// @since protocol **v21**.
+ // @deprecated in **v25** (use proto_contract_terms.pay_deadline instead).
pay_deadline: Timestamp;
// Order summary text.
+ // @deprecated in **v25** (use proto_contract_terms.summary instead).
summary: string;
+ // We cannot return the "final" contract terms here because
+ // the ``nonce`` is not available because the wallet did not yet
+ // claim the order.
+ // So the "ProtoContractTerms" are basically the contract terms,
+ // but without the ``nonce``.
+ // @since protocol **v25**.
+ proto_contract_terms: ProtoContractTerms;
+
// Total amount of the order (to be paid by the customer).
// Will be undefined for unpaid v1 orders
+ // @deprecated in **v25** (use proto_contract_terms instead).
total_amount?: Amount;
// Alternative order ID which was paid for already in the same session.
@@ -4636,8 +4648,6 @@ Inspecting orders
// to show the order QR code / trigger the wallet.
order_status_url: string;
- // We do we NOT return the contract terms here because they may not
- // exist in case the wallet did not yet claim them.
}
.. ts:def:: RefundDetails
@@ -7280,7 +7290,24 @@ The contract terms must have the following structure:
.. ts:def:: ContractTerms
- type ContractTerms = (ContractTermsV1 | ContractTermsV0) & ContractTermsCommon;
+ type ContractTerms = ProtoContractTerms & ContractTermsNonce;
+
+.. ts:def:: ContractTermsNonce
+
+ interface ContractTermsNonce {
+
+ // Nonce generated by the wallet and echoed by the merchant
+ // in this field when the order is claimed and converted
+ // into a contract that is bound to a wallet.
+ //
+ // FIXME-Dold: is this still just a plain string and not a public key?
+ nonce: string;
+ }
+
+.. ts:def:: ProtoContractTerms
+
+ type ProtoContractTerms = (ContractTermsV1 | ContractTermsV0) & ContractTermsCommon;
+
.. ts:def:: ContractTermsV1
@@ -7420,10 +7447,6 @@ The contract terms must have the following structure:
// May be overwritten by individual products.
delivery_date?: Timestamp;
- // Nonce generated by the wallet and echoed by the merchant
- // in this field when the proposal is generated.
- nonce: string;
-
// Specifies for how long the wallet should try to get an
// automatic refund for the purchase. If this field is
// present, the wallet should wait for a few seconds after