summaryrefslogtreecommitdiff
path: root/taler-merchant-api-tutorial.rst
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-16 17:07:51 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-16 17:07:51 +0200
commit50c89041aa9b5f7300ddaa7b2b1412617101eeac (patch)
tree3bfc5c9b1dad9d1d6d397a3bce89c75413c2b0a3 /taler-merchant-api-tutorial.rst
parenta1eb5922a9985c910d1a7e4c136c82a8ea394d83 (diff)
downloaddocs-50c89041aa9b5f7300ddaa7b2b1412617101eeac.tar.gz
docs-50c89041aa9b5f7300ddaa7b2b1412617101eeac.tar.bz2
docs-50c89041aa9b5f7300ddaa7b2b1412617101eeac.zip
tip -> reward
Diffstat (limited to 'taler-merchant-api-tutorial.rst')
-rw-r--r--taler-merchant-api-tutorial.rst46
1 files changed, 22 insertions, 24 deletions
diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst
index 25fc890d..4c3ee1b9 100644
--- a/taler-merchant-api-tutorial.rst
+++ b/taler-merchant-api-tutorial.rst
@@ -409,26 +409,26 @@ considered to identify a resource you can pay for and thus do not have to be
unique.
-.. _Giving-Customers-Tips:
-.. index:: tips
+.. _Giving-Customers-Rewards:
+.. index:: rewards
-Giving Customers Tips
-=====================
+Giving Customers Rewards
+========================
GNU Taler allows Web sites to grant digital cash directly to a visitor. The
idea is that some sites may want incentivize actions such as filling out a
-survey or trying a new feature. It is important to note that receiving tips is
+survey or trying a new feature. It is important to note that receiving rewards is
not enforceable for the visitor, as there is no contract. It is simply a
voluntary gesture of appreciation of the site to its visitor. However, once a
-tip has been granted, the visitor obtains full control over the funds provided
+reward has been granted, the visitor obtains full control over the funds provided
by the site.
-The merchant backend of the site must be properly configured for tipping, and
-sufficient funds must be made available for tipping. See the :ref:`Taler
-Merchant Operating Manual <Tipping-visitors>` for details.
+The merchant backend of the site must be properly configured for rewards, and
+sufficient funds must be made available for rewards. See the :ref:`Taler User
+Guide <Rewarding-visitors>` for details.
-To check if tipping is configured properly and if there are sufficient
-funds available for tipping, query the ``/private/reserves`` endpoint:
+To check if rewards are configured properly and if there are sufficient
+funds available for granting rewards, query the ``/private/reserves`` endpoint:
.. code-block:: python
@@ -440,34 +440,34 @@ funds available for tipping, query the ``/private/reserves`` endpoint:
Check that a reserve exists where the ``merchant_initial_amount`` is below the
``committed_amount`` and that the reserve is ``active``.
-.. _authorize-tip:
+.. _authorize-reward:
-To authorize a tip, ``POST`` to ``/private/tips``. The following fields
+To authorize a reward, ``POST`` to ``/private/rewards``. The following fields
are recognized in the JSON request object:
-- ``amount``: Amount that should be given to the visitor as a tip.
+- ``amount``: Amount that should be given to the visitor as a reward.
-- ``justification``: Description of why the tip was granted. Human-readable
+- ``justification``: Description of why the reward was granted. Human-readable
text not exposed to the customer, but used by the Back Office.
- ``next_url``: The URL that the user’s browser should be redirected to by
- the wallet, once the tip has been processed.
+ the wallet, once the reward has been processed.
-The response from the backend contains a ``taler_tip_url``. The
+The response from the backend contains a ``taler_reward_url``. The
customer’s browser must be redirected to this URL for the wallet to pick
-up the tip.
+up the reward.
-.. _pick-up-tip:
+.. _pick-up-reward:
-This code snipped illustrates giving a tip:
+This code snipped illustrates giving a reward:
.. code-block:: python
>>> import requests
- >>> tip_req = dict(amount="KUDOS:0.5",
+ >>> reward_req = dict(amount="KUDOS:0.5",
... justification="User filled out survey",
... next_url="https://merchant.com/thanks.html")
- >>> requests.post("https://backend.demo.taler.net/private/tips", json=tip_req,
+ >>> requests.post("https://backend.demo.taler.net/private/rewards", json=reward_req,
... headers={"Authorization": "Bearer secret-token:secret"})
<Response [200]>
@@ -477,8 +477,6 @@ This code snipped illustrates giving a tip:
Advanced topics
===============
-.. TODO:: This section needs to be updated for 0.8.
-
.. _Session_002dBound-Payments:
Session-Bound Payments