summaryrefslogtreecommitdiff
path: root/taler-merchant-manual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'taler-merchant-manual.rst')
-rw-r--r--taler-merchant-manual.rst49
1 files changed, 46 insertions, 3 deletions
diff --git a/taler-merchant-manual.rst b/taler-merchant-manual.rst
index cd008571..182f612b 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