diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-05-21 22:40:20 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-05-21 22:40:20 +0200 |
commit | 510d563bdf14457bc5dd3cc6e1288b6131b886ea (patch) | |
tree | 25b0d75010695a2fc9ed094460b4cf52da317407 | |
parent | a02ca72db3c5c6d7b6afa6055f761a315b13fd44 (diff) | |
download | docs-510d563bdf14457bc5dd3cc6e1288b6131b886ea.tar.gz docs-510d563bdf14457bc5dd3cc6e1288b6131b886ea.tar.bz2 docs-510d563bdf14457bc5dd3cc6e1288b6131b886ea.zip |
specify GET /tips/ID endpoint
-rw-r--r-- | core/api-merchant.rst | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 9aeb50a5..4d728baa 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -1817,15 +1817,13 @@ Giving Customer Tips // Unique tip identifier for the tip that was created. tip_id: HashCode; - // Token that will be handed to the wallet, - // contains all relevant information to accept - // a tip. - tip_token: string; - // URL that will directly trigger processing // the tip when the browser is redirected to it tip_redirect_url: string; + // when does the tip expire + tip_expiration: Timestamp; + } @@ -1932,6 +1930,34 @@ Giving Customer Tips } + +.. http:get:: /tips/$TIP_ID/pickup + + Handle request from wallet to provide details about a tip. + + **Response:** + + :status 200 OK: + A tip is being returned. The backend responds with a `TipInformation` + :status 404 Not Found: + The tip identifier is unknown. + + .. ts:def:: TipInformation + + interface TipInformation { + + // Exchange from which the tip will be withdrawn. Needed by the + // wallet to determine denominations, fees, etc. + exchange_url: string; + + // Amount of the tip (including fees). + tip_amount: Amount; + + // Timestamp indicating when the tip is set to expire (may be in the past). + // Note that tips that have expired MAY also result in a 404 response. + expiration: Timestamp; + } + .. http:post:: /tips/$TIP_ID/pickup Handle request from wallet to pick up a tip. @@ -1955,9 +1981,6 @@ Giving Customer Tips interface TipPickupRequest { - // Identifier of the tip. - tip_id: HashCode; - // List of planches the wallet wants to use for the tip planchets: PlanchetDetail[]; } |