Contents

POST [/instances/$INSTANCE]/orders/$ORDER_ID/claim#

Wallet claims ownership (via nonce) over an order. By claiming an order, the wallet obtains the full contract terms, and thereby implicitly also the hash of the contract terms it needs for the other public APIs to authenticate itself as the wallet that is indeed eligible to inspect this particular order’s status.

Request:

The request must be a ClaimRequest.

Response:

200 OK:

The client has successfully claimed the order. The response contains the contract terms.

404 Not found:

The backend is unaware of the instance or order. Returned with TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_NOT_FOUND.

409 Conflict:

Someone else has already claimed the same order ID with a different nonce. Returned with TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_ALREADY_CLAIMED.

413 Request entity too large:

The uploaded body is to long, it exceeds the size limit. Returned with an error code of TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT.

500 Internal Server Error:

The server experienced an internal failure. Returned with TALER_EC_GENERIC_DB_COMMIT_FAILED, TALER_EC_GENERIC_DB_SOFT_FAILURE or TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH.

Details:

interface ClaimRequest {
  // Nonce to identify the wallet that claimed the order.
  nonce: EddsaPublicKey;

  // Token that authorizes the wallet to claim the order.
  // *Optional* as the merchant may not have required it
  // (create_token set to false in PostOrderRequest).
  token?: ClaimToken;
}
interface ClaimResponse {
  // Contract terms of the claimed order
  contract_terms: ContractTerms;

  // Signature by the merchant over the contract terms.
  sig: EddsaSignature;
}