gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: document webhooks, at least a little


From: gnunet
Subject: [taler-docs] branch master updated: document webhooks, at least a little bit
Date: Thu, 04 May 2023 22:01:31 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new ff52072  document webhooks, at least a little bit
ff52072 is described below

commit ff52072f8ff1d57e1eb32ad62b7919c4c4064369
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu May 4 22:01:24 2023 +0200

    document webhooks, at least a little bit
---
 core/api-challenger.rst               |  2 +-
 core/api-merchant.rst                 |  2 +-
 manpages/taler-exchange-offline.1.rst |  2 +-
 taler-merchant-manual.rst             | 49 ++++++++++++++++++++++++++++++++---
 4 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/core/api-challenger.rst b/core/api-challenger.rst
index 146cdda..80e0dd2 100644
--- a/core/api-challenger.rst
+++ b/core/api-challenger.rst
@@ -246,7 +246,7 @@ Auth
       token_type: "Bearer";
 
       // Amount of time that an access token is valid (in seconds).
-      expires_in: Number;
+      expires_in: Integer;
 
     }
 
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index 240bfa7..5977ea0 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -1286,7 +1286,7 @@ Inspecting instances
        type: "none";
     };
 
-  .. ts:def:: BasicFacadeCredentials
+  .. ts:def:: BasicAuthFacadeCredentials
 
     interface BasicAuthFacadeCredentials {
        type: "basic";
diff --git a/manpages/taler-exchange-offline.1.rst 
b/manpages/taler-exchange-offline.1.rst
index fcae154..f14e29e 100644
--- a/manpages/taler-exchange-offline.1.rst
+++ b/manpages/taler-exchange-offline.1.rst
@@ -301,7 +301,7 @@ The following types of credit- and debit-restrictions are 
supported:
     expression given in $EXPR where the syntax follows posix-egrep, but
     without support for character classes, GNU extensions, back-references or
     intervals. See
-    
`https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002degrep-regular-expression-syntax.html`
+    `Findutils Manual 
<https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002degrep-regular-expression-syntax.html>`_
     for a description of the posix-egrep syntax. The $HINT must be a
     human-readable description of the $EXPR.  $JSON should be a JSON array
     mapping IETF BCP 47 language tags to localized versions of $HINT.
diff --git a/taler-merchant-manual.rst b/taler-merchant-manual.rst
index cd00857..182f612 100644
--- a/taler-merchant-manual.rst
+++ b/taler-merchant-manual.rst
@@ -1107,8 +1107,8 @@ Apache
 Customization
 =============
 
-Templates
----------
+HTML Templates
+--------------
 
 The installation process will install various HTML templates to be served
 to trigger the wallet interaction. You may change those templates to your
@@ -1229,7 +1229,9 @@ to the backend, see 
:doc:`manpages/taler-merchant-setup-reserve.1`.
 The command will output a ``payto://`` URI which specifies where to
 wire the funds and which wire transfer subject to use.
 
-FIXME: add full example output.
+  .. note::
+
+     FIXME: add full example output.
 
 In our example, the output for the wire transfer subject is:
 
@@ -1300,6 +1302,47 @@ generated by the backend can then be forwarded directly 
to the wallet.
 Advanced topics
 ===============
 
+.. _Webhooks:
+
+Webhooks
+--------
+
+Webhooks allow you to trigger HTTP(S) requests based on certain
+events. Webhooks are configured per instance.  In the Webhook configuration,
+you can specify which URL, which HTTP headers, which HTTP method and what HTTP
+body to send to the Webhook.  Webhooks are automatically retried (with
+increasing delays) when the target server returns a temporary error.
+
+Mustach templates are used when defining the contents of Webhooks.  Depending
+on the triggering event, the templates will be expanded with event-specific
+data.
+
+Pay events
+^^^^^^^^^^
+
+For "pay" events, the backend will provide the following
+information to the Mustach templating engine:
+
+  * contract_terms: the contract terms of the paid order
+  * order_id: the ID of the order that received the refund
+
+
+Refund events
+^^^^^^^^^^^^^
+
+For "refund" events, the backend will provide the following information to the
+Mustach templating engine:
+
+  * timestamp: time of the refund (in nanoseconds since 1970)
+  * order_id: the ID of the order that received the refund
+  * contract_terms: the full JSON of the contract terms of the refunded order
+  * refund_amout: the amount that was being refunded
+  * reason: the reason entered by the merchant staff for granting the refund;
+    be careful, you probably want to inform your staff if a webhook may expose
+    this information to the consumer
+
+
+
 .. _MerchantDatabaseScheme:
 
 Database Scheme

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]