summaryrefslogtreecommitdiff
path: root/taler-merchant-api-tutorial.rst
diff options
context:
space:
mode:
Diffstat (limited to 'taler-merchant-api-tutorial.rst')
-rw-r--r--taler-merchant-api-tutorial.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst
index 0be0f4e3..d45ed4fa 100644
--- a/taler-merchant-api-tutorial.rst
+++ b/taler-merchant-api-tutorial.rst
@@ -131,7 +131,7 @@ key in the ``Authorization`` header. The value of this header must be
>>> import requests
>>> requests.get("https://backend.demo.taler.net",
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
<Response [200]>
If an HTTP status code other than 200 is returned, something went wrong.
@@ -224,9 +224,9 @@ A minimal Python snippet for creating an order would look like this:
... summary="Donation",
... fulfillment_url="https://example.com/thanks.html"),
... create_token=false)
- >>> response = requests.post("https://backend.demo.taler.net/private/order",
+ >>> response = requests.post("https://backend.demo.taler.net/private/orders",
... json=body,
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
<Response [200]>
@@ -282,7 +282,7 @@ backend to do it is the safest method.
>>> import requests
>>> r = requests.get("https://backend.demo.taler.net/private/orders/" + order_id,
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
>>> print(r.json())
If the ``order_status`` field in the response is ``paid``, you will not
@@ -350,7 +350,7 @@ This code snipped illustrates giving a refund:
... reason="Customer did not like the product")
>>> requests.post("https://backend.demo.taler.net/private/orders/"
... + order_id + "/refund", json=refund_req,
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
<Response [200]>
.. Note::
@@ -439,7 +439,7 @@ funds available for tipping, query the ``/tip-query`` endpoint:
>>> import requests
>>> requests.get("https://backend.demo.taler.net/tip-query?instance=default",
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
<Response [200]>
.. _authorize-tip:
@@ -474,7 +474,7 @@ This code snipped illustrates giving a tip:
... justification="User filled out survey",
... next_url="https://merchant.com/thanks.html")
>>> requests.post("https://backend.demo.taler.net/tip-authorize", json=tip_req,
- ... headers={"Authorization": "ApiKey sandbox"})
+ ... headers={"Authorization": "secret-token:secret"})
<Response [200]>
.. _Advanced-topics: