gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated (99e7729e -> 39e6ebbc)


From: gnunet
Subject: [taler-merchant] branch master updated (99e7729e -> 39e6ebbc)
Date: Wed, 17 Nov 2021 12:44:23 +0100

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

grothoff pushed a change to branch master
in repository merchant.

    from 99e7729e start with /kyc support in libtalermerchant
     new ca71aefb -work on fixing FTBFS
     new 9939a99f fix lib/ FTBFS
     new ca87a986 -work on FTBFS of src/testing
     new 7d23dbe6 -work on FTBFS
     new e1d16d11 fix FTBFS
     new c9c8caea fix fTBFS
     new 2a8855b5 -fix FTBFS
     new e5096a1e get backenddb test to pass
     new a5f6348f fix post order trait usage
     new 4f51dec8 fix bizarre logic error
     new 8e2a3f64 add ACCEPTED case
     new a8825a62 fix trait used
     new 3a6cdc4d bugfix pickup DLL mangement logic
     new dc5a6893 -fix test
     new 874a89a6 fix trait usage
     new ab6fd118 introduce TALER_wallet_deposit_verify
     new 3c9a5ab6 fix signature in test
     new 9a93028f update to match latest exchange structures
     new e2cc5c26 finish merchant client api /kyc implementation
     new bc79ce6f add new KYC command
     new 33d4369d -more work on KYC test
     new cd1270a5 -misc fixes wrt long polling
     new c160488c add skeleton for KYC test
     new 39e6ebbc complete KYC test

The 24 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/taler-merchant-httpd.c                 |   9 +-
 src/backend/taler-merchant-httpd.h                 |  10 +-
 src/backend/taler-merchant-httpd_auditors.c        |   2 +-
 src/backend/taler-merchant-httpd_get-orders-ID.c   |  28 +-
 src/backend/taler-merchant-httpd_get-orders-ID.h   |   2 +-
 src/backend/taler-merchant-httpd_helper.c          |  33 +-
 .../taler-merchant-httpd_post-orders-ID-abort.c    |   6 +-
 .../taler-merchant-httpd_post-orders-ID-claim.c    |  25 +-
 .../taler-merchant-httpd_post-orders-ID-paid.c     |   2 +-
 .../taler-merchant-httpd_post-orders-ID-pay.c      |  32 +-
 .../taler-merchant-httpd_post-orders-ID-refund.c   |   5 +-
 .../taler-merchant-httpd_post-tips-ID-pickup.c     |  56 ++--
 ...r-merchant-httpd_private-get-instances-ID-kyc.c |  13 +-
 ...taler-merchant-httpd_private-get-instances-ID.c |   8 +-
 .../taler-merchant-httpd_private-get-orders-ID.c   |  26 +-
 .../taler-merchant-httpd_private-get-orders.c      |  47 ++-
 ...ler-merchant-httpd_private-patch-instances-ID.c |   5 +-
 .../taler-merchant-httpd_private-post-instances.c  |  23 +-
 ...-merchant-httpd_private-post-orders-ID-refund.c |   7 +-
 .../taler-merchant-httpd_private-post-orders.c     |   7 +-
 .../taler-merchant-httpd_private-post-transfers.c  |   2 +-
 src/backenddb/drop0001.sql                         |  24 +-
 src/backenddb/merchant-0001.sql                    |   2 +-
 src/backenddb/plugin_merchantdb_postgres.c         |  92 ++---
 src/backenddb/test_merchantdb.c                    | 125 +++----
 src/include/taler_merchant_service.h               |  43 +--
 src/include/taler_merchant_testing_lib.h           | 303 ++++-------------
 src/include/taler_merchantdb_plugin.h              |  43 +--
 src/lib/merchant_api_get_kyc.c                     |  82 ++++-
 src/lib/merchant_api_get_orders.c                  |   4 +-
 src/lib/merchant_api_post_order_abort.c            |   4 +-
 src/lib/merchant_api_post_order_claim.c            |   2 +-
 src/lib/merchant_api_post_order_paid.c             |   2 +-
 src/lib/merchant_api_post_order_pay.c              |  63 ++--
 src/lib/merchant_api_post_order_refund.c           |   2 +-
 src/lib/merchant_api_tip_pickup.c                  |  17 +-
 src/lib/merchant_api_tip_pickup2.c                 |   9 +-
 src/lib/merchant_api_wallet_get_order.c            |  23 +-
 src/lib/merchant_api_wallet_post_order_refund.c    |   2 +-
 src/testing/.gitignore                             |   1 +
 src/testing/Makefile.am                            |  37 ++-
 src/testing/test_kyc_api.c                         | 369 +++++++++++++++++++++
 .../{test_merchant_api.conf => test_kyc_api.conf}  |  17 +
 src/testing/test_merchant_api.c                    |  43 ++-
 src/testing/testing_api_cmd_abort_order.c          |  50 +--
 src/testing/testing_api_cmd_claim_order.c          |  27 +-
 src/testing/testing_api_cmd_delete_reserve.c       |   1 -
 src/testing/testing_api_cmd_forget_order.c         |  16 +-
 src/testing/testing_api_cmd_get_instance.c         |  53 ++-
 src/testing/testing_api_cmd_get_instances.c        |  20 +-
 src/testing/testing_api_cmd_get_orders.c           |  19 +-
 src/testing/testing_api_cmd_get_product.c          |  58 ++--
 src/testing/testing_api_cmd_get_products.c         |  10 +-
 src/testing/testing_api_cmd_get_reserve.c          |  29 +-
 src/testing/testing_api_cmd_get_reserves.c         |   6 +-
 src/testing/testing_api_cmd_get_tips.c             |   6 +-
 src/testing/testing_api_cmd_get_transfers.c        |  36 +-
 src/testing/testing_api_cmd_instance_auth.c        |   5 +-
 src/testing/testing_api_cmd_kyc_get.c              | 304 +++++++++++++++++
 src/testing/testing_api_cmd_lock_product.c         |   6 +-
 src/testing/testing_api_cmd_merchant_get_order.c   |  76 ++---
 src/testing/testing_api_cmd_merchant_get_tip.c     |  53 +--
 src/testing/testing_api_cmd_patch_instance.c       |  25 +-
 src/testing/testing_api_cmd_patch_product.c        |  24 +-
 src/testing/testing_api_cmd_pay_order.c            | 112 +++----
 src/testing/testing_api_cmd_post_instances.c       |  27 +-
 src/testing/testing_api_cmd_post_orders.c          | 129 +++----
 src/testing/testing_api_cmd_post_orders_paid.c     |  13 +-
 src/testing/testing_api_cmd_post_products.c        |  22 +-
 src/testing/testing_api_cmd_post_reserves.c        |   6 +-
 src/testing/testing_api_cmd_post_transfers.c       |  17 +-
 src/testing/testing_api_cmd_refund_order.c         |  21 +-
 src/testing/testing_api_cmd_tip_authorize.c        |  31 +-
 src/testing/testing_api_cmd_tip_pickup.c           |  71 ++--
 src/testing/testing_api_cmd_wallet_get_order.c     |  26 +-
 src/testing/testing_api_cmd_wallet_get_tip.c       |   1 -
 .../testing_api_cmd_wallet_post_orders_refund.c    |  19 +-
 src/testing/testing_api_trait_claim_nonce.c        |  59 ----
 src/testing/testing_api_trait_hash.c               |  89 -----
 src/testing/testing_api_trait_merchant_sig.c       |  58 ----
 src/testing/testing_api_trait_planchet.c           |  58 ----
 src/testing/testing_api_trait_refund_entry.c       |  63 ----
 src/testing/testing_api_trait_string.c             |  87 -----
 src/testing/testing_api_traits.c                   |  34 ++
 84 files changed, 1811 insertions(+), 1613 deletions(-)
 create mode 100644 src/testing/test_kyc_api.c
 copy src/testing/{test_merchant_api.conf => test_kyc_api.conf} (91%)
 create mode 100644 src/testing/testing_api_cmd_kyc_get.c
 delete mode 100644 src/testing/testing_api_trait_claim_nonce.c
 delete mode 100644 src/testing/testing_api_trait_hash.c
 delete mode 100644 src/testing/testing_api_trait_merchant_sig.c
 delete mode 100644 src/testing/testing_api_trait_planchet.c
 delete mode 100644 src/testing/testing_api_trait_refund_entry.c
 delete mode 100644 src/testing/testing_api_trait_string.c
 create mode 100644 src/testing/testing_api_traits.c

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 6f3dc784..749fc253 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -218,7 +218,7 @@ instance_decref (struct TMH_MerchantInstance *mi)
     GNUNET_CONTAINER_DLL_remove (mi->wm_head,
                                  mi->wm_tail,
                                  wm);
-    json_decref (wm->j_wire);
+    GNUNET_free (wm->payto_uri);
     GNUNET_free (wm->wire_method);
     GNUNET_free (wm);
   }
@@ -1545,11 +1545,8 @@ add_instance_cb (void *cls,
 
     wm = GNUNET_new (struct TMH_WireMethod);
     wm->h_wire = acc->h_wire;
-    wm->j_wire = GNUNET_JSON_PACK (
-      GNUNET_JSON_pack_string ("payto_uri",
-                               acc->payto_uri),
-      GNUNET_JSON_pack_data_auto ("salt",
-                                  &acc->salt));
+    wm->payto_uri = GNUNET_strdup (acc->payto_uri);
+    wm->wire_salt = acc->salt;
     wm->wire_method = TALER_payto_get_method (acc->payto_uri);
     wm->active = acc->active;
     GNUNET_CONTAINER_DLL_insert (mi->wm_head,
diff --git a/src/backend/taler-merchant-httpd.h 
b/src/backend/taler-merchant-httpd.h
index 3fe35130..7fbc8bb5 100644
--- a/src/backend/taler-merchant-httpd.h
+++ b/src/backend/taler-merchant-httpd.h
@@ -58,12 +58,17 @@ struct TMH_WireMethod
   /**
    * Wire details for this instance
    */
-  struct json_t *j_wire;
+  char *payto_uri;
+
+  /**
+   * Salt to use when computing @e h_wire from @e payto_uri.
+   */
+  struct TALER_WireSalt wire_salt;
 
   /**
    * Hash of our wire format details as given in #j_wire.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Is this wire method active (should it be included in new contracts)?
@@ -279,6 +284,7 @@ enum TMH_OrderStateFlags
 
   /**
    * Merchant received the payment from the exchange.
+   * FIXME: not triggered yet!
    */
   TMH_OSF_WIRED = 8
 };
diff --git a/src/backend/taler-merchant-httpd_auditors.c 
b/src/backend/taler-merchant-httpd_auditors.c
index 1a0f6273..e693935e 100644
--- a/src/backend/taler-merchant-httpd_auditors.c
+++ b/src/backend/taler-merchant-httpd_auditors.c
@@ -120,7 +120,7 @@ TMH_AUDITORS_check_dk (struct TALER_EXCHANGE_Handle *mh,
   }
   GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
               "Denomination key %s offered by client not audited by any 
accepted auditor\n",
-              GNUNET_h2s (&dk->h_key));
+              GNUNET_h2s (&dk->h_key.hash));
   *hc = MHD_HTTP_BAD_REQUEST;
   *ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_AUDITOR_FAILURE;
   return GNUNET_NO;
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c 
b/src/backend/taler-merchant-httpd_get-orders-ID.c
index dbb5ef10..ddc1c1c7 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -47,7 +47,7 @@ struct GetOrderData
   /**
    * Hashed version of contract terms. All zeros if not provided.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Claim token used for access control. All zeros if not provided.
@@ -209,7 +209,7 @@ resume_by_event (void *cls,
 
   GNUNET_async_scope_enter (&god->hc->async_scope_id,
                             &old);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Received event for %s with argument `%.*s`\n",
               god->order_id,
               (int) extra_size,
@@ -261,7 +261,7 @@ resume_by_event (void *cls,
       return; /* refund too small */
     }
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Resuming (%d/%d) by event with argument `%.*s`\n",
               (int) GNUNET_TIME_absolute_is_future (god->sc.long_poll_timeout),
               god->sc.awaiting_refund,
@@ -285,7 +285,7 @@ resume_by_event (void *cls,
 static void
 suspend_god (struct GetOrderData *god)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Suspending GET /orders/%s\n",
               god->order_id);
   if (NULL != god->contract_terms)
@@ -363,7 +363,7 @@ TMH_make_order_status_url (struct MHD_Connection *con,
                            const char *session_id,
                            const char *instance_id,
                            struct TALER_ClaimTokenP *claim_token,
-                           struct GNUNET_HashCode *h_contract)
+                           struct TALER_PrivateContractHash *h_contract)
 {
   const char *host;
   const char *forwarded_host;
@@ -832,7 +832,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
       if ( (NULL != cts) &&
            (GNUNET_OK !=
             GNUNET_CRYPTO_hash_from_string (cts,
-                                            &god->h_contract_terms)) )
+                                            &god->h_contract_terms.hash)) )
       {
         /* cts has wrong encoding */
         GNUNET_break_op (0);
@@ -956,9 +956,6 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
             if (god->sc.awaiting_refund ||
                 god->sc.awaiting_refund_obtained)
             {
-#ifndef TALER_API_VERSION
-#define TALER_DBEVENT_MERCHANT_REFUND_OBTAINED 1104
-#endif
               struct TMH_OrderPayEventP refund_eh = {
                 .header.size = htons (sizeof (refund_eh)),
                 .header.type = htons (god->sc.awaiting_refund_obtained
@@ -970,8 +967,9 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
               GNUNET_CRYPTO_hash (god->order_id,
                                   strlen (god->order_id),
                                   &refund_eh.h_order_id);
-              GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                          "Subscribing to refunds on %s\n",
+              GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                          "Subscribing %p to refunds on %s\n",
+                          god,
                           god->order_id);
               god->refund_eh = TMH_db->event_listen (TMH_db->cls,
                                                      &refund_eh.header,
@@ -986,7 +984,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
                 .merchant_pub = hc->instance->merchant_pub
               };
 
-              GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                           "Subscribing to payments on %s\n",
                           god->order_id);
               GNUNET_CRYPTO_hash (god->order_id,
@@ -1049,7 +1047,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
   /* Check if client provided the right hash code of the contract terms */
   if (NULL != god->contract_terms)
   {
-    struct GNUNET_HashCode h;
+    struct TALER_PrivateContractHash h;
 
     contract_available = true;
     if (GNUNET_OK !=
@@ -1085,7 +1083,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
   else
   {
     struct TALER_ClaimTokenP db_claim_token;
-    struct GNUNET_HashCode unused;
+    struct GNUNET_HashCode unused; /* h_post_data */
 
     qs = TMH_db->lookup_order (TMH_db->cls,
                                hc->instance->settings.id,
@@ -1305,7 +1303,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
 
   {
     /* Check if paid. */
-    struct GNUNET_HashCode h_contract;
+    struct TALER_PrivateContractHash h_contract;
     bool paid;
 
     qs = TMH_db->lookup_order_status (TMH_db->cls,
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.h 
b/src/backend/taler-merchant-httpd_get-orders-ID.h
index 67dd2a1a..a09d40a3 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.h
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.h
@@ -67,7 +67,7 @@ TMH_make_order_status_url (struct MHD_Connection *con,
                            const char *session_id,
                            const char *instance_id,
                            struct TALER_ClaimTokenP *claim_token,
-                           struct GNUNET_HashCode *h_contract);
+                           struct TALER_PrivateContractHash *h_contract);
 
 
 /**
diff --git a/src/backend/taler-merchant-httpd_helper.c 
b/src/backend/taler-merchant-httpd_helper.c
index f4129e0e..8c15a542 100644
--- a/src/backend/taler-merchant-httpd_helper.c
+++ b/src/backend/taler-merchant-httpd_helper.c
@@ -315,26 +315,29 @@ TMH_taxes_array_valid (const json_t *taxes)
 struct TMH_WireMethod *
 TMH_setup_wire_account (const char *payto_uri)
 {
-  struct TALER_WireSalt salt;
   struct TMH_WireMethod *wm;
+  char *emsg;
+
+  if (NULL != (emsg = TALER_payto_validate (payto_uri)))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Invalid URI `%s': %s\n",
+                payto_uri,
+                emsg);
+    GNUNET_free (emsg);
+    return NULL;
+  }
 
-  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
-                              &salt,
-                              sizeof (salt));
   wm = GNUNET_new (struct TMH_WireMethod);
-  wm->j_wire = GNUNET_JSON_PACK (
-    GNUNET_JSON_pack_string ("payto_uri",
-                             payto_uri),
-    GNUNET_JSON_pack_data_auto ("salt",
-                                &salt));
-  GNUNET_assert (NULL != wm->j_wire);
-  /* This also tests for things like the IBAN being malformed */
-  GNUNET_assert (GNUNET_OK ==
-                 TALER_JSON_merchant_wire_signature_hash (wm->j_wire,
-                                                          &wm->h_wire));
+  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
+                              &wm->wire_salt,
+                              sizeof (wm->wire_salt));
+  wm->payto_uri = GNUNET_strdup (payto_uri);
+  TALER_merchant_wire_signature_hash (payto_uri,
+                                      &wm->wire_salt,
+                                      &wm->h_wire);
   wm->wire_method
     = TALER_payto_get_method (payto_uri);
-  GNUNET_assert (NULL != wm->wire_method);     /* checked earlier */
   wm->active = true;
   return wm;
 }
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-abort.c 
b/src/backend/taler-merchant-httpd_post-orders-ID-abort.c
index ce17063e..e3afaffb 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-abort.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-abort.c
@@ -126,7 +126,7 @@ struct AbortContext
   /**
    * Hashed contract terms (according to client).
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Context for our operation.
@@ -746,7 +746,7 @@ begin_transaction (struct AbortContext *ac)
   /* check payment was indeed incomplete
      (now that we are in the transaction scope!) */
   {
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
     bool paid;
 
     qs = TMH_db->lookup_order_status (TMH_db->cls,
@@ -940,7 +940,7 @@ parse_abort (struct MHD_Connection *connection,
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Handling /abort for order `%s' with contract hash `%s'\n",
               ac->hc->infix,
-              GNUNET_h2s (&ac->h_contract_terms));
+              GNUNET_h2s (&ac->h_contract_terms.hash));
   return GNUNET_OK;
 }
 
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-claim.c 
b/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
index e9551e3a..17475c9a 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
@@ -27,6 +27,7 @@
 #include <jansson.h>
 #include <taler/taler_signatures.h>
 #include <taler/taler_json_lib.h>
+#include "taler-merchant-httpd_private-get-orders.h"
 #include "taler-merchant-httpd_post-orders-ID-claim.h"
 
 
@@ -60,6 +61,8 @@ claim_order (const char *instance_id,
 {
   struct TALER_ClaimTokenP order_ct;
   enum GNUNET_DB_QueryStatus qs;
+  uint64_t order_serial;
+  struct GNUNET_TIME_Absolute timestamp;
 
   if (GNUNET_OK !=
       TMH_db->start (TMH_db->cls,
@@ -68,16 +71,12 @@ claim_order (const char *instance_id,
     GNUNET_break (0);
     return GNUNET_DB_STATUS_HARD_ERROR;
   }
-  {
-    uint64_t order_serial;
-
-    qs = TMH_db->lookup_contract_terms (TMH_db->cls,
-                                        instance_id,
-                                        order_id,
-                                        contract_terms,
-                                        &order_serial,
-                                        NULL);
-  }
+  qs = TMH_db->lookup_contract_terms (TMH_db->cls,
+                                      instance_id,
+                                      order_id,
+                                      contract_terms,
+                                      &order_serial,
+                                      NULL);
   if (0 > qs)
   {
     TMH_db->rollback (TMH_db->cls);
@@ -91,6 +90,8 @@ claim_order (const char *instance_id,
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_string ("nonce",
                                &stored_nonce),
+      TALER_JSON_spec_absolute_time ("timestamp",
+                                     &timestamp),
       GNUNET_JSON_spec_end ()
     };
 
@@ -162,6 +163,10 @@ claim_order (const char *instance_id,
       *contract_terms = NULL;
       return qs;
     }
+    TMH_notify_order_change (TMH_lookup_instance (instance_id),
+                             TMH_OSF_CLAIMED,
+                             timestamp,
+                             order_serial);
     qs = TMH_db->commit (TMH_db->cls);
     if (0 > qs)
       return qs;
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-paid.c 
b/src/backend/taler-merchant-httpd_post-orders-ID-paid.c
index 52f233eb..7b1a7863 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-paid.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-paid.c
@@ -151,7 +151,7 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler 
*rh,
   }
 
   {
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
 
     if (GNUNET_OK !=
         TALER_JSON_contract_hash (contract_terms,
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c 
b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index fa372fe0..fcdb9821 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -76,7 +76,7 @@ struct DepositConfirmation
   /**
    * Hash of the denomination of this coin.
    */
-  struct GNUNET_HashCode h_denom;
+  struct TALER_DenominationHash h_denom;
 
   /**
    * Amount this coin contributes to the total purchase price.
@@ -218,13 +218,13 @@ struct PayContext
   /**
    * Hashed proposal.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * "h_wire" from @e contract_terms.  Used to identify
    * the instance's wire transfer method.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Maximum fee the merchant is willing to pay, from @e root.
@@ -511,11 +511,7 @@ pay_context_cleanup (void *cls)
   {
     struct DepositConfirmation *dc = &pc->dc[i];
 
-    if (NULL != dc->ub_sig.rsa_signature)
-    {
-      GNUNET_CRYPTO_rsa_signature_free (dc->ub_sig.rsa_signature);
-      dc->ub_sig.rsa_signature = NULL;
-    }
+    TALER_denom_sig_free (&dc->ub_sig);
     GNUNET_free (dc->exchange_url);
   }
   GNUNET_free (pc->dc);
@@ -590,7 +586,7 @@ deposit_cb (void *cls,
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Storing successful payment %s (%s) at instance `%s'\n",
                   pc->hc->infix,
-                  GNUNET_h2s (&pc->h_contract_terms),
+                  GNUNET_h2s (&pc->h_contract_terms.hash),
                   pc->hc->instance->settings.id);
       TMH_db->preflight (TMH_db->cls);
       {
@@ -839,13 +835,14 @@ process_pay_with_exchange (void *cls,
     dc->refund_fee = denom_details->fee_refund;
     dc->wire_fee = *wire_fee;
     GNUNET_assert (NULL != pc->wm);
-    GNUNET_assert (NULL != pc->wm->j_wire);
     TMH_db->preflight (TMH_db->cls);
     dc->dh = TALER_EXCHANGE_deposit (exchange_handle,
                                      &dc->amount_with_fee,
                                      pc->wire_transfer_deadline,
-                                     pc->wm->j_wire,
+                                     pc->wm->payto_uri,
+                                     &pc->wm->wire_salt,
                                      &pc->h_contract_terms,
+                                     NULL, /* FIXME-Oec */
                                      &dc->coin_pub,
                                      &dc->ub_sig,
                                      &denom_details->key,
@@ -1471,7 +1468,7 @@ execute_pay_transaction (struct PayContext *pc)
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Order `%s' (%s) was fully paid\n",
               pc->order_id,
-              GNUNET_h2s (&pc->h_contract_terms));
+              GNUNET_h2s (&pc->h_contract_terms.hash));
   {
     enum GNUNET_DB_QueryStatus qs;
 
@@ -1496,6 +1493,11 @@ execute_pay_transaction (struct PayContext *pc)
     }
   }
 
+  TMH_notify_order_change (hc->instance,
+                           TMH_OSF_CLAIMED | TMH_OSF_PAID,
+                           pc->timestamp,
+                           pc->order_serial);
+
   {
     enum GNUNET_DB_QueryStatus qs;
 
@@ -1645,8 +1647,8 @@ parse_pay (struct MHD_Connection *connection,
                                        &dc->coin_sig),
           GNUNET_JSON_spec_fixed_auto ("coin_pub",
                                        &dc->coin_pub),
-          TALER_JSON_spec_denomination_signature ("ub_sig",
-                                                  &dc->ub_sig),
+          TALER_JSON_spec_denom_sig ("ub_sig",
+                                     &dc->ub_sig),
           GNUNET_JSON_spec_fixed_auto ("h_denom",
                                        &dc->h_denom),
           TALER_JSON_spec_amount ("contribution",
@@ -1758,7 +1760,7 @@ parse_pay (struct MHD_Connection *connection,
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Handling payment for order `%s' with contract hash `%s'\n",
                 pc->order_id,
-                GNUNET_h2s (&pc->h_contract_terms));
+                GNUNET_h2s (&pc->h_contract_terms.hash));
 
     /* basic sanity check on the contract */
     if (NULL == json_object_get (contract_terms,
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c 
b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
index ff64d9a2..8ba00129 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
@@ -134,7 +134,7 @@ struct PostRefundData
   /**
    * Hashed version of contract terms. All zeros if not provided.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * DLL of (suspended) requests.
@@ -620,7 +620,8 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler 
*rh,
                                            hc->infix);
       }
       {
-        struct GNUNET_HashCode h_contract_terms;
+        struct TALER_PrivateContractHash h_contract_terms;
+
         if (GNUNET_OK !=
             TALER_JSON_contract_hash (contract_terms,
                                       &h_contract_terms))
diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c 
b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
index 99d7957e..c7c28a13 100644
--- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
+++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
@@ -249,17 +249,20 @@ pick_context_cleanup (void *cls)
 }
 
 
-/**
- * We are shutting down, force resuming all suspended pickup operations.
- */
 void
 TMH_force_tip_pickup_resume ()
 {
+  struct PickupContext *nxt;
+
   for (struct PickupContext *pc = pc_head;
        NULL != pc;
-       pc = pc->next)
+       pc = nxt)
   {
+    nxt = pc->next;
     stop_operations (pc);
+    GNUNET_CONTAINER_DLL_remove (pc_head,
+                                 pc_tail,
+                                 pc);
     MHD_resume_connection (pc->connection);
   }
 }
@@ -278,7 +281,7 @@ TMH_force_tip_pickup_resume ()
 static void
 withdraw_cb (void *cls,
              const struct TALER_EXCHANGE_HttpResponse *hr,
-             const struct GNUNET_CRYPTO_RsaSignature *blind_sig)
+             const struct TALER_BlindedDenominationSignature *blind_sig)
 {
   struct PlanchetOperation *po = cls;
   struct PickupContext *pc = po->pc;
@@ -296,6 +299,9 @@ withdraw_cb (void *cls,
       TALER_MHD_MAKE_JSON_PACK (
         TALER_JSON_pack_ec (TALER_EC_MERCHANT_TIP_PICKUP_EXCHANGE_ERROR),
         TMH_pack_exchange_reply (hr));
+    GNUNET_CONTAINER_DLL_remove (pc_head,
+                                 pc_tail,
+                                 pc);
     MHD_resume_connection (pc->connection);
     TALER_MHD_daemon_trigger ();   /* we resumed, kick MHD */
     return;
@@ -312,6 +318,9 @@ withdraw_cb (void *cls,
     pc->response = TALER_MHD_make_error (
       TALER_EC_GENERIC_DB_STORE_FAILED,
       "blind signature");
+    GNUNET_CONTAINER_DLL_remove (pc_head,
+                                 pc_tail,
+                                 pc);
     MHD_resume_connection (pc->connection);
     TALER_MHD_daemon_trigger ();   /* we resumed, kick MHD */
     return;
@@ -319,6 +328,9 @@ withdraw_cb (void *cls,
   if (NULL == pc->po_head)
   {
     stop_operations (pc); /* stops timeout job */
+    GNUNET_CONTAINER_DLL_remove (pc_head,
+                                 pc_tail,
+                                 pc);
     MHD_resume_connection (pc->connection);
     TALER_MHD_daemon_trigger ();   /* we resumed, kick MHD */
   }
@@ -441,6 +453,9 @@ do_timeout (void *cls)
   pc->response =  TALER_MHD_make_error (
     TALER_EC_MERCHANT_GENERIC_EXCHANGE_TIMEOUT,
     NULL);
+  GNUNET_CONTAINER_DLL_remove (pc_head,
+                               pc_tail,
+                               pc);
   MHD_resume_connection (pc->connection);
   TALER_MHD_daemon_trigger ();   /* we resumed, kick MHD */
 }
@@ -594,15 +609,6 @@ reply_lookup_tip_failed (struct MHD_Connection *connection,
 }
 
 
-/**
- * Manages a POST /tips/$ID/pickup call, checking that the tip is authorized,
- * and if so, returning the blind signatures.
- *
- * @param rh context of the handler
- * @param connection the MHD connection to handle
- * @param[in,out] hc context with further information about the request
- * @return MHD result code
- */
 MHD_RESULT
 TMH_post_tips_ID_pickup (const struct TMH_RequestHandler *rh,
                          struct MHD_Connection *connection,
@@ -782,7 +788,8 @@ RETRY:
                                        NULL);
   }
   {
-    struct GNUNET_CRYPTO_RsaSignature *sigs[GNUNET_NZL (pc->planchets_length)];
+    struct TALER_BlindedDenominationSignature sigs[
+      GNUNET_NZL (pc->planchets_length)];
 
     memset (sigs,
             0,
@@ -795,6 +802,10 @@ RETRY:
                                 &pc->reserve_priv,
                                 pc->planchets_length,
                                 sigs);
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Lookup pickup `%s' resulted in %d\n",
+                GNUNET_h2s (&pc->pickup_id),
+                qs);
     if (qs > GNUNET_DB_STATUS_SUCCESS_ONE_RESULT)
       qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
     if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs)
@@ -803,7 +814,7 @@ RETRY:
 
       for (unsigned int i = 0; i< pc->planchets_length; i++)
       {
-        if (NULL != sigs[i])
+        if (TALER_DENOMINATION_INVALID != sigs[i].cipher)
           continue;
         if (! rollback)
         {
@@ -817,6 +828,10 @@ RETRY:
                                                  pc);
           rollback = true;
         }
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                    "Lookup pickup `%s' initiated withdraw #%u\n",
+                    GNUNET_h2s (&pc->pickup_id),
+                    i);
         try_withdraw (pc,
                       exchange_url,
                       &pc->planchets[i],
@@ -847,9 +862,9 @@ RETRY:
                            json_array_append_new (
                              blind_sigs,
                              GNUNET_JSON_PACK (
-                               GNUNET_JSON_pack_rsa_signature ("blind_sig",
-                                                               sigs[i]))));
-            GNUNET_CRYPTO_rsa_signature_free (sigs[i]);
+                               TALER_JSON_pack_blinded_denom_sig ("blind_sig",
+                                                                  &sigs[i]))));
+            TALER_blinded_denom_sig_free (&sigs[i]);
           }
           return TALER_MHD_REPLY_JSON_PACK (
             connection,
@@ -967,6 +982,9 @@ RETRY:
                                        NULL);
   }
   MHD_suspend_connection (connection);
+  GNUNET_CONTAINER_DLL_insert (pc_head,
+                               pc_tail,
+                               pc);
   pc->tt = GNUNET_SCHEDULER_add_delayed (EXCHANGE_TIMEOUT,
                                          &do_timeout,
                                          pc);
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c 
b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
index da4064d7..b018b282 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
@@ -71,7 +71,7 @@ struct ExchangeKycRequest
   /**
    * Hash of the wire account (with salt) we are checking.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Handle for the actual HTTP request to the exchange.
@@ -179,7 +179,7 @@ struct KycContext
    * Set to the h_wire of the merchant account if
    * @a have_h_wire is true, used to filter by account.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * How long are we willing to wait for the exchange(s)?
@@ -523,12 +523,11 @@ kyc_with_exchange (void *cls,
 {
   struct ExchangeKycRequest *ekr = cls;
   struct KycContext *kc = ekr->kc;
-  struct GNUNET_HashCode h_payto;
+  struct TALER_PaytoHash h_payto;
 
   ekr->fo = NULL;
-  GNUNET_CRYPTO_hash (ekr->payto_uri,
-                      strlen (ekr->payto_uri),
-                      &h_payto);
+  TALER_payto_hash (ekr->payto_uri,
+                    &h_payto);
   ekr->kyc = TALER_EXCHANGE_kyc_check (eh,
                                        ekr->exchange_kyc_serial,
                                        &h_payto,
@@ -552,7 +551,7 @@ kyc_with_exchange (void *cls,
  */
 static void
 kyc_status_cb (void *cls,
-               const struct GNUNET_HashCode *h_wire,
+               const struct TALER_MerchantWireHash *h_wire,
                uint64_t exchange_kyc_serial,
                const char *payto_uri,
                const char *exchange_url,
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID.c 
b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
index 95a3e5ea..85b3c7df 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
@@ -51,14 +51,12 @@ get_instances_ID (struct TMH_MerchantInstance *mi,
         GNUNET_JSON_PACK (
           GNUNET_JSON_pack_string (
             "payto_uri",
-            json_string_value (json_object_get (wm->j_wire,
-                                                "payto_uri"))),
+            wm->payto_uri),
           GNUNET_JSON_pack_data_auto ("h_wire",
                                       &wm->h_wire),
-          GNUNET_JSON_pack_string (
+          GNUNET_JSON_pack_data_auto (
             "salt",
-            json_string_value (json_object_get (wm->j_wire,
-                                                "salt"))),
+            &wm->wire_salt),
           GNUNET_JSON_pack_bool ("active",
                                  wm->active))));
   }
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c 
b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index c2fe759f..bb576ab9 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -83,7 +83,7 @@ struct TransferQuery
   /**
    * Hash of the merchant's bank account the transfer (presumably) went to.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Value deposited (including deposit fee).
@@ -200,7 +200,7 @@ struct GetOrderRequestContext
   /**
    * Hash over the @e contract_terms.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Total amount the exchange deposited into our bank account
@@ -357,6 +357,9 @@ resume_by_event (void *cls,
 
   (void) extra;
   (void) extra_size;
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Resuming request %p by trigger\n",
+              gorc);
   if (! gorc->suspended)
     return; /* duplicate event is possible */
   gorc->suspended = false;
@@ -502,18 +505,13 @@ deposit_get_cb (void *cls,
          remember our target UUID */
       enum GNUNET_DB_QueryStatus qs;
       struct GNUNET_TIME_Absolute now;
-      struct GNUNET_HashCode h_wire;
 
       now = GNUNET_TIME_absolute_get ();
       (void) GNUNET_TIME_round_abs (&now);
-      GNUNET_assert (GNUNET_OK ==
-                     TALER_JSON_merchant_wire_signature_hash (
-                       gorc->wire_details,
-                       &h_wire));
       qs = TMH_db->account_kyc_set_status (
         TMH_db->cls,
         gorc->hc->instance->settings.id,
-        &h_wire,
+        &tq->h_wire,
         tq->exchange_url,
         dr->details.accepted.payment_target_uuid,
         NULL,
@@ -658,7 +656,7 @@ static void
 deposit_cb (void *cls,
             uint64_t deposit_serial,
             const char *exchange_url,
-            const struct GNUNET_HashCode *h_wire,
+            const struct TALER_MerchantWireHash *h_wire,
             const struct TALER_Amount *amount_with_fee,
             const struct TALER_Amount *deposit_fee,
             const struct TALER_CoinSpendPublicKeyP *coin_pub)
@@ -930,6 +928,9 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler 
*rh,
           GNUNET_CRYPTO_hash (hc->infix,
                               strlen (hc->infix),
                               &pay_eh.h_order_id);
+          GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                      "Subscribing to payment triggers for %p\n",
+                      gorc);
           gorc->eh = TMH_db->event_listen (TMH_db->cls,
                                            &pay_eh.header,
                                            timeout,
@@ -944,6 +945,9 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler 
*rh,
               .merchant_pub = hc->instance->merchant_pub
             };
 
+            GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                        "Subscribing to session triggers for %p\n",
+                        gorc);
             GNUNET_CRYPTO_hash (gorc->session_id,
                                 strlen (gorc->session_id),
                                 &session_eh.h_session_id);
@@ -980,7 +984,7 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler 
*rh,
        earlier *unclaimed* order state (which we loaded in a previous
        invocation of this function and we are back here due to long polling)
        and thus the contract terms could have changed during claiming. Thus,
-       we need to fetch the latest contract terms from the DB again. *///
+       we need to fetch the latest contract terms from the DB again. */
     json_decref (gorc->contract_terms);
     gorc->contract_terms = NULL;
     gorc->fulfillment_url = NULL;
@@ -1420,7 +1424,7 @@ TMH_private_get_orders_ID (const struct 
TMH_RequestHandler *rh,
     }
 
     {
-      struct GNUNET_HashCode *h_contract = NULL;
+      struct TALER_PrivateContractHash *h_contract = NULL;
 
       /* In a session-bound payment, allow the browser to check the order
        * status page (e.g. to get a refund).
diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c 
b/src/backend/taler-merchant-httpd_private-get-orders.c
index ba8b47c9..85660812 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders.c
@@ -274,7 +274,7 @@ add_order (void *cls,
 {
   struct TMH_PendingOrder *po = cls;
   json_t *contract_terms;
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
   enum GNUNET_DB_QueryStatus qs;
   const char *summary;
   char *order_id = NULL;
@@ -444,6 +444,9 @@ resume_by_event (void *cls,
   osf = (enum TMH_OrderStateFlags) ntohl (oce->order_state);
   order_serial_id = GNUNET_ntohll (oce->order_serial_id);
   date = GNUNET_TIME_absolute_ntoh (oce->execution_date);
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Received notification about new order %llu\n",
+              (unsigned long long) order_serial_id);
   for (struct TMH_PendingOrder *po = mi->po_head;
        NULL != po;
        po = pn)
@@ -458,23 +461,51 @@ resume_by_event (void *cls,
             ( ((TALER_EXCHANGE_YNA_YES == po->of.wired) ==
                (0 != (osf & TMH_OSF_WIRED))) ||
               (TALER_EXCHANGE_YNA_ALL == po->of.wired) ) ) )
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                  "Client %p waits on different order type\n",
+                  po);
       continue;
+    }
     if (po->of.delta > 0)
     {
       if (order_serial_id < po->of.start_row)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                    "Client %p waits on different order row\n",
+                    po);
         continue;
+      }
       if (date.abs_value_us < po->of.date.abs_value_us)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                    "Client %p waits on different order date\n",
+                    po);
         continue;
+      }
       po->of.delta--;
     }
     else
     {
       if (order_serial_id > po->of.start_row)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                    "Client %p waits on different order row\n",
+                    po);
         continue;
+      }
       if (date.abs_value_us > po->of.date.abs_value_us)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                    "Client %p waits on different order date\n",
+                    po);
         continue;
+      }
       po->of.delta++;
     }
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Waking up client %p!\n",
+                po);
     add_order (po,
                NULL,
                order_serial_id,
@@ -486,6 +517,7 @@ resume_by_event (void *cls,
     po->in_dll = false;
     GNUNET_assert (po ==
                    GNUNET_CONTAINER_heap_remove_node (po->hn));
+    po->hn = NULL;
     MHD_resume_connection (po->con);
     TALER_MHD_daemon_trigger ();   /* we resumed, kick MHD */
   }
@@ -523,6 +555,10 @@ TMH_notify_order_change (struct TMH_MerchantInstance *mi,
     .merchant_pub = mi->merchant_pub
   };
 
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Notifying clients of new order %llu at %s\n",
+              (unsigned long long) order_serial_id,
+              TALER_B2S (&mi->merchant_pub));
   TMH_db->event_notify (TMH_db->cls,
                         &eh.header,
                         &oce,
@@ -799,13 +835,14 @@ TMH_private_get_orders (const struct TMH_RequestHandler 
*rh,
     po->in_dll = true;
     if (NULL == mi->po_eh)
     {
-      struct GNUNET_DB_EventHeaderP change_eh = {
-        .type = htons (TALER_DBEVENT_MERCHANT_ORDERS_CHANGE),
-        .size = htons (sizeof (change_eh))
+      struct TMH_OrderChangeEventP change_eh = {
+        .header.type = htons (TALER_DBEVENT_MERCHANT_ORDERS_CHANGE),
+        .header.size = htons (sizeof (change_eh)),
+        .merchant_pub = mi->merchant_pub
       };
 
       mi->po_eh = TMH_db->event_listen (TMH_db->cls,
-                                        &change_eh,
+                                        &change_eh.header,
                                         GNUNET_TIME_UNIT_FOREVER_REL,
                                         &resume_by_event,
                                         mi);
diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c 
b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
index 607c3593..d7ebc1f2 100644
--- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
@@ -42,7 +42,7 @@
 static void
 free_wm (struct TMH_WireMethod *wm)
 {
-  json_decref (wm->j_wire);
+  GNUNET_free (wm->payto_uri);
   GNUNET_free (wm->wire_method);
   GNUNET_free (wm);
 }
@@ -208,8 +208,7 @@ patch_instances_ID (struct TMH_MerchantInstance *mi,
            NULL != wm;
            wm = wm->next)
       {
-        const char *uri = json_string_value (json_object_get (wm->j_wire,
-                                                              "payto_uri"));
+        const char *uri = wm->payto_uri;
 
         GNUNET_assert (NULL != uri);
         matched = false;
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c 
b/src/backend/taler-merchant-httpd_private-post-instances.c
index 7951652a..71be2673 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -60,8 +60,7 @@ accounts_equal (const struct TMH_MerchantInstance *mi,
          NULL != wm;
          wm = wm->next)
     {
-      const char *uri = json_string_value (json_object_get (wm->j_wire,
-                                                            "payto_uri"));
+      const char *uri = wm->payto_uri;
 
       GNUNET_assert (NULL != uri);
       for (unsigned int i = 0; i<len; i++)
@@ -99,7 +98,7 @@ accounts_equal (const struct TMH_MerchantInstance *mi,
 static void
 free_wm (struct TMH_WireMethod *wm)
 {
-  json_decref (wm->j_wire);
+  GNUNET_free (wm->payto_uri);
   GNUNET_free (wm->wire_method);
   GNUNET_free (wm);
 }
@@ -411,21 +410,13 @@ TMH_private_post_instances (const struct 
TMH_RequestHandler *rh,
            NULL != wm;
            wm = wm->next)
       {
-        struct TALER_MERCHANTDB_AccountDetails ad;
-        struct GNUNET_JSON_Specification spec[] = {
-          GNUNET_JSON_spec_string ("payto_uri",
-                                   &ad.payto_uri),
-          GNUNET_JSON_spec_fixed_auto ("salt",
-                                       &ad.salt),
-          GNUNET_JSON_spec_end ()
+        struct TALER_MERCHANTDB_AccountDetails ad = {
+          .payto_uri = wm->payto_uri,
+          .salt = wm->wire_salt,
+          .h_wire = wm->h_wire,
+          .active = wm->active
         };
 
-        GNUNET_assert (GNUNET_OK ==
-                       TALER_MHD_parse_json_data (NULL,
-                                                  wm->j_wire,
-                                                  spec));
-        ad.h_wire = wm->h_wire;
-        ad.active = wm->active;
         qs = TMH_db->insert_account (TMH_db->cls,
                                      mi->settings.id,
                                      &ad);
diff --git a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c 
b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c
index ebbfdf0a..2f98be98 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c
@@ -55,7 +55,7 @@ trigger_refund_notification (struct TMH_HandlerContext *hc,
 
   /* Resume clients that may wait for this refund */
   as = TALER_amount2s (amount);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Awakening clients on %s waiting for refund of no more than 
%s\n",
               hc->infix,
               as);
@@ -150,7 +150,7 @@ TMH_private_post_orders_ID_refund (const struct 
TMH_RequestHandler *rh,
     GNUNET_JSON_spec_end ()
   };
   enum TALER_MERCHANTDB_RefundStatus rs;
-  struct GNUNET_HashCode h_contract;
+  struct TALER_PrivateContractHash h_contract;
 
   {
     enum GNUNET_DB_QueryStatus qs;
@@ -353,7 +353,8 @@ TMH_private_post_orders_ID_refund (const struct 
TMH_RequestHandler *rh,
                                          NULL);
     }
     TMH_notify_order_change (hc->instance,
-                             TMH_OSF_PAID
+                             TMH_OSF_CLAIMED
+                             | TMH_OSF_PAID
                              | TMH_OSF_REFUNDED,
                              timestamp,
                              order_serial);
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c 
b/src/backend/taler-merchant-httpd_private-post-orders.c
index 2706e511..17131d3b 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -286,6 +286,10 @@ execute_transaction (struct TMH_HandlerContext *hc,
     TMH_db->rollback (TMH_db->cls);
     return qs;
   }
+  TMH_notify_order_change (hc->instance,
+                           TMH_OSF_NONE,
+                           timestamp,
+                           order_serial);
   /* finally, commit transaction (note: if it fails, we ALSO re-acquire
      the UUID locks, which is exactly what we want) */
   qs = TMH_db->commit (TMH_db->cls);
@@ -905,7 +909,6 @@ patch_order (struct MHD_Connection *connection,
       MHD_HTTP_BAD_REQUEST,
       TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE,
       "order:wire_transfer_deadline;order:refund_deadline");
-
   }
 
   /* Note: total amount currency match checked
@@ -1046,7 +1049,7 @@ patch_order (struct MHD_Connection *connection,
 
   /* sanity check result */
   {
-    struct GNUNET_HashCode h_control;
+    struct TALER_PrivateContractHash h_control;
 
     switch (TALER_JSON_contract_hash (order,
                                       &h_control))
diff --git a/src/backend/taler-merchant-httpd_private-post-transfers.c 
b/src/backend/taler-merchant-httpd_private-post-transfers.c
index 2febf4bc..871aa57a 100644
--- a/src/backend/taler-merchant-httpd_private-post-transfers.c
+++ b/src/backend/taler-merchant-httpd_private-post-transfers.c
@@ -298,7 +298,7 @@ check_transfer (void *cls,
                 const struct TALER_Amount *deposit_fee,
                 const struct TALER_Amount *refund_fee,
                 const struct TALER_Amount *wire_fee,
-                const struct GNUNET_HashCode *h_wire,
+                const struct TALER_MerchantWireHash *h_wire,
                 struct GNUNET_TIME_Absolute deposit_timestamp,
                 struct GNUNET_TIME_Absolute refund_deadline,
                 const struct TALER_ExchangeSignatureP *exchange_sig,
diff --git a/src/backenddb/drop0001.sql b/src/backenddb/drop0001.sql
index 4a028bab..d7171e9d 100644
--- a/src/backenddb/drop0001.sql
+++ b/src/backenddb/drop0001.sql
@@ -23,6 +23,18 @@ BEGIN;
 -- Unlike the other SQL files, it SHOULD be updated to reflect the
 -- latest requirements for dropping tables.
 
+-- Unregister patch (0003.sql)
+SELECT _v.unregister_patch('merchant-0003');
+
+-- Unregister patch (0002.sql)
+SELECT _v.unregister_patch('merchant-0002');
+
+-- Unregister patch (0001.sql)
+SELECT _v.unregister_patch('merchant-0001');
+
+
+DROP TABLE IF EXISTS merchant_kyc CASCADE;
+
 -- Drops for 0001.sql
 
 DROP TABLE IF EXISTS merchant_exchange_wire_fees CASCADE;
@@ -51,18 +63,6 @@ DROP TABLE IF EXISTS merchant_tips CASCADE;
 DROP TABLE IF EXISTS merchant_tip_pickups CASCADE;
 DROP TABLE IF EXISTS merchant_tip_pickup_signatures CASCADE;
 
--- Unregister patch (0001.sql)
-SELECT _v.unregister_patch('merchant-0001');
-
--- Unregister patch (0002.sql)
-SELECT _v.unregister_patch('merchant-0002');
-
-DROP TABLE IF EXISTS merchant_kyc CASCADE;
-
--- Unregister patch (0003.sql)
-SELECT _v.unregister_patch('merchant-0003');
-
-
 
 -- And we're out of here...
 COMMIT;
diff --git a/src/backenddb/merchant-0001.sql b/src/backenddb/merchant-0001.sql
index 9e769067..a4058a8a 100644
--- a/src/backenddb/merchant-0001.sql
+++ b/src/backenddb/merchant-0001.sql
@@ -97,7 +97,7 @@ CREATE TABLE IF NOT EXISTS merchant_accounts
   ,merchant_serial BIGINT NOT NULL
      REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
   ,h_wire BYTEA NOT NULL CHECK (LENGTH(h_wire)=64)
-  ,salt BYTEA NOT NULL CHECK (LENGTH(salt)=64) -- FIXME: eventually migrate to 
16-bit salt value here! #7032
+  ,salt BYTEA NOT NULL CHECK (LENGTH(salt)=16) 
   ,payto_uri VARCHAR NOT NULL
   ,active BOOLEAN NOT NULL
   ,UNIQUE (merchant_serial,payto_uri)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c 
b/src/backenddb/plugin_merchantdb_postgres.c
index 4b90674e..4f4966f6 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -838,7 +838,7 @@ struct KycStatusContext
   /**
    * Filter, NULL to not filter.
    */
-  const struct GNUNET_HashCode *h_wire;
+  const struct TALER_MerchantWireHash *h_wire;
 
   /**
    * Filter, NULL to not filter.
@@ -874,7 +874,7 @@ kyc_status_cb (void *cls,
 
   for (unsigned int i = 0; i < num_results; i++)
   {
-    struct GNUNET_HashCode h_wire;
+    struct TALER_MerchantWireHash h_wire;
     uint64_t kyc_serial;
     char *exchange_url;
     char *payto_uri;
@@ -948,7 +948,7 @@ kyc_status_cb (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_account_kyc_get_status (void *cls,
                                  const char *merchant_id,
-                                 const struct GNUNET_HashCode *h_wire,
+                                 const struct TALER_MerchantWireHash *h_wire,
                                  const char *exchange_url,
                                  TALER_MERCHANTDB_KycCallback kyc_cb,
                                  void *kyc_cb_cls)
@@ -1001,7 +1001,7 @@ static enum GNUNET_DB_QueryStatus
 postgres_account_kyc_set_status (
   void *cls,
   const char *merchant_id,
-  const struct GNUNET_HashCode *h_wire,
+  const struct TALER_MerchantWireHash *h_wire,
   const char *exchange_url,
   uint64_t exchange_kyc_serial,
   const struct TALER_ExchangeSignatureP *exchange_sig,
@@ -1160,7 +1160,7 @@ postgres_update_instance_auth (
 static enum GNUNET_DB_QueryStatus
 postgres_inactivate_account (void *cls,
                              const char *merchant_id,
-                             const struct GNUNET_HashCode *h_wire)
+                             const struct TALER_MerchantWireHash *h_wire)
 {
   struct PostgresClosure *pg = cls;
   struct GNUNET_PQ_QueryParam params[] = {
@@ -1187,7 +1187,7 @@ postgres_inactivate_account (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_activate_account (void *cls,
                            const char *merchant_id,
-                           const struct GNUNET_HashCode *h_wire)
+                           const struct TALER_MerchantWireHash *h_wire)
 {
   struct PostgresClosure *pg = cls;
   struct GNUNET_PQ_QueryParam params[] = {
@@ -2042,7 +2042,7 @@ postgres_insert_contract_terms (void *cls,
   struct GNUNET_TIME_Absolute pay_deadline;
   struct GNUNET_TIME_Absolute refund_deadline;
   const char *fulfillment_url;
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   if (GNUNET_OK !=
       TALER_JSON_contract_hash (contract_terms,
@@ -2122,7 +2122,7 @@ postgres_update_contract_terms (void *cls,
   struct GNUNET_TIME_Absolute pay_deadline;
   struct GNUNET_TIME_Absolute refund_deadline;
   const char *fulfillment_url = NULL;
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   if (GNUNET_OK !=
       TALER_JSON_contract_hash (contract_terms,
@@ -2316,7 +2316,8 @@ lookup_deposits_cb (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_lookup_deposits (void *cls,
                           const char *instance_id,
-                          const struct GNUNET_HashCode *h_contract_terms,
+                          const struct
+                          TALER_PrivateContractHash *h_contract_terms,
                           TALER_MERCHANTDB_DepositsCallback cb,
                           void *cb_cls)
 {
@@ -2336,7 +2337,7 @@ postgres_lookup_deposits (void *cls,
   /* no preflight check here, run in its own transaction by the caller! */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Finding deposits for h_contract_terms '%s'\n",
-              GNUNET_h2s (h_contract_terms));
+              GNUNET_h2s (&h_contract_terms->hash));
   check_connection (pg);
   qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
                                              "lookup_deposits",
@@ -2409,19 +2410,20 @@ postgres_insert_exchange_signkey (
  * @return transaction status
  */
 static enum GNUNET_DB_QueryStatus
-postgres_insert_deposit (void *cls,
-                         const char *instance_id,
-                         struct GNUNET_TIME_Absolute deposit_timestamp,
-                         const struct GNUNET_HashCode *h_contract_terms,
-                         const struct TALER_CoinSpendPublicKeyP *coin_pub,
-                         const char *exchange_url,
-                         const struct TALER_Amount *amount_with_fee,
-                         const struct TALER_Amount *deposit_fee,
-                         const struct TALER_Amount *refund_fee,
-                         const struct TALER_Amount *wire_fee,
-                         const struct GNUNET_HashCode *h_wire,
-                         const struct TALER_ExchangeSignatureP *exchange_sig,
-                         const struct TALER_ExchangePublicKeyP *exchange_pub)
+postgres_insert_deposit (
+  void *cls,
+  const char *instance_id,
+  struct GNUNET_TIME_Absolute deposit_timestamp,
+  const struct TALER_PrivateContractHash *h_contract_terms,
+  const struct TALER_CoinSpendPublicKeyP *coin_pub,
+  const char *exchange_url,
+  const struct TALER_Amount *amount_with_fee,
+  const struct TALER_Amount *deposit_fee,
+  const struct TALER_Amount *refund_fee,
+  const struct TALER_Amount *wire_fee,
+  const struct TALER_MerchantWireHash *h_wire,
+  const struct TALER_ExchangeSignatureP *exchange_sig,
+  const struct TALER_ExchangePublicKeyP *exchange_pub)
 {
   struct PostgresClosure *pg = cls;
   struct GNUNET_PQ_QueryParam params[] = {
@@ -2444,7 +2446,7 @@ postgres_insert_deposit (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Storing deposit for instance `%s' h_contract_terms `%s', 
coin_pub: `%s', amount_with_fee: %s\n",
               instance_id,
-              GNUNET_h2s (h_contract_terms),
+              GNUNET_h2s (&h_contract_terms->hash),
               TALER_B2S (coin_pub),
               TALER_amount2s (amount_with_fee));
   check_connection (pg);
@@ -2541,7 +2543,8 @@ lookup_refunds_cb (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_lookup_refunds (void *cls,
                          const char *instance_id,
-                         const struct GNUNET_HashCode *h_contract_terms,
+                         const struct
+                         TALER_PrivateContractHash *h_contract_terms,
                          TALER_MERCHANTDB_RefundCallback rc,
                          void *rc_cls)
 {
@@ -2560,7 +2563,7 @@ postgres_lookup_refunds (void *cls,
 
   /* no preflight check here, run in transaction by caller! */
   TALER_LOG_DEBUG ("Looking for refund of h_contract_terms %s at `%s'\n",
-                   GNUNET_h2s (h_contract_terms),
+                   GNUNET_h2s (&h_contract_terms->hash),
                    instance_id);
   check_connection (pg);
   qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
@@ -2588,7 +2591,8 @@ postgres_lookup_refunds (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_mark_contract_paid (void *cls,
                              const char *instance_id,
-                             const struct GNUNET_HashCode *h_contract_terms,
+                             const struct
+                             TALER_PrivateContractHash *h_contract_terms,
                              const char *session_id)
 {
   struct PostgresClosure *pg = cls;
@@ -2611,7 +2615,7 @@ postgres_mark_contract_paid (void *cls,
   /* no preflight check here, run in transaction by caller! */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Marking h_contract_terms '%s' of %s as paid for session `%s'\n",
-              GNUNET_h2s (h_contract_terms),
+              GNUNET_h2s (&h_contract_terms->hash),
               instance_id,
               session_id);
   qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
@@ -2649,7 +2653,7 @@ postgres_mark_contract_paid (void *cls,
 static enum GNUNET_DB_QueryStatus
 postgres_refund_coin (void *cls,
                       const char *instance_id,
-                      const struct GNUNET_HashCode *h_contract_terms,
+                      const struct TALER_PrivateContractHash *h_contract_terms,
                       struct GNUNET_TIME_Absolute refund_timestamp,
                       const struct TALER_CoinSpendPublicKeyP *coin_pub,
                       const char *reason)
@@ -2684,7 +2688,7 @@ static enum GNUNET_DB_QueryStatus
 postgres_lookup_order_status (void *cls,
                               const char *instance_id,
                               const char *order_id,
-                              struct GNUNET_HashCode *h_contract_terms,
+                              struct TALER_PrivateContractHash 
*h_contract_terms,
                               bool *paid)
 {
   struct PostgresClosure *pg = cls;
@@ -2732,7 +2736,8 @@ postgres_lookup_order_status_by_serial (void *cls,
                                         const char *instance_id,
                                         uint64_t order_serial,
                                         char **order_id,
-                                        struct GNUNET_HashCode 
*h_contract_terms,
+                                        struct TALER_PrivateContractHash *
+                                        h_contract_terms,
                                         bool *paid)
 {
   struct PostgresClosure *pg = cls;
@@ -2882,7 +2887,7 @@ lookup_deposits_by_order_cb (void *cls,
   {
     uint64_t deposit_serial;
     char *exchange_url;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_MerchantWireHash h_wire;
     struct TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_Amount amount_with_fee;
     struct TALER_Amount deposit_fee;
@@ -3708,7 +3713,7 @@ static enum GNUNET_DB_QueryStatus
 postgres_lookup_refunds_detailed (
   void *cls,
   const char *instance_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   TALER_MERCHANTDB_RefundDetailCallback rc,
   void *rc_cls)
 {
@@ -3727,7 +3732,7 @@ postgres_lookup_refunds_detailed (
 
   /* no preflight check here, run in transaction by caller! */
   TALER_LOG_DEBUG ("Looking for refund %s + %s\n",
-                   GNUNET_h2s (h_contract_terms),
+                   GNUNET_h2s (&h_contract_terms->hash),
                    instance_id);
   check_connection (pg);
   qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
@@ -4296,7 +4301,7 @@ lookup_deposits_by_contract_and_coin_cb (void *cls,
     struct TALER_Amount deposit_fee;
     struct TALER_Amount refund_fee;
     struct TALER_Amount wire_fee;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_MerchantWireHash h_wire;
     struct GNUNET_TIME_Absolute deposit_timestamp;
     struct GNUNET_TIME_Absolute refund_deadline;
     struct TALER_ExchangeSignatureP exchange_sig;
@@ -4367,7 +4372,7 @@ static enum GNUNET_DB_QueryStatus
 postgres_lookup_deposits_by_contract_and_coin (
   void *cls,
   const char *instance_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   const struct TALER_CoinSpendPublicKeyP *coin_pub,
   TALER_MERCHANTDB_CoinDepositCallback cb,
   void *cb_cls)
@@ -6117,7 +6122,7 @@ struct LookupSignaturesContext
   /**
    * Where to store the signatures.
    */
-  struct GNUNET_CRYPTO_RsaSignature **sigs;
+  struct TALER_BlindedDenominationSignature *sigs;
 };
 
 
@@ -6139,12 +6144,12 @@ lookup_signatures_cb (void *cls,
   for (unsigned int i = 0; i < num_results; i++)
   {
     uint32_t offset;
-    struct GNUNET_CRYPTO_RsaSignature *bsig;
+    struct TALER_BlindedDenominationSignature bsig;
     struct GNUNET_PQ_ResultSpec rs[] = {
       GNUNET_PQ_result_spec_uint32 ("coin_offset",
                                     &offset),
-      GNUNET_PQ_result_spec_rsa_signature ("blind_sig",
-                                           &bsig),
+      TALER_PQ_result_spec_blinded_denom_sig ("blind_sig",
+                                              &bsig),
       GNUNET_PQ_result_spec_end
     };
 
@@ -6165,7 +6170,6 @@ lookup_signatures_cb (void *cls,
     /* Must be NULL due to UNIQUE constraint on offset and
        requirement that client launched us with 'sigs'
        pre-initialized to NULL. */
-    GNUNET_assert (NULL == lsc->sigs[offset]);
     lsc->sigs[offset] = bsig;
   }
 }
@@ -6193,7 +6197,7 @@ postgres_lookup_pickup (void *cls,
                         char **exchange_url,
                         struct TALER_ReservePrivateKeyP *reserve_priv,
                         unsigned int sigs_length,
-                        struct GNUNET_CRYPTO_RsaSignature *sigs[])
+                        struct TALER_BlindedDenominationSignature sigs[])
 {
   struct PostgresClosure *pg = cls;
   uint64_t pickup_serial;
@@ -6727,13 +6731,13 @@ postgres_insert_pickup_blind_signature (
   void *cls,
   const struct GNUNET_HashCode *pickup_id,
   uint32_t offset,
-  const struct GNUNET_CRYPTO_RsaSignature *blind_sig)
+  const struct TALER_BlindedDenominationSignature *blind_sig)
 {
   struct PostgresClosure *pg = cls;
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (pickup_id),
     GNUNET_PQ_query_param_uint32 (&offset),
-    GNUNET_PQ_query_param_rsa_signature (blind_sig),
+    TALER_PQ_query_param_blinded_denom_sig (blind_sig),
     GNUNET_PQ_query_param_end
   };
 
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 473a3f62..fdab4abb 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -150,7 +150,7 @@ static void
 make_account (struct TALER_MERCHANTDB_AccountDetails *account)
 {
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_STRONG,
-                                    &account->h_wire);
+                                    &account->h_wire.hash);
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG,
                               &account->salt,
                               sizeof (account->salt));
@@ -1751,7 +1751,8 @@ test_mark_contract_paid (const struct InstanceData 
*instance,
                          const struct OrderData *order,
                          enum GNUNET_DB_QueryStatus expected_result)
 {
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
+
   GNUNET_assert (GNUNET_OK ==
                  TALER_JSON_contract_hash (order->contract,
                                            &h_contract_terms));
@@ -1778,9 +1779,10 @@ test_lookup_order_status (const struct InstanceData 
*instance,
                           const struct OrderData *order,
                           bool expected_paid)
 {
-  struct GNUNET_HashCode h_contract_terms_expected;
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms_expected;
+  struct TALER_PrivateContractHash h_contract_terms;
   bool order_paid = false;
+
   if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
       plugin->lookup_order_status (plugin->cls,
                                    instance->instance.id,
@@ -2096,8 +2098,9 @@ run_test_orders (struct TestOrders_Closure *cls)
                                               &cls->orders[0],
                                               false));
   {
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
     bool order_paid = false;
+
     if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
         plugin->lookup_order_status (plugin->cls,
                                      cls->instance.instance.id,
@@ -2128,8 +2131,9 @@ run_test_orders (struct TestOrders_Closure *cls)
   }
   /* Test lookup order status fails for nonexistent order */
   {
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
     bool order_paid;
+
     if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
         plugin->lookup_order_status (plugin->cls,
                                      cls->instance.instance.id,
@@ -2364,7 +2368,7 @@ struct DepositData
   /**
    * Hash of the associated order's contract terms.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Public key of the coin that has been deposited.
@@ -2399,7 +2403,7 @@ struct DepositData
   /**
    * Hash of the wire details.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Signature the exchange made on this deposit.
@@ -2426,14 +2430,11 @@ make_deposit (const struct InstanceData *instance,
               struct DepositData *deposit)
 {
   struct TALER_CoinSpendPrivateKeyP coin_priv;
-  struct TALER_DepositRequestPS deposit_sign = {
-    .purpose = {
-      .size = htonl (sizeof (struct TALER_DepositRequestPS)),
-      .purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT)
-    }
-
-
+  struct TALER_DepositConfirmationPS deposit_sign = {
+    .purpose.size = htonl (sizeof (deposit_sign)),
+    .purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT)
   };
+  struct TALER_Amount amount_without_fee;
 
   deposit->timestamp = GNUNET_TIME_absolute_get ();
   GNUNET_assert (GNUNET_OK ==
@@ -2455,18 +2456,22 @@ make_deposit (const struct InstanceData *instance,
   GNUNET_assert (GNUNET_OK ==
                  TALER_string_to_amount ("EUR:2.00",
                                          &deposit->wire_fee));
+  GNUNET_assert (0 <=
+                 TALER_amount_subtract (&amount_without_fee,
+                                        &deposit->amount_with_fee,
+                                        &deposit->deposit_fee));
   deposit->h_wire = account->h_wire;
   deposit_sign.h_contract_terms = deposit->h_contract_terms;
   deposit_sign.h_wire = deposit->h_wire;
-  deposit_sign.wallet_timestamp = GNUNET_TIME_absolute_hton (
+  deposit_sign.exchange_timestamp = GNUNET_TIME_absolute_hton (
+    GNUNET_TIME_absolute_get ());
+  deposit_sign.wire_deadline = GNUNET_TIME_absolute_hton (
     GNUNET_TIME_absolute_get ());
   deposit_sign.refund_deadline = GNUNET_TIME_absolute_hton (
     GNUNET_TIME_absolute_get ());
-  TALER_amount_hton (&deposit_sign.amount_with_fee,
-                     &deposit->amount_with_fee);
-  TALER_amount_hton (&deposit_sign.deposit_fee,
-                     &deposit->deposit_fee);
-  deposit_sign.merchant = instance->merchant_pub;
+  TALER_amount_hton (&deposit_sign.amount_without_fee,
+                     &amount_without_fee);
+  deposit_sign.merchant_pub = instance->merchant_pub;
   deposit_sign.coin_pub = deposit->coin_pub;
   GNUNET_CRYPTO_eddsa_sign (&signkey->exchange_priv.eddsa_priv,
                             &deposit_sign,
@@ -2631,7 +2636,7 @@ lookup_deposits_cb (void *cls,
  */
 static int
 test_lookup_deposits (const struct InstanceData *instance,
-                      const struct GNUNET_HashCode *h_contract_terms,
+                      const struct TALER_PrivateContractHash *h_contract_terms,
                       unsigned int deposits_length,
                       const struct DepositData *deposits)
 {
@@ -2695,7 +2700,7 @@ lookup_deposits_contract_coin_cb (
   const struct TALER_Amount *deposit_fee,
   const struct TALER_Amount *refund_fee,
   const struct TALER_Amount *wire_fee,
-  const struct GNUNET_HashCode *h_wire,
+  const struct TALER_MerchantWireHash *h_wire,
   struct GNUNET_TIME_Absolute deposit_timestamp,
   struct GNUNET_TIME_Absolute refund_deadline,
   const struct TALER_ExchangeSignatureP *exchange_sig,
@@ -2756,7 +2761,7 @@ lookup_deposits_contract_coin_cb (
 static int
 test_lookup_deposits_contract_and_coin (
   const struct InstanceData *instance,
-  const struct GNUNET_HashCode *h_contract,
+  const struct TALER_PrivateContractHash *h_contract,
   const struct TALER_CoinSpendPublicKeyP *coin_pub,
   unsigned int deposits_length,
   const struct DepositData *deposits)
@@ -2816,7 +2821,7 @@ static void
 lookup_deposits_order_cb (void *cls,
                           uint64_t deposit_serial,
                           const char *exchange_url,
-                          const struct GNUNET_HashCode *h_wire,
+                          const struct TALER_MerchantWireHash *h_wire,
                           const struct TALER_Amount *amount_with_fee,
                           const struct TALER_Amount *deposit_fee,
                           const struct TALER_CoinSpendPublicKeyP *coin_pub)
@@ -2933,7 +2938,7 @@ static void
 get_deposit_serial_cb (void *cls,
                        uint64_t deposit_serial,
                        const char *exchange_url,
-                       const struct GNUNET_HashCode *h_wire,
+                       const struct TALER_MerchantWireHash *h_wire,
                        const struct TALER_Amount *amount_with_fee,
                        const struct TALER_Amount *deposit_fee,
                        const struct TALER_CoinSpendPublicKeyP *coin_pub)
@@ -5026,11 +5031,11 @@ test_lookup_tip_details (const struct InstanceData 
*instance,
  * @param sigs the signatures to free.
  */
 static void
-free_rsa_signature_array (unsigned int sigs_length,
-                          struct GNUNET_CRYPTO_RsaSignature **sigs)
+free_signature_array (unsigned int sigs_length,
+                      struct TALER_BlindedDenominationSignature *sigs)
 {
   for (unsigned int i = 0; sigs_length > i; ++i)
-    GNUNET_free (sigs[i]);
+    TALER_blinded_denom_sig_free (&sigs[i]);
 }
 
 
@@ -5047,22 +5052,23 @@ free_rsa_signature_array (unsigned int sigs_length,
  * @return 0 on success, 1 otherwise.
  */
 static int
-test_lookup_pickup (const struct InstanceData *instance,
-                    const struct TipData *tip,
-                    const struct GNUNET_HashCode *pickup_id,
-                    const char *expected_exchange_url,
-                    const struct
-                    TALER_ReservePrivateKeyP *expected_reserve_priv,
-                    unsigned int expected_sigs_length,
-                    const struct GNUNET_CRYPTO_RsaSignature **expected_sigs)
+test_lookup_pickup (
+  const struct InstanceData *instance,
+  const struct TipData *tip,
+  const struct GNUNET_HashCode *pickup_id,
+  const char *expected_exchange_url,
+  const struct TALER_ReservePrivateKeyP *expected_reserve_priv,
+  unsigned int expected_sigs_length,
+  const struct TALER_BlindedDenominationSignature *expected_sigs)
 {
   char *exchange_url = NULL;
   struct TALER_ReservePrivateKeyP reserve_priv;
-  struct GNUNET_CRYPTO_RsaSignature *sigs[expected_sigs_length];
+  struct TALER_BlindedDenominationSignature sigs[expected_sigs_length];
   unsigned int results_matching[expected_sigs_length];
+
   memset (sigs,
           0,
-          sizeof (struct GNUNET_CRYPTO_RsaSignature *) * expected_sigs_length);
+          sizeof (sigs));
   if (0 > plugin->lookup_pickup (plugin->cls,
                                  instance->instance.id,
                                  &tip->details.tip_id,
@@ -5075,8 +5081,8 @@ test_lookup_pickup (const struct InstanceData *instance,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Lookup pickup failed\n");
     GNUNET_free (exchange_url);
-    free_rsa_signature_array (expected_sigs_length,
-                              sigs);
+    free_signature_array (expected_sigs_length,
+                          sigs);
     return 1;
   }
   if ((0 != strcmp (expected_exchange_url,
@@ -5087,8 +5093,8 @@ test_lookup_pickup (const struct InstanceData *instance,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Lookup pickup failed: mismatched data\n");
     GNUNET_free (exchange_url);
-    free_rsa_signature_array (expected_sigs_length,
-                              sigs);
+    free_signature_array (expected_sigs_length,
+                          sigs);
     return 1;
   }
   memset (results_matching,
@@ -5099,8 +5105,9 @@ test_lookup_pickup (const struct InstanceData *instance,
     for (unsigned int j = 0; expected_sigs_length > j; ++j)
     {
       /* compare expected_sigs[i] to sigs[j] */
-      if (0 == GNUNET_CRYPTO_rsa_signature_cmp (expected_sigs[i],
-                                                sigs[j]))
+      if (0 ==
+          TALER_blinded_denom_sig_cmp (&expected_sigs[i],
+                                       &sigs[j]))
       {
         results_matching[i] += 1;
       }
@@ -5113,8 +5120,8 @@ test_lookup_pickup (const struct InstanceData *instance,
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Lookup pickup failed: mismatched data\n");
       GNUNET_free (exchange_url);
-      free_rsa_signature_array (expected_sigs_length,
-                                sigs);
+      free_signature_array (expected_sigs_length,
+                            sigs);
       return 1;
     }
   }
@@ -5309,7 +5316,7 @@ struct TestTips_Closure
   /**
    * Signature for the pickup.
    */
-  struct GNUNET_CRYPTO_RsaSignature *pickup_sig;
+  struct TALER_BlindedDenominationSignature pickup_sig;
 };
 
 
@@ -5370,8 +5377,10 @@ pre_test_tips (struct TestTips_Closure *cls)
   }
 
   cls->pickup_priv = GNUNET_CRYPTO_rsa_private_key_create (2048);
-  cls->pickup_sig = GNUNET_CRYPTO_rsa_sign_fdh (cls->pickup_priv,
-                                                &cls->pickup_id);
+  cls->pickup_sig.cipher = TALER_DENOMINATION_RSA;
+  cls->pickup_sig.details.blinded_rsa_signature
+    = GNUNET_CRYPTO_rsa_sign_fdh (cls->pickup_priv,
+                                  &cls->pickup_id);
 }
 
 
@@ -5383,9 +5392,8 @@ static void
 post_test_tips (struct TestTips_Closure *cls)
 {
   free_instance_data (&cls->instance);
-
   GNUNET_CRYPTO_rsa_private_key_free (cls->pickup_priv);
-  GNUNET_CRYPTO_rsa_signature_free (cls->pickup_sig);
+  TALER_blinded_denom_sig_free (&cls->pickup_sig);
 }
 
 
@@ -5463,7 +5471,7 @@ run_test_tips (struct TestTips_Closure *cls)
                          plugin->insert_pickup_blind_signature (plugin->cls,
                                                                 
&cls->pickup_id,
                                                                 0,
-                                                                
cls->pickup_sig),
+                                                                
&cls->pickup_sig),
                          "Insert pickup blind signature failed\n");
   /* Test that overdrawing the reserve fails */
   TEST_COND_RET_ON_FAIL (TALER_EC_NONE !=
@@ -5693,7 +5701,7 @@ lookup_refunds_cb (void *cls,
  */
 static int
 test_lookup_refunds (const struct InstanceData *instance,
-                     const struct GNUNET_HashCode *h_contract_terms,
+                     const struct TALER_PrivateContractHash *h_contract_terms,
                      unsigned int refunds_length,
                      const struct TALER_CoinSpendPublicKeyP *coin_pubs,
                      const struct TALER_Amount *refund_amounts)
@@ -5898,7 +5906,8 @@ lookup_refunds_detailed_cb (void *cls,
  */
 static int
 test_lookup_refunds_detailed (const struct InstanceData *instance,
-                              const struct GNUNET_HashCode *h_contract_terms,
+                              const struct
+                              TALER_PrivateContractHash *h_contract_terms,
                               bool cmp_timestamps,
                               unsigned int refunds_length,
                               const struct RefundData *refunds)
@@ -6011,7 +6020,7 @@ get_refund_serial_cb (void *cls,
  */
 static uint64_t
 get_refund_serial (const struct InstanceData *instance,
-                   const struct GNUNET_HashCode *h_contract_terms,
+                   const struct TALER_PrivateContractHash *h_contract_terms,
                    const struct RefundData *refund)
 {
   struct LookupRefundSerial_Closure lookup_cls = {
@@ -6656,7 +6665,7 @@ test_lookup_orders_all_filters (void)
 
 static void
 kyc_status_ok (void *cls,
-               const struct GNUNET_HashCode *h_wire,
+               const struct TALER_MerchantWireHash *h_wire,
                uint64_t exchange_kyc_serial,
                const char *payto_uri,
                const char *exchange_url,
@@ -6672,7 +6681,7 @@ kyc_status_ok (void *cls,
 
 static void
 kyc_status_fail (void *cls,
-                 const struct GNUNET_HashCode *h_wire,
+                 const struct TALER_MerchantWireHash *h_wire,
                  uint64_t exchange_kyc_serial,
                  const char *payto_uri,
                  const char *exchange_url,
diff --git a/src/include/taler_merchant_service.h 
b/src/include/taler_merchant_service.h
index 82e81b4b..fc297219 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -679,7 +679,7 @@ struct TALER_MERCHANT_Account
   /**
    * salt used to compute h_wire
    */
-  struct GNUNET_HashCode salt;
+  struct TALER_WireSalt salt;
 
   /**
    * payto:// URI of the account.
@@ -689,7 +689,7 @@ struct TALER_MERCHANT_Account
   /**
    * Hash of @e payto_uri and @e salt.
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * true if the account is active,
@@ -1654,7 +1654,8 @@ struct TALER_MERCHANT_OrderWalletGetHandle *
 TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context *ctx,
                                  const char *backend_url,
                                  const char *order_id,
-                                 const struct GNUNET_HashCode *h_contract,
+                                 const struct
+                                 TALER_PrivateContractHash *h_contract,
                                  struct GNUNET_TIME_Relative timeout,
                                  const char *session_id,
                                  const struct TALER_Amount *min_refund,
@@ -2071,7 +2072,7 @@ typedef void
   const struct TALER_MERCHANT_HttpResponse *hr,
   const json_t *contract_terms,
   const struct TALER_MerchantSignatureP *sig,
-  const struct GNUNET_HashCode *h_contract_terms);
+  const struct TALER_PrivateContractHash *h_contract_terms);
 
 
 /**
@@ -2285,7 +2286,7 @@ struct TALER_MERCHANT_OrderPayHandle *
 TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
                           const char *merchant_url,
                           const char *session_id,
-                          const struct GNUNET_HashCode *h_contract,
+                          const struct TALER_PrivateContractHash *h_contract,
                           const struct TALER_Amount *amount,
                           const struct TALER_Amount *max_fee,
                           const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -2293,7 +2294,7 @@ TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
                           struct GNUNET_TIME_Absolute timestamp,
                           struct GNUNET_TIME_Absolute refund_deadline,
                           struct GNUNET_TIME_Absolute pay_deadline,
-                          const struct GNUNET_HashCode *h_wire,
+                          const struct TALER_MerchantWireHash *h_wire,
                           const char *order_id,
                           unsigned int num_coins,
                           const struct TALER_MERCHANT_PayCoin coins[],
@@ -2357,7 +2358,7 @@ TALER_MERCHANT_order_paid (
   const char *merchant_url,
   const char *order_id,
   const char *session_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   const struct TALER_MerchantSignatureP *merchant_sig,
   TALER_MERCHANT_OrderPaidCallback paid_cb,
   void *paid_cb_cls);
@@ -2461,7 +2462,7 @@ TALER_MERCHANT_order_abort (struct GNUNET_CURL_Context 
*ctx,
                             const char *merchant_url,
                             const char *order_id,
                             const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                            const struct GNUNET_HashCode *h_contract,
+                            const struct TALER_PrivateContractHash *h_contract,
                             unsigned int num_coins,
                             const struct TALER_MERCHANT_AbortCoin coins[],
                             TALER_MERCHANT_AbortCallback cb,
@@ -2553,7 +2554,7 @@ typedef void
   void *cls,
   const struct TALER_MERCHANT_HttpResponse *hr,
   const char *taler_refund_uri,
-  const struct GNUNET_HashCode *h_contract);
+  const struct TALER_PrivateContractHash *h_contract);
 
 
 /**
@@ -2669,7 +2670,7 @@ TALER_MERCHANT_wallet_post_order_refund (
   struct GNUNET_CURL_Context *ctx,
   const char *backend_url,
   const char *order_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   TALER_MERCHANT_WalletRefundCallback cb,
   void *cb_cls);
 
@@ -3670,18 +3671,6 @@ TALER_MERCHANT_tip_pickup_cancel (struct 
TALER_MERCHANT_TipPickupHandle *tph);
  */
 struct TALER_MERCHANT_TipPickup2Handle;
 
-/**
- * A blind signature returned via tipping API.
- */
-
-struct TALER_MERCHANT_BlindSignature
-{
-  /**
-   * We use RSA.
-   */
-  const struct GNUNET_CRYPTO_RsaSignature *blind_sig;
-};
-
 
 /**
  * Callback for a POST /tips/$TIP_ID/pickup request.  Returns the result of
@@ -3698,7 +3687,7 @@ typedef void
   void *cls,
   const struct TALER_MERCHANT_HttpResponse *hr,
   unsigned int num_blind_sigs,
-  const struct TALER_MERCHANT_BlindSignature blind_sigs[]);
+  const struct TALER_BlindedDenominationSignature blind_sigs[]);
 
 
 /**
@@ -3734,7 +3723,6 @@ TALER_MERCHANT_tip_pickup2_cancel (
   struct TALER_MERCHANT_TipPickup2Handle *tp);
 
 
-
 /* ********************* /kyc ************************** */
 
 /**
@@ -3866,7 +3854,7 @@ typedef void
 struct TALER_MERCHANT_KycGetHandle *
 TALER_MERCHANT_kyc_get (struct GNUNET_CURL_Context *ctx,
                         const char *backend_url,
-                        const struct GNUNET_HashCode *h_wire,
+                        const struct TALER_MerchantWireHash *h_wire,
                         const char *exchange_url,
                         struct GNUNET_TIME_Relative timeout,
                         TALER_MERCHANT_KycGetCallback cb,
@@ -3891,7 +3879,7 @@ struct TALER_MERCHANT_KycGetHandle *
 TALER_MERCHANT_management_kyc_get (struct GNUNET_CURL_Context *ctx,
                                    const char *backend_url,
                                    const char *instance_id,
-                                   const struct GNUNET_HashCode *h_wire,
+                                   const struct TALER_MerchantWireHash *h_wire,
                                    const char *exchange_url,
                                    struct GNUNET_TIME_Relative timeout,
                                    TALER_MERCHANT_KycGetCallback cb,
@@ -3908,7 +3896,4 @@ TALER_MERCHANT_kyc_get_cancel (
   struct TALER_MERCHANT_KycGetHandle *kyc);
 
 
-
-
-
 #endif  /* _TALER_MERCHANT_SERVICE_H */
diff --git a/src/include/taler_merchant_testing_lib.h 
b/src/include/taler_merchant_testing_lib.h
index 73a1be05..38149d25 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -1437,6 +1437,7 @@ TALER_TESTING_cmd_tip_authorize_fake (const char *label);
  * @param amounts array of string-defined amounts that specifies
  *        which denominations will be accepted for tipping.
  * @param ec expected Taler error code.
+ * @return the command
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_tip_pickup_with_ec (const char *label,
@@ -1457,6 +1458,7 @@ TALER_TESTING_cmd_tip_pickup_with_ec (const char *label,
  *        that offers a tip id to pick up.
  * @param amounts array of string-defined amounts that specifies
  *        which denominations will be accepted for tipping.
+ * @return the command
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_tip_pickup (const char *label,
@@ -1466,249 +1468,80 @@ TALER_TESTING_cmd_tip_pickup (const char *label,
                               const char **amounts);
 
 
-/* ****** Specific traits supported by this component ******* */
-
-/**
- * Offer a merchant signature over a contract.
- *
- * @param index which signature to offer if there are multiple
- *        on offer
- * @param merchant_sig set to the offered signature.
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_merchant_sig (
-  unsigned int index,
-  const struct TALER_MerchantSignatureP *merchant_sig);
-
-
-/**
- * Obtain a merchant signature over a contract from a @a cmd.
- *
- * @param cmd command to extract trait from
- * @param index which signature to pick if @a cmd has multiple
- *        on offer
- * @param[out] merchant_sig set to the wanted signature.
- *
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_merchant_sig (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_MerchantSignatureP **merchant_sig);
-
-
-/**
- * Offer an order claim nonce.
- *
- * @param index which nonce to offer if there are
- *        multiple on offer.
- * @param nonce set to the offered nonce.
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_claim_nonce (
-  unsigned int index,
-  const struct GNUNET_CRYPTO_EddsaPublicKey *nonce);
-
-
 /**
- * Obtain an order claim nonce from a @a cmd.
- *
- * @param cmd command to extract the trait from.
- * @param index which nonce to pick if @a
- *        cmd has multiple on offer
- * @param[out] nonce set to the wanted data.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_claim_nonce (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct GNUNET_CRYPTO_EddsaPublicKey **nonce);
-
-
-/**
- * Obtain a reference to a proposal command.  Any command that
- * works with proposals, might need to offer their reference to
- * it.  Notably, the "pay" command, offers its proposal reference
- * to the "pay abort" command as the latter needs to reconstruct
- * the same data needed by the former in order to use the "pay
- * abort" API.
- *
- * @param cmd command to extract the trait from.
- * @param index which reference to pick if @a cmd has multiple
- *        on offer.
- * @param[out] proposal_reference set to the wanted reference.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_proposal_reference (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const char **proposal_reference);
-
-/**
- * Offer a proposal reference.
- *
- * @param index which reference to offer if there are
- *        multiple on offer.
- * @param proposal_reference pointer to the reference to offer.
- *
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_proposal_reference (unsigned int index,
-                                             const char *proposal_reference);
-
-/**
- * Offer a coin reference.
- *
- * @param index which reference to offer if there are
- *        multiple on offer.
- * @param coin_reference set to the offered reference.
- *
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_coin_reference (unsigned int index,
-                                         const char *coin_reference);
-
-/**
- * Obtain a reference to any command that can provide coins as
- * traits.
- *
- * @param cmd command to extract trait from
- * @param index which reference to pick if @a cmd has multiple
- *        on offer
- * @param[out] coin_reference set to the wanted reference.
- *        NOTE: a _single_ reference can contain
- *        _multiple_ instances, using semi-colon as separator.
- *        For example, a _single_ reference can be this:
- *        "coin-ref-1", or even this: "coin-ref-1;coin-ref-2".
- *        The "pay" command contains functions that can parse
- *        such format.
+ * Run a command to fetch the KYC status of a merchant.
  *
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_coin_reference (const struct TALER_TESTING_Command 
*cmd,
-                                        unsigned int index,
-                                        const char **coin_reference);
-
-
-/**
- * Obtain planchet secrets from a @a cmd.
- *
- * @param cmd command to extract trait from.
- * @param index index of the trait.
- * @param[out] planchet_secrets set to the wanted secrets.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_planchet_secrets (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_PlanchetSecretsP **planchet_secrets);
-
-
-/**
- * Offer planchet secrets.
- *
- * @param index of the trait.
- * @param planchet_secrets set to the offered secrets.
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_planchet_secrets (
-  unsigned int index,
-  const struct TALER_PlanchetSecretsP *planchet_secrets);
-
-
-/**
- * Offer tip id.
- *
- * @param index which tip id to offer if there are
- *        multiple on offer.
- * @param tip_id set to the offered tip id.
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_tip_id (unsigned int index,
-                                 const struct GNUNET_HashCode *tip_id);
-
-
-/**
- * Obtain tip id from a @a cmd.
- *
- * @param cmd command to extract the trait from.
- * @param index which tip id to pick if @a
- *        cmd has multiple on offer
- * @param[out] tip_id set to the wanted data.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_tip_id (const struct TALER_TESTING_Command *cmd,
-                                unsigned int index,
-                                const struct GNUNET_HashCode **tip_id);
-
-
-/**
- * Offer contract terms hash code.
- *
- * @param index which hashed contract terms to
- *        offer if there are multiple on offer
- * @param h_contract_terms set to the offered hashed
- *        contract terms.
- * @return the trait
+ * @param label the command label
+ * @param merchant_url base URL of the merchant
+ * @param instance_id instance to use, NULL if instance is part of @a 
merchant_url
+ * @param h_wire_ref label of command with a merchant wire hash trait
+ *        of the bank acount to check KYC for; NULL to check all accounts
+ * @param exchange_url base URL of the exchange to check KYC status for
+ * @param expected_http_status expected HTTP status
+ * @return the command
  */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_h_contract_terms (
-  unsigned int index,
-  const struct GNUNET_HashCode *h_contract_terms);
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_kyc_get (const char *label,
+                                    const char *merchant_url,
+                                    const char *instance_id,
+                                    const char *h_wire_ref,
+                                    const char *exchange_url,
+                                    unsigned int expected_http_status);
 
 
-/**
- * Obtain contract terms hash from a @a cmd.
- *
- * @param cmd command to extract the trait from.
- * @param index index number of the trait to fetch.
- * @param[out] h_contract_terms set to the wanted data.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_h_contract_terms (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct GNUNET_HashCode **h_contract_terms);
-
-/**
- * Offer refund entry.
- *
- * @param index index number of the trait to offer.
- * @param refund_entry set to the offered refund entry.
- * @return the trait
- */
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_refund_entry ( // FIXME: rename: entry->detail
-  unsigned int index,
-  const struct TALER_MERCHANT_RefundDetail *refund_entry);
+/* ****** Specific traits supported by this component ******* */
 
 
 /**
- * Obtain refund entry from a @a cmd.
- *
- * @param cmd command to extract the trait from.
- * @param index the trait index.
- * @param[out] refund_entry set to the wanted data.
- * @return #GNUNET_OK on success
- */
-int
-TALER_TESTING_get_trait_refund_entry ( // FIXME: rename: entry->detail
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct TALER_MERCHANT_RefundDetail **refund_entry);
+ * Call #op on all simple traits.
+ */
+// FIXME: rename: refund_entry->refund_detail
+#define TALER_MERCHANT_TESTING_SIMPLE_TRAITS(op) \
+  op (claim_nonce, const struct GNUNET_CRYPTO_EddsaPublicKey) \
+  op (tip_id, const struct GNUNET_HashCode) \
+  op (instance_name, const char *) \
+  op (instance_id, const char *) \
+  op (address, const json_t) \
+  op (product_description, const char *) \
+  op (product_image, const char *) \
+  op (product_stock, const int64_t) \
+  op (product_unit, const char *) \
+  op (product_id, const char *) \
+  op (reason, const char *) \
+  op (lock_uuid, const char *) \
+  op (auth_token, const char *) \
+  op (paths_length, const uint32_t) \
+  op (payto_length, const uint32_t) \
+  op (num_planchets, const uint32_t) \
+  op (i18n_description, const json_t) \
+  op (taxes, const json_t)      \
+  op (fee, const struct TALER_Amount) \
+  op (max_wire_fee, const struct TALER_Amount) \
+  op (max_deposit_fee, const struct TALER_Amount) \
+  op (wire_fee_amortization, const uint32_t) \
+  op (jurisdiction, const json_t) \
+  op (wire_delay, const struct GNUNET_TIME_Relative) \
+  op (pay_delay, const struct GNUNET_TIME_Relative) \
+  op (refund_entry, const struct TALER_MERCHANT_RefundDetail) \
+  op (order_terms, const json_t) \
+  op (h_contract_terms, const struct TALER_PrivateContractHash) \
+  op (h_wire, const struct TALER_MerchantWireHash) \
+  op (proposal_reference, const char *)
+
+
+/**
+ * Call #op on all indexed traits.
+ */
+#define TALER_MERCHANT_TESTING_INDEXED_TRAITS(op) \
+  op (coin_reference, const char *) \
+  op (paths, const char *) \
+  op (payto_uris, const char *) \
+  op (amounts, const struct TALER_Amount) \
+  op (planchet_secrets, const struct TALER_PlanchetSecretsP)
+
+
+TALER_MERCHANT_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_DECL_SIMPLE_TRAIT)
+TALER_MERCHANT_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_DECL_INDEXED_TRAIT)
 
 
 #endif
diff --git a/src/include/taler_merchantdb_plugin.h 
b/src/include/taler_merchantdb_plugin.h
index 4ba2dade..19e59812 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -41,7 +41,7 @@ struct TALER_MERCHANTDB_AccountDetails
   /**
    * Hash of the wire details (@e payto_uri and @e salt).
    */
-  struct GNUNET_HashCode h_wire;
+  struct TALER_MerchantWireHash h_wire;
 
   /**
    * Salt value used for hashing @e payto_uri.
@@ -396,7 +396,7 @@ typedef void
 typedef void
 (*TALER_MERCHANTDB_KycCallback)(
   void *cls,
-  const struct GNUNET_HashCode *h_wire,
+  const struct TALER_MerchantWireHash *h_wire,
   uint64_t exchange_kyc_serial,
   const char *payto_uri,
   const char *exchange_url,
@@ -582,7 +582,7 @@ typedef void
   void *cls,
   uint64_t deposit_serial,
   const char *exchange_url,
-  const struct GNUNET_HashCode *h_wire,
+  const struct TALER_MerchantWireHash *h_wire,
   const struct TALER_Amount *amount_with_fee,
   const struct TALER_Amount *deposit_fee,
   const struct TALER_CoinSpendPublicKeyP *coin_pub);
@@ -660,7 +660,7 @@ typedef void
   const struct TALER_Amount *deposit_fee,
   const struct TALER_Amount *refund_fee,
   const struct TALER_Amount *wire_fee,
-  const struct GNUNET_HashCode *h_wire,
+  const struct TALER_MerchantWireHash *h_wire,
   struct GNUNET_TIME_Absolute deposit_timestamp,
   struct GNUNET_TIME_Absolute refund_deadline,
   const struct TALER_ExchangeSignatureP *exchange_sig,
@@ -967,7 +967,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*inactivate_account)(void *cls,
                         const char *merchant_id,
-                        const struct GNUNET_HashCode *h_wire);
+                        const struct TALER_MerchantWireHash *h_wire);
 
 
   /**
@@ -981,7 +981,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*activate_account)(void *cls,
                       const char *merchant_id,
-                      const struct GNUNET_HashCode *h_wire);
+                      const struct TALER_MerchantWireHash *h_wire);
 
 
   /**
@@ -1000,7 +1000,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*account_kyc_get_status)(void *cls,
                             const char *merchant_id,
-                            const struct GNUNET_HashCode *h_wire,
+                            const struct TALER_MerchantWireHash *h_wire,
                             const char *exchange_url,
                             TALER_MERCHANTDB_KycCallback kyc_cb,
                             void *kyc_cb_cls);
@@ -1022,7 +1022,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*account_kyc_set_status)(void *cls,
                             const char *merchant_id,
-                            const struct GNUNET_HashCode *h_wire,
+                            const struct TALER_MerchantWireHash *h_wire,
                             const char *exchange_url,
                             uint64_t exchange_kyc_serial,
                             const struct TALER_ExchangeSignatureP 
*exchange_sig,
@@ -1379,7 +1379,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*lookup_deposits)(void *cls,
                      const char *instance_id,
-                     const struct GNUNET_HashCode *h_contract_terms,
+                     const struct TALER_PrivateContractHash *h_contract_terms,
                      TALER_MERCHANTDB_DepositsCallback cb,
                      void *cb_cls);
 
@@ -1427,14 +1427,14 @@ struct TALER_MERCHANTDB_Plugin
   (*insert_deposit)(void *cls,
                     const char *instance_id,
                     struct GNUNET_TIME_Absolute deposit_timestamp,
-                    const struct GNUNET_HashCode *h_contract_terms,
+                    const struct TALER_PrivateContractHash *h_contract_terms,
                     const struct TALER_CoinSpendPublicKeyP *coin_pub,
                     const char *exchange_url,
                     const struct TALER_Amount *amount_with_fee,
                     const struct TALER_Amount *deposit_fee,
                     const struct TALER_Amount *refund_fee,
                     const struct TALER_Amount *wire_fee,
-                    const struct GNUNET_HashCode *h_wire,
+                    const struct TALER_MerchantWireHash *h_wire,
                     const struct TALER_ExchangeSignatureP *exchange_sig,
                     const struct TALER_ExchangePublicKeyP *exchange_pub);
 
@@ -1452,7 +1452,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*lookup_refunds)(void *cls,
                     const char *instance_id,
-                    const struct GNUNET_HashCode *h_contract_terms,
+                    const struct TALER_PrivateContractHash *h_contract_terms,
                     TALER_MERCHANTDB_RefundCallback rc,
                     void *rc_cls);
 
@@ -1471,7 +1471,8 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*mark_contract_paid)(void *cls,
                         const char *instance_id,
-                        const struct GNUNET_HashCode *h_contract_terms,
+                        const struct
+                        TALER_PrivateContractHash *h_contract_terms,
                         const char *session_id);
 
 
@@ -1493,7 +1494,7 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*refund_coin)(void *cls,
                  const char *instance_id,
-                 const struct GNUNET_HashCode *h_contract_terms,
+                 const struct TALER_PrivateContractHash *h_contract_terms,
                  struct GNUNET_TIME_Absolute refund_timestamp,
                  const struct TALER_CoinSpendPublicKeyP *coin_pub,
                  const char *reason);
@@ -1513,7 +1514,7 @@ struct TALER_MERCHANTDB_Plugin
   (*lookup_order_status)(void *cls,
                          const char *instance_id,
                          const char *order_id,
-                         struct GNUNET_HashCode *h_contract_terms,
+                         struct TALER_PrivateContractHash *h_contract_terms,
                          bool *paid);
 
   /**
@@ -1532,7 +1533,8 @@ struct TALER_MERCHANTDB_Plugin
                                    const char *instance_id,
                                    uint64_t order_serial,
                                    char **order_id,
-                                   struct GNUNET_HashCode *h_contract_terms,
+                                   struct TALER_PrivateContractHash *
+                                   h_contract_terms,
                                    bool *paid);
 
 
@@ -1655,7 +1657,8 @@ struct TALER_MERCHANTDB_Plugin
   enum GNUNET_DB_QueryStatus
   (*lookup_refunds_detailed)(void *cls,
                              const char *instance_id,
-                             const struct GNUNET_HashCode *h_contract_terms,
+                             const struct
+                             TALER_PrivateContractHash *h_contract_terms,
                              TALER_MERCHANTDB_RefundDetailCallback rc,
                              void *rc_cls);
 
@@ -1849,7 +1852,7 @@ struct TALER_MERCHANTDB_Plugin
   (*lookup_deposits_by_contract_and_coin)(
     void *cls,
     const char *instance_id,
-    const struct GNUNET_HashCode *h_contract_terms,
+    const struct TALER_PrivateContractHash *h_contract_terms,
     const struct TALER_CoinSpendPublicKeyP *coin_pub,
     TALER_MERCHANTDB_CoinDepositCallback cb,
     void *cb_cls);
@@ -2191,7 +2194,7 @@ struct TALER_MERCHANTDB_Plugin
                    char **exchange_url,
                    struct TALER_ReservePrivateKeyP *reserve_priv,
                    unsigned int sigs_length,
-                   struct GNUNET_CRYPTO_RsaSignature *sigs[]);
+                   struct TALER_BlindedDenominationSignature sigs[]);
 
 
   /**
@@ -2315,7 +2318,7 @@ struct TALER_MERCHANTDB_Plugin
     void *cls,
     const struct GNUNET_HashCode *pickup_id,
     uint32_t offset,
-    const struct GNUNET_CRYPTO_RsaSignature *blind_sig);
+    const struct TALER_BlindedDenominationSignature *blind_sig);
 
 };
 
diff --git a/src/lib/merchant_api_get_kyc.c b/src/lib/merchant_api_get_kyc.c
index 816b3cc0..302eb718 100644
--- a/src/lib/merchant_api_get_kyc.c
+++ b/src/lib/merchant_api_get_kyc.c
@@ -78,9 +78,68 @@ parse_kyc (struct TALER_MERCHANT_KycGetHandle *kyc,
            json_t *pends,
            json_t *touts)
 {
-  // FIXME...
-  GNUNET_break (0);
-  return GNUNET_SYSERR;
+  unsigned int num_pends = json_array_size (pends);
+  unsigned int num_touts = json_array_size (touts);
+  struct TALER_MERCHANT_AccountKycRedirectDetail pending_kycs[GNUNET_NZL (
+                                                                num_pends)];
+  struct TALER_MERCHANT_ExchangeKycFailureDetail timeout_kycs[GNUNET_NZL (
+                                                                num_touts)];
+
+  for (unsigned int i = 0; i<num_pends; i++)
+  {
+    struct GNUNET_JSON_Specification spec[] = {
+      GNUNET_JSON_spec_string ("kyc_url",
+                               &pending_kycs[i].kyc_url),
+      GNUNET_JSON_spec_string ("exchange_url",
+                               &pending_kycs[i].exchange_url),
+      GNUNET_JSON_spec_string ("payto_uri",
+                               &pending_kycs[i].payto_uri),
+      GNUNET_JSON_spec_end ()
+    };
+
+    if (GNUNET_OK !=
+        GNUNET_JSON_parse (json_array_get (pends,
+                                           i),
+                           spec,
+                           NULL, NULL))
+    {
+      GNUNET_break (0);
+      return GNUNET_SYSERR;
+    }
+  }
+  for (unsigned int i = 0; i<num_touts; i++)
+  {
+    uint32_t hs;
+    uint32_t ec;
+    struct GNUNET_JSON_Specification spec[] = {
+      GNUNET_JSON_spec_string ("exchange_url",
+                               &timeout_kycs[i].exchange_url),
+      GNUNET_JSON_spec_uint32 ("exchange_code",
+                               &ec),
+      GNUNET_JSON_spec_uint32 ("exchange_http_status",
+                               &hs),
+      GNUNET_JSON_spec_end ()
+    };
+
+    if (GNUNET_OK !=
+        GNUNET_JSON_parse (json_array_get (touts,
+                                           i),
+                           spec,
+                           NULL, NULL))
+    {
+      GNUNET_break (0);
+      return GNUNET_SYSERR;
+    }
+    timeout_kycs[i].exchange_http_status = (unsigned int) hs;
+    timeout_kycs[i].exchange_code = (enum TALER_ErrorCode) ec;
+  }
+  kr->details.kyc_status.pending_kycs = pending_kycs;
+  kr->details.kyc_status.timeout_kycs = timeout_kycs;
+  kr->details.kyc_status.pending_kycs_length = num_pends;
+  kr->details.kyc_status.timeout_kycs_length = num_touts;
+  kyc->cb (kyc->cb_cls,
+           kr);
+  return GNUNET_OK;
 }
 
 
@@ -189,7 +248,7 @@ handle_get_kyc_finished (void *cls,
 static struct TALER_MERCHANT_KycGetHandle *
 kyc_get (struct GNUNET_CURL_Context *ctx,
          char *url,
-         const struct GNUNET_HashCode *h_wire,
+         const struct TALER_MerchantWireHash *h_wire,
          const char *exchange_url,
          struct GNUNET_TIME_Relative timeout,
          TALER_MERCHANT_KycGetCallback cb,
@@ -206,12 +265,15 @@ kyc_get (struct GNUNET_CURL_Context *ctx,
   GNUNET_snprintf (timeout_ms,
                    sizeof (timeout_ms),
                    "%llu",
-                   (unsigned long long) (timeout.rel_value_us / 
GNUNET_TIME_UNIT_MILLISECONDS.rel_value_us));
+                   (unsigned long long) (timeout.rel_value_us
+                                         / GNUNET_TIME_UNIT_MILLISECONDS.
+                                         rel_value_us));
   kyc->url = TALER_url_join (url,
+                             "kyc",
                              "h_wire",
                              NULL == h_wire
                              ? NULL
-                             : GNUNET_h2s_full (h_wire),
+                             : GNUNET_h2s_full (&h_wire->hash),
                              "exchange_url",
                              NULL == exchange_url
                              ? NULL
@@ -248,7 +310,7 @@ kyc_get (struct GNUNET_CURL_Context *ctx,
 struct TALER_MERCHANT_KycGetHandle *
 TALER_MERCHANT_kyc_get (struct GNUNET_CURL_Context *ctx,
                         const char *backend_url,
-                        const struct GNUNET_HashCode *h_wire,
+                        const struct TALER_MerchantWireHash *h_wire,
                         const char *exchange_url,
                         struct GNUNET_TIME_Relative timeout,
                         TALER_MERCHANT_KycGetCallback cb,
@@ -257,7 +319,7 @@ TALER_MERCHANT_kyc_get (struct GNUNET_CURL_Context *ctx,
   char *url;
 
   GNUNET_asprintf (&url,
-                   "%sprivate/kyc",
+                   "%sprivate/",
                    backend_url);
   return kyc_get (ctx,
                   url,
@@ -273,7 +335,7 @@ struct TALER_MERCHANT_KycGetHandle *
 TALER_MERCHANT_management_kyc_get (struct GNUNET_CURL_Context *ctx,
                                    const char *backend_url,
                                    const char *instance_id,
-                                   const struct GNUNET_HashCode *h_wire,
+                                   const struct TALER_MerchantWireHash *h_wire,
                                    const char *exchange_url,
                                    struct GNUNET_TIME_Relative timeout,
                                    TALER_MERCHANT_KycGetCallback cb,
@@ -282,7 +344,7 @@ TALER_MERCHANT_management_kyc_get (struct 
GNUNET_CURL_Context *ctx,
   char *url;
 
   GNUNET_asprintf (&url,
-                   "%smanagement/instances/%s/kyc",
+                   "%smanagement/instances/%s/",
                    backend_url,
                    instance_id);
   return kyc_get (ctx,
diff --git a/src/lib/merchant_api_get_orders.c 
b/src/lib/merchant_api_get_orders.c
index 441b5ff8..27e5bd1b 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -70,7 +70,7 @@ struct TALER_MERCHANT_OrdersGetHandle
  * @param ogh operation handle
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 parse_orders (const json_t *ia,
               struct TALER_MERCHANT_OrdersGetHandle *ogh)
 {
@@ -91,7 +91,7 @@ parse_orders (const json_t *ia,
       GNUNET_JSON_spec_uint64 ("row_id",
                                &ie->order_serial),
       TALER_JSON_spec_amount_any ("amount",
-                              &ie->amount),
+                                  &ie->amount),
       GNUNET_JSON_spec_string ("summary",
                                &ie->summary),
       GNUNET_JSON_spec_bool ("refundable",
diff --git a/src/lib/merchant_api_post_order_abort.c 
b/src/lib/merchant_api_post_order_abort.c
index 47df8ec4..e179ade5 100644
--- a/src/lib/merchant_api_post_order_abort.c
+++ b/src/lib/merchant_api_post_order_abort.c
@@ -44,7 +44,7 @@ struct TALER_MERCHANT_OrderAbortHandle
   /**
    * Hash of the contract.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Public key of the merchant.
@@ -326,7 +326,7 @@ TALER_MERCHANT_order_abort (struct GNUNET_CURL_Context *ctx,
                             const char *merchant_url,
                             const char *order_id,
                             const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                            const struct GNUNET_HashCode *h_contract,
+                            const struct TALER_PrivateContractHash *h_contract,
                             unsigned int num_coins,
                             const struct TALER_MERCHANT_AbortCoin coins[],
                             TALER_MERCHANT_AbortCallback cb,
diff --git a/src/lib/merchant_api_post_order_claim.c 
b/src/lib/merchant_api_post_order_claim.c
index 442185b5..a933226b 100644
--- a/src/lib/merchant_api_post_order_claim.c
+++ b/src/lib/merchant_api_post_order_claim.c
@@ -87,7 +87,7 @@ handle_post_order_claim_finished (void *cls,
   struct TALER_MERCHANT_OrderClaimHandle *och = cls;
   json_t *contract_terms;
   struct TALER_MerchantSignatureP sig;
-  struct GNUNET_HashCode hash;
+  struct TALER_PrivateContractHash hash;
   const json_t *json = response;
   struct GNUNET_JSON_Specification spec[] = {
     GNUNET_JSON_spec_json ("contract_terms",
diff --git a/src/lib/merchant_api_post_order_paid.c 
b/src/lib/merchant_api_post_order_paid.c
index cb3a8379..8e9cf9ac 100644
--- a/src/lib/merchant_api_post_order_paid.c
+++ b/src/lib/merchant_api_post_order_paid.c
@@ -165,7 +165,7 @@ TALER_MERCHANT_order_paid (
   const char *merchant_url,
   const char *order_id,
   const char *session_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   const struct TALER_MerchantSignatureP *merchant_sig,
   TALER_MERCHANT_OrderPaidCallback paid_cb,
   void *paid_cb_cls)
diff --git a/src/lib/merchant_api_post_order_pay.c 
b/src/lib/merchant_api_post_order_pay.c
index e5d8cb5e..08f041d4 100644
--- a/src/lib/merchant_api_post_order_pay.c
+++ b/src/lib/merchant_api_post_order_pay.c
@@ -81,7 +81,7 @@ struct TALER_MERCHANT_OrderPayHandle
    * Hash of the contract we are paying, set
    * if @e am_wallet is true.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * Public key of the merchant (instance) being paid, set
@@ -119,8 +119,8 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin 
*pc,
 {
   struct TALER_Amount spent;
   struct TALER_Amount spent_plus_contrib;
-  struct GNUNET_HashCode h_denom_pub;
-  struct GNUNET_HashCode h_denom_pub_pc;
+  struct TALER_DenominationHash h_denom_pub;
+  struct TALER_DenominationHash h_denom_pub_pc;
 
   if (GNUNET_OK !=
       TALER_EXCHANGE_verify_coin_history (NULL, /* do not verify fees */
@@ -143,8 +143,8 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin 
*pc,
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  GNUNET_CRYPTO_rsa_public_key_hash (pc->denom_pub.rsa_public_key,
-                                     &h_denom_pub_pc);
+  TALER_denom_pub_hash (&pc->denom_pub,
+                        &h_denom_pub_pc);
   if ( (-1 != TALER_amount_cmp (&pc->denom_value,
                                 &spent_plus_contrib)) &&
        (0 != GNUNET_memcmp (&h_denom_pub,
@@ -442,7 +442,7 @@ TALER_MERCHANT_order_pay_frontend (
     json_t *j_coin;
     const struct TALER_MERCHANT_PaidCoin *pc = &coins[i];
     struct TALER_Amount fee;
-    struct GNUNET_HashCode denom_hash;
+    struct TALER_DenominationHash denom_hash;
 
     if (0 >
         TALER_amount_subtract (&fee,
@@ -478,8 +478,8 @@ TALER_MERCHANT_order_pay_frontend (
       }
     }
 
-    GNUNET_CRYPTO_rsa_public_key_hash (pc->denom_pub.rsa_public_key,
-                                       &denom_hash);
+    TALER_denom_pub_hash (&pc->denom_pub,
+                          &denom_hash);
     /* create JSON for this coin */
     j_coin = GNUNET_JSON_PACK (
       TALER_JSON_pack_amount ("contribution",
@@ -490,8 +490,8 @@ TALER_MERCHANT_order_pay_frontend (
                                pc->exchange_url),
       GNUNET_JSON_pack_data_auto ("h_denom",
                                   &denom_hash),
-      TALER_JSON_pack_denomination_signature ("ub_sig",
-                                              &pc->denom_sig),
+      TALER_JSON_pack_denom_sig ("ub_sig",
+                                 &pc->denom_sig),
       GNUNET_JSON_pack_data_auto ("coin_sig",
                                   &pc->coin_sig));
     if (0 !=
@@ -571,7 +571,8 @@ struct TALER_MERCHANT_OrderPayHandle *
 TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
                           const char *merchant_url,
                           const char *session_id,
-                          const struct GNUNET_HashCode *h_contract_terms,
+                          const struct
+                          TALER_PrivateContractHash *h_contract_terms,
                           const struct TALER_Amount *amount,
                           const struct TALER_Amount *max_fee,
                           const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -579,7 +580,7 @@ TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
                           struct GNUNET_TIME_Absolute timestamp,
                           struct GNUNET_TIME_Absolute refund_deadline,
                           struct GNUNET_TIME_Absolute pay_deadline,
-                          const struct GNUNET_HashCode *h_wire,
+                          const struct TALER_MerchantWireHash *h_wire,
                           const char *order_id,
                           unsigned int num_coins,
                           const struct TALER_MERCHANT_PayCoin coins[],
@@ -599,27 +600,14 @@ TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
 
   {
     struct TALER_MERCHANT_PaidCoin pc[num_coins];
-    struct TALER_DepositRequestPS dr = {
-      .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT),
-      .purpose.size = htonl (sizeof (dr)),
-      .h_contract_terms = *h_contract_terms,
-      .h_wire = *h_wire,
-      .wallet_timestamp = GNUNET_TIME_absolute_hton (timestamp),
-      .refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline),
-      .merchant = *merchant_pub
-    };
 
     for (unsigned int i = 0; i<num_coins; i++)
     {
       const struct TALER_MERCHANT_PayCoin *coin = &coins[i]; // coin priv.
       struct TALER_MERCHANT_PaidCoin *p = &pc[i]; // coin pub.
       struct TALER_Amount fee;
+      struct TALER_DenominationHash h_denom_pub;
 
-      /* prepare 'dr' for this coin to generate coin signature */
-      GNUNET_CRYPTO_eddsa_key_get_public (&coin->coin_priv.eddsa_priv,
-                                          &dr.coin_pub.eddsa_pub);
-      TALER_amount_hton (&dr.amount_with_fee,
-                         &coin->amount_with_fee);
       if (0 >
           TALER_amount_subtract (&fee,
                                  &coin->amount_with_fee,
@@ -630,17 +618,24 @@ TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
         GNUNET_break (0);
         return NULL;
       }
-      TALER_amount_hton (&dr.deposit_fee,
-                         &fee);
-      GNUNET_CRYPTO_rsa_public_key_hash (coin->denom_pub.rsa_public_key,
-                                         &dr.h_denom_pub);
-      GNUNET_CRYPTO_eddsa_sign (&coin->coin_priv.eddsa_priv,
-                                &dr,
-                                &p->coin_sig.eddsa_signature);
+      TALER_denom_pub_hash (&coin->denom_pub,
+                            &h_denom_pub);
+      TALER_wallet_deposit_sign (&coin->amount_with_fee,
+                                 &fee,
+                                 h_wire,
+                                 h_contract_terms,
+                                 NULL /* h_extensions! */,
+                                 &h_denom_pub,
+                                 timestamp,
+                                 merchant_pub,
+                                 refund_deadline,
+                                 &coin->coin_priv,
+                                 &p->coin_sig);
       p->denom_pub = coin->denom_pub;
       p->denom_sig = coin->denom_sig;
       p->denom_value = coin->denom_value;
-      p->coin_pub = dr.coin_pub;
+      GNUNET_CRYPTO_eddsa_key_get_public (&coin->coin_priv.eddsa_priv,
+                                          &p->coin_pub.eddsa_pub);
       p->amount_with_fee = coin->amount_with_fee;
       p->amount_without_fee = coin->amount_without_fee;
       p->exchange_url = coin->exchange_url;
diff --git a/src/lib/merchant_api_post_order_refund.c 
b/src/lib/merchant_api_post_order_refund.c
index 9829e187..e6104285 100644
--- a/src/lib/merchant_api_post_order_refund.c
+++ b/src/lib/merchant_api_post_order_refund.c
@@ -101,7 +101,7 @@ handle_refund_finished (void *cls,
   case MHD_HTTP_OK:
     {
       const char *taler_refund_uri;
-      struct GNUNET_HashCode h_contract;
+      struct TALER_PrivateContractHash h_contract;
       struct GNUNET_JSON_Specification spec[] = {
         GNUNET_JSON_spec_string ("taler_refund_uri",
                                  &taler_refund_uri),
diff --git a/src/lib/merchant_api_tip_pickup.c 
b/src/lib/merchant_api_tip_pickup.c
index 956e07ab..9d3a27d7 100644
--- a/src/lib/merchant_api_tip_pickup.c
+++ b/src/lib/merchant_api_tip_pickup.c
@@ -50,7 +50,7 @@ struct PlanchetData
   /**
    * Hash of the public key of the coin we are signing.
    */
-  struct GNUNET_HashCode c_hash;
+  struct TALER_CoinPubHash c_hash;
 };
 
 
@@ -101,7 +101,7 @@ static void
 pickup_done_cb (void *cls,
                 const struct TALER_MERCHANT_HttpResponse *hr,
                 unsigned int num_blind_sigs,
-                const struct TALER_MERCHANT_BlindSignature *blind_sigs)
+                const struct TALER_BlindedDenominationSignature *blind_sigs)
 {
   struct TALER_MERCHANT_TipPickupHandle *tp = cls;
 
@@ -117,7 +117,7 @@ pickup_done_cb (void *cls,
   }
   {
     struct TALER_DenominationSignature sigs[num_blind_sigs];
-    int ok;
+    enum GNUNET_GenericReturnValue ok;
 
     ok = GNUNET_OK;
     memset (sigs,
@@ -129,7 +129,7 @@ pickup_done_cb (void *cls,
 
       if (GNUNET_OK !=
           TALER_planchet_to_coin (&tp->planchets[i].pk.key,
-                                  blind_sigs[i].blind_sig,
+                                  &blind_sigs[i],
                                   &tp->planchets[i].ps,
                                   &tp->planchets[i].c_hash,
                                   &fc))
@@ -160,8 +160,7 @@ pickup_done_cb (void *cls,
               NULL);
     }
     for (unsigned int i = 0; i<num_blind_sigs; i++)
-      if (NULL != sigs[i].rsa_signature)
-        GNUNET_CRYPTO_rsa_signature_free (sigs[i].rsa_signature);
+      TALER_denom_sig_free (&sigs[i]);
   }
   TALER_MERCHANT_tip_pickup_cancel (tp);
 }
@@ -210,8 +209,8 @@ TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx,
   for (unsigned int i = 0; i<num_planchets; i++)
   {
     tp->planchets[i].pk = *pds[i].pk;
-    tp->planchets[i].pk.key.rsa_public_key
-      = GNUNET_CRYPTO_rsa_public_key_dup (pds[i].pk->key.rsa_public_key);
+    TALER_denom_pub_deep_copy (&tp->planchets[i].pk.key,
+                               &pds[i].pk->key);
   }
   tp->cb = pickup_cb;
   tp->cb_cls = pickup_cb_cls;
@@ -238,7 +237,7 @@ void
 TALER_MERCHANT_tip_pickup_cancel (struct TALER_MERCHANT_TipPickupHandle *tp)
 {
   for (unsigned int i = 0; i<tp->num_planchets; i++)
-    GNUNET_CRYPTO_rsa_public_key_free (tp->planchets[i].pk.key.rsa_public_key);
+    TALER_denom_pub_free (&tp->planchets[i].pk.key);
   GNUNET_array_grow (tp->planchets,
                      tp->num_planchets,
                      0);
diff --git a/src/lib/merchant_api_tip_pickup2.c 
b/src/lib/merchant_api_tip_pickup2.c
index 38ad77d8..ab5418f2 100644
--- a/src/lib/merchant_api_tip_pickup2.c
+++ b/src/lib/merchant_api_tip_pickup2.c
@@ -115,14 +115,14 @@ check_ok (struct TALER_MERCHANT_TipPickup2Handle *tpo,
     return GNUNET_SYSERR;
   }
   {
-    struct TALER_MERCHANT_BlindSignature mblind_sigs[ja_len];
-    struct GNUNET_CRYPTO_RsaSignature *blind_sigs[ja_len];
+    struct TALER_BlindedDenominationSignature mblind_sigs[ja_len];
 
     for (unsigned int i = 0; i<ja_len; i++)
     {
       json_t *pj = json_array_get (ja, i);
       struct GNUNET_JSON_Specification ispec[] = {
-        GNUNET_JSON_spec_rsa_signature ("blind_sig", &blind_sigs[i]),
+        TALER_JSON_spec_blinded_denom_sig ("blind_sig",
+                                           &mblind_sigs[i]),
         GNUNET_JSON_spec_end ()
       };
 
@@ -135,14 +135,13 @@ check_ok (struct TALER_MERCHANT_TipPickup2Handle *tpo,
         GNUNET_JSON_parse_free (spec);
         return GNUNET_SYSERR;
       }
-      mblind_sigs[i].blind_sig = blind_sigs[i];
     }
     tpo->cb (tpo->cb_cls,
              &hr,
              ja_len,
              mblind_sigs);
     for (unsigned int i = 0; i<ja_len; i++)
-      GNUNET_CRYPTO_rsa_signature_free (blind_sigs[i]);
+      TALER_blinded_denom_sig_free (&mblind_sigs[i]);
     tpo->cb = NULL; /* do not call twice */
   }
   GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_wallet_get_order.c 
b/src/lib/merchant_api_wallet_get_order.c
index 06806e0f..2ae9d14f 100644
--- a/src/lib/merchant_api_wallet_get_order.c
+++ b/src/lib/merchant_api_wallet_get_order.c
@@ -215,16 +215,17 @@ handle_wallet_get_order_finished (void *cls,
 
 
 struct TALER_MERCHANT_OrderWalletGetHandle *
-TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context *ctx,
-                                 const char *backend_url,
-                                 const char *order_id,
-                                 const struct GNUNET_HashCode *h_contract,
-                                 struct GNUNET_TIME_Relative timeout,
-                                 const char *session_id,
-                                 const struct TALER_Amount *min_refund,
-                                 bool await_refund_obtained,
-                                 TALER_MERCHANT_OrderWalletGetCallback cb,
-                                 void *cb_cls)
+TALER_MERCHANT_wallet_order_get (
+  struct GNUNET_CURL_Context *ctx,
+  const char *backend_url,
+  const char *order_id,
+  const struct TALER_PrivateContractHash *h_contract,
+  struct GNUNET_TIME_Relative timeout,
+  const char *session_id,
+  const struct TALER_Amount *min_refund,
+  bool await_refund_obtained,
+  TALER_MERCHANT_OrderWalletGetCallback cb,
+  void *cb_cls)
 {
   struct TALER_MERCHANT_OrderWalletGetHandle *owgh;
   unsigned long long tms;
@@ -249,7 +250,7 @@ TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context 
*ctx,
     struct GNUNET_CRYPTO_HashAsciiEncoded h_contract_s;
     char *path;
 
-    GNUNET_CRYPTO_hash_to_enc (h_contract,
+    GNUNET_CRYPTO_hash_to_enc (&h_contract->hash,
                                &h_contract_s);
     GNUNET_snprintf (timeout_ms,
                      sizeof (timeout_ms),
diff --git a/src/lib/merchant_api_wallet_post_order_refund.c 
b/src/lib/merchant_api_wallet_post_order_refund.c
index e2438cba..1ba8b33c 100644
--- a/src/lib/merchant_api_wallet_post_order_refund.c
+++ b/src/lib/merchant_api_wallet_post_order_refund.c
@@ -348,7 +348,7 @@ TALER_MERCHANT_wallet_post_order_refund (
   struct GNUNET_CURL_Context *ctx,
   const char *backend_url,
   const char *order_id,
-  const struct GNUNET_HashCode *h_contract_terms,
+  const struct TALER_PrivateContractHash *h_contract_terms,
   TALER_MERCHANT_WalletRefundCallback cb,
   void *cb_cls)
 {
diff --git a/src/testing/.gitignore b/src/testing/.gitignore
index e3868de6..78124d09 100644
--- a/src/testing/.gitignore
+++ b/src/testing/.gitignore
@@ -10,3 +10,4 @@ 
test_reducer_home/.local/share/taler/exchange-offline/secm_tofus.pub
 test_reducer_home/.local/share/taler/exchange-secmod-eddsa/
 test_reducer_home/.local/share/taler/exchange-secmod-rsa/
 test_reducer_home/
+test_kyc_api
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index 057c7f81..2e3532bd 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -42,6 +42,7 @@ libtalermerchanttesting_la_SOURCES = \
   testing_api_cmd_delete_reserve.c \
   testing_api_cmd_delete_transfer.c \
   testing_api_cmd_forget_order.c \
+  testing_api_cmd_kyc_get.c \
   testing_api_cmd_lock_product.c \
   testing_api_cmd_instance_auth.c \
   testing_api_cmd_merchant_get_order.c \
@@ -63,12 +64,7 @@ libtalermerchanttesting_la_SOURCES = \
   testing_api_cmd_wallet_get_tip.c \
   testing_api_cmd_wallet_post_orders_refund.c \
   testing_api_helpers.c \
-  testing_api_trait_claim_nonce.c \
-  testing_api_trait_merchant_sig.c \
-  testing_api_trait_string.c \
-  testing_api_trait_hash.c \
-  testing_api_trait_planchet.c \
-  testing_api_trait_refund_entry.c
+  testing_api_traits.c
 
 libtalermerchanttesting_la_LIBADD = \
   $(top_srcdir)/src/lib/libtalermerchant.la \
@@ -86,7 +82,8 @@ libtalermerchanttesting_la_LIBADD = \
 
 if HAVE_TALERFAKEBANK
 check_PROGRAMS = \
-  test_merchant_api
+  test_merchant_api \
+  test_kyc_api
 
 if HAVE_TWISTER
 check_PROGRAMS += test_merchant_api_twisted
@@ -138,9 +135,30 @@ test_merchant_api_LDADD = \
   -ljansson \
   $(XLIB)
 
+test_kyc_api_SOURCES = \
+  test_kyc_api.c
+test_kyc_api_LDADD = \
+  libtalermerchanttesting.la \
+  $(top_srcdir)/src/backenddb/libtalermerchantdb.la \
+  $(top_srcdir)/src/lib/libtalermerchant.la \
+  $(LIBGCRYPT_LIBS) \
+  -ltalertesting \
+  -ltalerfakebank \
+  -ltalerbank \
+  -ltalerexchange \
+  -ltalerjson \
+  -ltalerutil \
+  -lgnunetjson \
+  -lgnunetcurl \
+  -lgnunetutil \
+  -ljansson \
+  $(XLIB)
+
 EXTRA_DIST = \
   initialize_taler_system.sh \
-  test_template.conf \
+  test_key_rotation.sh \
+  test_key_rotation.conf \
+  test_kyc_api.conf \
   test_merchant_api.conf \
   test_merchant_api_twisted.conf \
   test_merchant_api_proxy_merchant.conf \
@@ -149,8 +167,7 @@ EXTRA_DIST = \
   test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv \
   test_merchant_api_home/.config/taler/exchange/account-2.json \
   test_merchant.priv \
-  test_key_rotation.sh \
-  test_key_rotation.conf \
+  test_template.conf \
   $(check_SCRIPTS)
 
 
diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c
new file mode 100644
index 00000000..8bb19eab
--- /dev/null
+++ b/src/testing/test_kyc_api.c
@@ -0,0 +1,369 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2014-2021 Taler Systems SA
+
+  TALER is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as
+  published by the Free Software Foundation; either version 3, or
+  (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public
+  License along with TALER; see the file COPYING.  If not, see
+  <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file test_merchant_api.c
+ * @brief testcase to test exchange's HTTP API interface
+ * @author Sree Harsha Totakura <sreeharsha@totakura.in>
+ * @author Christian Grothoff
+ * @author Marcello Stanisci
+ */
+#include "platform.h"
+#include <taler/taler_util.h>
+#include <taler/taler_signatures.h>
+#include <taler/taler_exchange_service.h>
+#include <taler/taler_json_lib.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <microhttpd.h>
+#include <taler/taler_bank_service.h>
+#include <taler/taler_fakebank_lib.h>
+#include <taler/taler_testing_lib.h>
+#include <taler/taler_error_codes.h>
+#include "taler_merchant_testing_lib.h"
+
+
+/**
+ * Configuration file we use.  One (big) configuration is used
+ * for the various components for this test.
+ */
+#define CONFIG_FILE "test_kyc_api.conf"
+
+#define PAYTO_I1 "payto://x-taler-bank/localhost/3"
+
+/**
+ * Exchange base URL.  Could also be taken from config.
+ */
+#define EXCHANGE_URL "http://localhost:8081/";
+
+/**
+ * Payto URI of the customer (payer).
+ */
+static char *payer_payto;
+
+/**
+ * Payto URI of the exchange (escrow account).
+ */
+static char *exchange_payto;
+
+/**
+ * Payto URI of the merchant (receiver).
+ */
+static char *merchant_payto;
+
+/**
+ * Configuration of the bank.
+ */
+static struct TALER_TESTING_BankConfiguration bc;
+
+/**
+ * Configuration of the exchange.
+ */
+static struct TALER_TESTING_ExchangeConfiguration ec;
+
+/**
+ * Merchant base URL.
+ */
+static char *merchant_url;
+
+/**
+ * Merchant instance "i1a" base URL.
+ */
+static char *merchant_url_i1a;
+
+/**
+ * Merchant process.
+ */
+static struct GNUNET_OS_Process *merchantd;
+
+/**
+ * Account number of the exchange at the bank.
+ */
+#define EXCHANGE_ACCOUNT_NAME "2"
+
+/**
+ * Account number of some user.
+ */
+#define USER_ACCOUNT_NAME "62"
+
+/**
+ * Account number of some other user.
+ */
+#define USER_ACCOUNT_NAME2 "63"
+
+/**
+ * Account number used by the merchant
+ */
+#define MERCHANT_ACCOUNT_NAME "3"
+
+
+/**
+ * Execute the taler-exchange-aggregator, closer and transfer commands with
+ * our configuration file.
+ *
+ * @param label label to use for the command.
+ */
+#define CMD_EXEC_AGGREGATOR(label) \
+  TALER_TESTING_cmd_exec_aggregator_with_kyc (label "-aggregator", 
CONFIG_FILE), \
+  TALER_TESTING_cmd_exec_transfer (label "-transfer", CONFIG_FILE)
+
+
+/**
+ * Run wire transfer of funds from some user's account to the
+ * exchange.
+ *
+ * @param label label to use for the command.
+ * @param amount amount to transfer, i.e. "EUR:1"
+ * @param url exchange_url
+ */
+static struct TALER_TESTING_Command
+cmd_transfer_to_exchange (const char *label,
+                          const char *amount)
+{
+  return TALER_TESTING_cmd_admin_add_incoming (label,
+                                               amount,
+                                               &bc.exchange_auth,
+                                               payer_payto);
+}
+
+
+/**
+ * Main function that will tell the interpreter what commands to
+ * run.
+ *
+ * @param cls closure
+ */
+static void
+run (void *cls,
+     struct TALER_TESTING_Interpreter *is)
+{
+  struct TALER_TESTING_Command pay[] = {
+    /**
+     * Move money to the exchange's bank account.
+     */
+    cmd_transfer_to_exchange ("create-reserve-1",
+                              "EUR:10.02"),
+    /**
+     * Make a reserve exist, according to the previous transfer.
+     */
+    TALER_TESTING_cmd_exec_wirewatch ("wirewatch-1",
+                                      CONFIG_FILE),
+    TALER_TESTING_cmd_check_bank_admin_transfer ("check_bank_transfer-2",
+                                                 "EUR:10.02",
+                                                 payer_payto,
+                                                 exchange_payto,
+                                                 "create-reserve-1"),
+    TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-1",
+                                       "create-reserve-1",
+                                       "EUR:5",
+                                       MHD_HTTP_OK),
+    TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-2",
+                                       "create-reserve-1",
+                                       "EUR:5",
+                                       MHD_HTTP_OK),
+    TALER_TESTING_cmd_merchant_get_orders ("get-orders-empty",
+                                           merchant_url,
+                                           MHD_HTTP_OK,
+                                           NULL),
+    /**
+     * Check the reserve is depleted.
+     */
+    TALER_TESTING_cmd_status ("withdraw-status-1",
+                              "create-reserve-1",
+                              "EUR:0",
+                              MHD_HTTP_OK),
+    TALER_TESTING_cmd_merchant_post_orders2 ("create-proposal-1",
+                                             merchant_url,
+                                             MHD_HTTP_OK,
+                                             "1", /* order ID */
+                                             GNUNET_TIME_UNIT_ZERO_ABS,
+                                             GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             true,
+                                             "EUR:5.0",
+                                             "x-taler-bank",
+                                             "",
+                                             "",
+                                             NULL),
+    TALER_TESTING_cmd_merchant_claim_order ("reclaim-1",
+                                            merchant_url,
+                                            MHD_HTTP_OK,
+                                            "create-proposal-1",
+                                            NULL),
+    TALER_TESTING_cmd_merchant_pay_order ("deposit-simple",
+                                          merchant_url,
+                                          MHD_HTTP_OK,
+                                          "create-proposal-1",
+                                          "withdraw-coin-1",
+                                          "EUR:5",
+                                          "EUR:4.99",
+                                          "session-0"),
+    TALER_TESTING_cmd_merchant_post_orders_paid ("verify-order-1-paid",
+                                                 merchant_url,
+                                                 "deposit-simple",
+                                                 "session-1",
+                                                 MHD_HTTP_NO_CONTENT),
+    TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-1"),
+    CMD_EXEC_AGGREGATOR ("run-aggregator"),
+    /* KYC: hence nothing happened at the bank yet: */
+    TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-2"),
+    /* FIXME-#7052: this should ideally not be needed... */
+    TALER_TESTING_cmd_merchant_get_order ("get-order",
+                                          merchant_url,
+                                          "create-proposal-1",
+                                          TALER_MERCHANT_OSC_PAID,
+                                          false,
+                                          MHD_HTTP_OK),
+    TALER_TESTING_cmd_merchant_kyc_get ("kyc-pending",
+                                        merchant_url,
+                                        NULL,
+                                        NULL,
+                                        EXCHANGE_URL,
+                                        MHD_HTTP_ACCEPTED),
+    TALER_TESTING_cmd_proof_kyc ("kyc-do",
+                                 "kyc-pending",
+                                 "pass",
+                                 "state",
+                                 MHD_HTTP_SEE_OTHER),
+    CMD_EXEC_AGGREGATOR ("run-aggregator"),
+    TALER_TESTING_cmd_check_bank_transfer ("check_bank_transfer-498c",
+                                           EXCHANGE_URL,
+                                           "EUR:4.98",
+                                           exchange_payto,
+                                           merchant_payto),
+    TALER_TESTING_cmd_merchant_post_transfer ("post-transfer-1",
+                                              &bc.exchange_auth,
+                                              PAYTO_I1,
+                                              merchant_url,
+                                              "EUR:4.98",
+                                              MHD_HTTP_OK,
+                                              "deposit-simple",
+                                              NULL),
+    TALER_TESTING_cmd_merchant_get_transfers ("get-transfers-1",
+                                              merchant_url,
+                                              PAYTO_I1,
+                                              MHD_HTTP_OK,
+                                              "post-transfer-1",
+                                              NULL),
+    TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-3"),
+    TALER_TESTING_cmd_end ()
+  };
+
+  struct TALER_TESTING_Command commands[] = {
+    /* general setup */
+    TALER_TESTING_cmd_oauth ("start-oauth-service",
+                             6666),
+    TALER_TESTING_cmd_auditor_add ("add-auditor-OK",
+                                   MHD_HTTP_NO_CONTENT,
+                                   false),
+    TALER_TESTING_cmd_wire_add ("add-wire-account",
+                                "payto://x-taler-bank/localhost/2",
+                                MHD_HTTP_NO_CONTENT,
+                                false),
+    TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
+                                              CONFIG_FILE),
+    TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
+                                              CONFIG_FILE,
+                                              "EUR:0.01",
+                                              "EUR:0.01"),
+    TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
+                                                1),
+    TALER_TESTING_cmd_merchant_post_instances ("instance-create-default-setup",
+                                               merchant_url,
+                                               "default",
+                                               PAYTO_I1,
+                                               "EUR",
+                                               MHD_HTTP_NO_CONTENT),
+    TALER_TESTING_cmd_batch ("pay",
+                             pay),
+    TALER_TESTING_cmd_end ()
+  };
+
+  TALER_TESTING_run_with_fakebank (is,
+                                   commands,
+                                   bc.exchange_auth.wire_gateway_url);
+}
+
+
+int
+main (int argc,
+      char *const *argv)
+{
+  unsigned int ret;
+
+  /* These environment variables get in the way... */
+  unsetenv ("XDG_DATA_HOME");
+  unsetenv ("XDG_CONFIG_HOME");
+  GNUNET_log_setup ("test-kyc-api",
+                    "DEBUG",
+                    NULL);
+  if (GNUNET_OK !=
+      TALER_TESTING_prepare_fakebank (CONFIG_FILE,
+                                      "exchange-account-exchange",
+                                      &bc))
+    return 77;
+
+  payer_payto = ("payto://x-taler-bank/localhost/" USER_ACCOUNT_NAME);
+  exchange_payto = ("payto://x-taler-bank/localhost/" EXCHANGE_ACCOUNT_NAME);
+  merchant_payto = ("payto://x-taler-bank/localhost/" MERCHANT_ACCOUNT_NAME);
+
+  if (NULL ==
+      (merchant_url = TALER_TESTING_prepare_merchant (CONFIG_FILE)))
+    return 77;
+
+  GNUNET_asprintf (&merchant_url_i1a,
+                   "%sinstances/i1a/",
+                   merchant_url);
+  TALER_TESTING_cleanup_files (CONFIG_FILE);
+
+  switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
+                                          &ec))
+  {
+  case GNUNET_SYSERR:
+    GNUNET_break (0);
+    return 1;
+  case GNUNET_NO:
+    return 77;
+
+  case GNUNET_OK:
+
+    if (NULL == (merchantd =
+                   TALER_TESTING_run_merchant (CONFIG_FILE,
+                                               merchant_url)))
+      return 1;
+
+    ret = TALER_TESTING_setup_with_exchange (&run,
+                                             NULL,
+                                             CONFIG_FILE);
+
+    GNUNET_OS_process_kill (merchantd, SIGTERM);
+    GNUNET_OS_process_wait (merchantd);
+    GNUNET_OS_process_destroy (merchantd);
+    GNUNET_free (merchant_url);
+
+    if (GNUNET_OK != ret)
+      return 1;
+    break;
+  default:
+    GNUNET_break (0);
+    return 1;
+  }
+  return 0;
+}
+
+
+/* end of test_merchant_api.c */
diff --git a/src/testing/test_merchant_api.conf b/src/testing/test_kyc_api.conf
similarity index 91%
copy from src/testing/test_merchant_api.conf
copy to src/testing/test_kyc_api.conf
index 5f706d63..408d6639 100644
--- a/src/testing/test_merchant_api.conf
+++ b/src/testing/test_kyc_api.conf
@@ -103,6 +103,23 @@ MASTER_PUBLIC_KEY = 
T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
 BASE_URL = "http://localhost:8081/";
 
 
+KYC_MODE = OAUTH2
+
+KYC_WALLET_BALANCE_LIMIT = EUR:1
+
+KYC_WITHDRAW_PERIOD = "31 days"
+
+KYC_WITHDRAW_LIMIT = EUR:20
+
+[exchange-kyc-oauth2]
+
+KYC_OAUTH2_URL = http://localhost:6666/oauth/v2/login
+KYC_INFO_URL = http://localhost:6666/api/user/me
+KYC_OAUTH2_CLIENT_ID = taler-exchange
+KYC_OAUTH2_CLIENT_SECRET = exchange-secret
+KYC_OAUTH2_POST_URL = http://example.com/
+
+
 [exchangedb-postgres]
 CONFIG = "postgres:///talercheck"
 
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index c5f8702e..67dea30f 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -36,6 +36,22 @@
 #include <taler/taler_error_codes.h>
 #include "taler_merchant_testing_lib.h"
 
+
+/**
+ * The 'poll-orders-conclude-1' and other 'conclude'
+ * commands should NOT wait for this timeout!
+ */
+#define POLL_ORDER_TIMEOUT \
+  GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+
+/**
+ * The 'poll-orders-conclude-1x' and other 'conclude'
+ * commands that should (!) wait for this timeout! Hence,
+ * here we use a short value!
+ */
+#define POLL_ORDER_SHORT_TIMEOUT \
+  GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2)
+
 /**
  * Configuration file we use.  One (big) configuration is used
  * for the various components for this test.
@@ -206,6 +222,12 @@ run (void *cls,
                                                PAYTO_I1,
                                                "EUR",
                                                MHD_HTTP_NO_CONTENT),
+    TALER_TESTING_cmd_merchant_kyc_get ("instance-create-kyc-0",
+                                        merchant_url,
+                                        NULL,
+                                        NULL,
+                                        EXCHANGE_URL,
+                                        MHD_HTTP_NO_CONTENT),
     TALER_TESTING_cmd_merchant_post_orders_no_claim ("create-proposal-4",
                                                      merchant_url,
                                                      MHD_HTTP_OK,
@@ -272,7 +294,7 @@ run (void *cls,
                                              MHD_HTTP_NOT_FOUND),
     TALER_TESTING_cmd_poll_orders_start ("poll-orders-1-start",
                                          merchant_url,
-                                         GNUNET_TIME_UNIT_MINUTES),
+                                         POLL_ORDER_TIMEOUT),
     TALER_TESTING_cmd_merchant_claim_order ("claim-order-nx",
                                             merchant_url,
                                             MHD_HTTP_NOT_FOUND,
@@ -361,18 +383,18 @@ run (void *cls,
     TALER_TESTING_cmd_wallet_poll_order_start ("poll-order-wallet-start-1",
                                                merchant_url,
                                                "create-proposal-1",
-                                               GNUNET_TIME_UNIT_MINUTES,
+                                               POLL_ORDER_TIMEOUT,
                                                NULL),
     TALER_TESTING_cmd_wallet_poll_order_start2 ("poll-order-wallet-start-1x",
                                                 merchant_url,
                                                 "create-proposal-1x",
-                                                GNUNET_TIME_UNIT_MINUTES,
-                                                NULL,
+                                                POLL_ORDER_SHORT_TIMEOUT,
+                                                NULL, /* no refund */
                                                 "session-0"),
     TALER_TESTING_cmd_poll_order_start ("poll-order-merchant-1-start",
                                         merchant_url,
                                         "1",
-                                        GNUNET_TIME_UNIT_MINUTES),
+                                        POLL_ORDER_TIMEOUT),
     TALER_TESTING_cmd_merchant_pay_order ("deposit-simple",
                                           merchant_url,
                                           MHD_HTTP_OK,
@@ -388,6 +410,7 @@ run (void *cls,
                                                   MHD_HTTP_OK,
                                                   NULL,
                                                   "poll-order-wallet-start-1"),
+    /* Here we expect to run into a timeout, as we do not pay this one */
     TALER_TESTING_cmd_wallet_poll_order_conclude2 ("poll-order-1x-conclude",
                                                    MHD_HTTP_OK,
                                                    NULL,
@@ -668,7 +691,7 @@ run (void *cls,
                               "EUR:10.02"),
     /**
      * Make a reserve exist, according to the previous transfer.
-     *///
+     */
     cmd_exec_wirewatch ("wirewatch-1r"),
     TALER_TESTING_cmd_check_bank_admin_transfer ("check_bank_transfer-2r",
                                                  "EUR:10.02",
@@ -700,13 +723,13 @@ run (void *cls,
     TALER_TESTING_cmd_wallet_poll_order_start 
("poll-order-wallet-refund-1-low",
                                                merchant_url,
                                                "create-proposal-1r",
-                                               GNUNET_TIME_UNIT_MINUTES,
+                                               POLL_ORDER_TIMEOUT,
                                                "EUR:0.01"),
     TALER_TESTING_cmd_wallet_poll_order_start (
       "poll-order-wallet-refund-1-high",
       merchant_url,
       "create-proposal-1r",
-      GNUNET_TIME_UNIT_MINUTES,
+      POLL_ORDER_TIMEOUT,
       "EUR:0.2"),
     TALER_TESTING_cmd_merchant_pay_order ("pay-for-refund-1r",
                                           merchant_url,
@@ -719,7 +742,7 @@ run (void *cls,
     TALER_TESTING_cmd_poll_order_start ("poll-payment-refund-1",
                                         merchant_url,
                                         "1r", /* proposal name, not cmd ref! */
-                                        GNUNET_TIME_UNIT_MINUTES),
+                                        POLL_ORDER_TIMEOUT),
     TALER_TESTING_cmd_merchant_order_refund ("refund-increase-1r",
                                              merchant_url,
                                              "refund test",
@@ -820,7 +843,7 @@ run (void *cls,
        it, and finally (4) attempt to pick up a refund
        from it without any increasing taking place
        in the first place.
-    *///
+    */
     cmd_transfer_to_exchange ("create-reserve-unincreased-refund",
                               "EUR:5.01"),
     cmd_exec_wirewatch ("wirewatch-unincreased-refund"),
diff --git a/src/testing/testing_api_cmd_abort_order.c 
b/src/testing/testing_api_cmd_abort_order.c
index d515a361..d2e2d357 100644
--- a/src/testing/testing_api_cmd_abort_order.c
+++ b/src/testing/testing_api_cmd_abort_order.c
@@ -28,8 +28,6 @@
 #include "taler_merchant_service.h"
 #include "taler_merchant_testing_lib.h"
 
-#define AMOUNT_WITH_FEE 0
-
 /**
  * State for a " abort" CMD.
  */
@@ -85,19 +83,15 @@ struct AbortState
  * @param[in] coins string specifying coins to add to @a pc,
  *            clobbered in the process
  * @param is interpreter state
- * @param amount_with_fee total amount to be paid for a contract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 build_coins (struct TALER_MERCHANT_AbortCoin **ac,
              unsigned int *nac,
              char *coins,
-             struct TALER_TESTING_Interpreter *is,
-             const char *amount_with_fee)
+             struct TALER_TESTING_Interpreter *is)
 {
-  char *token;
-
-  for (token = strtok (coins, ";");
+  for (char *token = strtok (coins, ";");
        NULL != token;
        token = strtok (NULL, ";"))
   {
@@ -123,6 +117,8 @@ build_coins (struct TALER_MERCHANT_AbortCoin **ac,
     // FIXME: ci not used!?
     {
       const struct TALER_TESTING_Command *coin_cmd;
+      const char **exchange_url;
+
       coin_cmd = TALER_TESTING_interpreter_lookup_command (is,
                                                            token);
       if (NULL == coin_cmd)
@@ -146,15 +142,15 @@ build_coins (struct TALER_MERCHANT_AbortCoin **ac,
                                             &icoin->coin_pub.eddsa_pub);
       }
       GNUNET_assert (GNUNET_OK ==
-                     TALER_TESTING_get_trait_url (coin_cmd,
-                                                  
TALER_TESTING_UT_EXCHANGE_BASE_URL,
-                                                  &icoin->exchange_url));
+                     TALER_TESTING_get_trait_exchange_url (coin_cmd,
+                                                           &exchange_url));
+      icoin->exchange_url = *exchange_url;
       {
         const struct TALER_Amount *denom_value;
-        GNUNET_assert (GNUNET_OK
-                       == TALER_TESTING_get_trait_amount_obj (coin_cmd,
-                                                              0,
-                                                              &denom_value));
+
+        GNUNET_assert (GNUNET_OK ==
+                       TALER_TESTING_get_trait_amount (coin_cmd,
+                                                       &denom_value));
         icoin->amount_with_fee = *denom_value;
       }
 
@@ -230,12 +226,11 @@ abort_run (void *cls,
 {
   struct AbortState *as = cls;
   const struct TALER_TESTING_Command *pay_cmd;
-  const char *proposal_reference;
-  const char *coin_reference;
-  const char *amount_with_fee;
+  const char **proposal_reference;
+  const char **coin_reference;
   const struct TALER_TESTING_Command *proposal_cmd;
   const char *order_id;
-  const struct GNUNET_HashCode *h_proposal;
+  const struct TALER_PrivateContractHash *h_proposal;
   struct TALER_MerchantPublicKeyP merchant_pub;
   struct TALER_Amount total_amount;
   const char *error_name;
@@ -251,7 +246,6 @@ abort_run (void *cls,
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_proposal_reference (pay_cmd,
-                                                  0,
                                                   &proposal_reference))
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK !=
@@ -259,13 +253,8 @@ abort_run (void *cls,
                                               0,
                                               &coin_reference))
     TALER_TESTING_FAIL (is);
-  if (GNUNET_OK !=
-      TALER_TESTING_get_trait_string (pay_cmd,
-                                      AMOUNT_WITH_FEE,
-                                      &amount_with_fee))
-    TALER_TESTING_FAIL (is);
   proposal_cmd = TALER_TESTING_interpreter_lookup_command (is,
-                                                           proposal_reference);
+                                                           
*proposal_reference);
 
   if (NULL == proposal_cmd)
     TALER_TESTING_FAIL (is);
@@ -275,7 +264,6 @@ abort_run (void *cls,
 
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_contract_terms (proposal_cmd,
-                                                0,
                                                 &contract_terms))
       TALER_TESTING_FAIL (is);
     {
@@ -312,15 +300,14 @@ abort_run (void *cls,
     }
   }
 
-  cr = GNUNET_strdup (coin_reference);
+  cr = GNUNET_strdup (*coin_reference);
   abort_coins = NULL;
   nabort_coins = 0;
   if (GNUNET_OK !=
       build_coins (&abort_coins,
                    &nabort_coins,
                    cr,
-                   is,
-                   amount_with_fee))
+                   is))
   {
     GNUNET_array_grow (abort_coins,
                        nabort_coins,
@@ -332,7 +319,6 @@ abort_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (proposal_cmd,
-                                                0,
                                                 &h_proposal))
     TALER_TESTING_FAIL (is);
   as->oah = TALER_MERCHANT_order_abort (is->ctx,
diff --git a/src/testing/testing_api_cmd_claim_order.c 
b/src/testing/testing_api_cmd_claim_order.c
index 3a692a6f..b2c8c6c5 100644
--- a/src/testing/testing_api_cmd_claim_order.c
+++ b/src/testing/testing_api_cmd_claim_order.c
@@ -52,7 +52,7 @@ struct OrderClaimState
   /**
    * Hash over the contract terms. Only set if we got #MHD_HTTP_OK.
    */
-  struct GNUNET_HashCode contract_terms_hash;
+  struct TALER_PrivateContractHash contract_terms_hash;
 
   /**
    * Signature of the merchant. Only set if we got #MHD_HTTP_OK.
@@ -135,7 +135,7 @@ order_claim_cb (void *cls,
                 const struct TALER_MERCHANT_HttpResponse *hr,
                 const json_t *contract_terms,
                 const struct TALER_MerchantSignatureP *sig,
-                const struct GNUNET_HashCode *hash)
+                const struct TALER_PrivateContractHash *hash)
 {
   struct OrderClaimState *pls = cls;
 
@@ -185,7 +185,7 @@ order_claim_run (void *cls,
                  struct TALER_TESTING_Interpreter *is)
 {
   struct OrderClaimState *pls = cls;
-  const char *order_id;
+  const char **order_id;
   const struct GNUNET_CRYPTO_EddsaPublicKey *nonce;
   /* Only used if we do NOT use the nonce/token from traits.  */
   struct GNUNET_CRYPTO_EddsaPublicKey dummy_nonce;
@@ -194,7 +194,7 @@ order_claim_run (void *cls,
   pls->is = is;
   if (NULL != pls->order_id)
   {
-    order_id = pls->order_id;
+    order_id = &pls->order_id;
     GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
                                 &dummy_nonce,
                                 sizeof (dummy_nonce));
@@ -212,7 +212,6 @@ order_claim_run (void *cls,
       TALER_TESTING_FAIL (is);
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_claim_nonce (order_cmd,
-                                             0,
                                              &nonce))
     {
       GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
@@ -222,18 +221,16 @@ order_claim_run (void *cls,
     }
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_claim_token (order_cmd,
-                                             0,
                                              &claim_token))
       claim_token = NULL;
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_order_id (order_cmd,
-                                          0,
                                           &order_id))
       TALER_TESTING_FAIL (is);
   }
   pls->och = TALER_MERCHANT_order_claim (is->ctx,
                                          pls->merchant_url,
-                                         order_id,
+                                         *order_id,
                                          nonce,
                                          claim_token,
                                          &order_claim_cb,
@@ -252,7 +249,7 @@ order_claim_run (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 order_claim_traits (void *cls,
                     const void **ret,
                     const char *trait,
@@ -260,14 +257,10 @@ order_claim_traits (void *cls,
 {
   struct OrderClaimState *pls = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_contract_terms (0,
-                                             pls->contract_terms),
-    TALER_TESTING_make_trait_h_contract_terms (0,
-                                               &pls->contract_terms_hash),
-    TALER_TESTING_make_trait_merchant_sig (0,
-                                           &pls->merchant_sig),
-    TALER_TESTING_make_trait_merchant_pub (0,
-                                           &pls->merchant_pub),
+    TALER_TESTING_make_trait_contract_terms (pls->contract_terms),
+    TALER_TESTING_make_trait_h_contract_terms (&pls->contract_terms_hash),
+    TALER_TESTING_make_trait_merchant_sig (&pls->merchant_sig),
+    TALER_TESTING_make_trait_merchant_pub (&pls->merchant_pub),
     TALER_TESTING_trait_end ()
   };
 
diff --git a/src/testing/testing_api_cmd_delete_reserve.c 
b/src/testing/testing_api_cmd_delete_reserve.c
index d98b688a..65d27fa6 100644
--- a/src/testing/testing_api_cmd_delete_reserve.c
+++ b/src/testing/testing_api_cmd_delete_reserve.c
@@ -128,7 +128,6 @@ delete_reserve_run (void *cls,
     drs->reserve_reference);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_reserve_pub (reserve_cmd,
-                                           0,
                                            &reserve_pub))
     TALER_TESTING_FAIL (is);
 
diff --git a/src/testing/testing_api_cmd_forget_order.c 
b/src/testing/testing_api_cmd_forget_order.c
index 31b24bc0..5e6225d4 100644
--- a/src/testing/testing_api_cmd_forget_order.c
+++ b/src/testing/testing_api_cmd_forget_order.c
@@ -138,12 +138,12 @@ order_forget_run (void *cls,
                   struct TALER_TESTING_Interpreter *is)
 {
   struct OrderForgetState *ofs = cls;
-  const char *order_id;
+  const char **order_id;
 
   ofs->is = is;
   if (NULL != ofs->order_id)
   {
-    order_id = ofs->order_id;
+    order_id = &ofs->order_id;
   }
   else
   {
@@ -156,13 +156,12 @@ order_forget_run (void *cls,
       TALER_TESTING_FAIL (is);
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_order_id (order_cmd,
-                                          0,
                                           &order_id))
       TALER_TESTING_FAIL (is);
   }
   ofs->ofh = TALER_MERCHANT_order_forget (is->ctx,
                                           ofs->merchant_url,
-                                          order_id,
+                                          *order_id,
                                           ofs->paths_length,
                                           ofs->paths,
                                           &order_forget_cb,
@@ -180,7 +179,7 @@ order_forget_run (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 order_forget_traits (void *cls,
                      const void **ret,
                      const char *trait,
@@ -189,11 +188,10 @@ order_forget_traits (void *cls,
   struct OrderForgetState *ofs = cls;
   struct TALER_TESTING_Trait traits[ofs->paths_length + 2];
 
-  traits[0] = TALER_TESTING_make_trait_uint32 (0,
-                                               &ofs->paths_length);
+  traits[0] = TALER_TESTING_make_trait_paths_length (&ofs->paths_length);
   for (unsigned int i = 0; i < ofs->paths_length; ++i)
-    traits[i + 1] = TALER_TESTING_make_trait_string (i,
-                                                     ofs->paths[i]);
+    traits[i + 1] = TALER_TESTING_make_trait_paths (i,
+                                                    &ofs->paths[i]);
   traits[ofs->paths_length + 1] = TALER_TESTING_trait_end ();
 
   return TALER_TESTING_get_trait (traits,
diff --git a/src/testing/testing_api_cmd_get_instance.c 
b/src/testing/testing_api_cmd_get_instance.c
index 0bd736f1..f328cc75 100644
--- a/src/testing/testing_api_cmd_get_instance.c
+++ b/src/testing/testing_api_cmd_get_instance.c
@@ -131,30 +131,29 @@ get_instance_cb (void *cls,
   {
   case MHD_HTTP_OK:
     {
-      const char *name;
+      const char **name;
 
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_string (instance_cmd,
-                                          0,
-                                          &name))
+          TALER_TESTING_get_trait_instance_name (instance_cmd,
+                                                 &name))
         TALER_TESTING_interpreter_fail (gis->is);
       if (0 != strcmp (details->name,
-                       name))
+                       *name))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Instance name does not match: Got `%s', wanted `%s'\n",
                     details->name,
-                    name);
+                    *name);
         TALER_TESTING_interpreter_fail (gis->is);
         return;
       }
     }
     {
-      const struct json_t *address;
+      const json_t *address;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_json (instance_cmd,
-                                        0,
-                                        &address))
+          TALER_TESTING_get_trait_address (instance_cmd,
+                                           &address))
         TALER_TESTING_interpreter_fail (gis->is);
       if (1 != json_equal (details->address,
                            address))
@@ -167,10 +166,10 @@ get_instance_cb (void *cls,
     }
     {
       const struct json_t *jurisdiction;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_json (instance_cmd,
-                                        1,
-                                        &jurisdiction))
+          TALER_TESTING_get_trait_jurisdiction (instance_cmd,
+                                                &jurisdiction))
         TALER_TESTING_interpreter_fail (gis->is);
       if (1 != json_equal (details->jurisdiction,
                            jurisdiction))
@@ -183,10 +182,10 @@ get_instance_cb (void *cls,
     }
     {
       const struct TALER_Amount *default_max_wire_fee;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_amount_obj (instance_cmd,
-                                              0,
-                                              &default_max_wire_fee))
+          TALER_TESTING_get_trait_max_wire_fee (instance_cmd,
+                                                &default_max_wire_fee))
         TALER_TESTING_interpreter_fail (gis->is);
       if ((GNUNET_OK != TALER_amount_cmp_currency (
              details->default_max_wire_fee,
@@ -202,10 +201,11 @@ get_instance_cb (void *cls,
     }
     {
       const uint32_t *default_wire_fee_amortization;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_uint32 (instance_cmd,
-                                          0,
-                                          &default_wire_fee_amortization))
+          TALER_TESTING_get_trait_wire_fee_amortization (instance_cmd,
+                                                         &
+                                                         
default_wire_fee_amortization))
         TALER_TESTING_interpreter_fail (gis->is);
       if (details->default_wire_fee_amortization !=
           *default_wire_fee_amortization)
@@ -220,9 +220,8 @@ get_instance_cb (void *cls,
       const struct TALER_Amount *default_max_deposit_fee;
 
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_amount_obj (instance_cmd,
-                                              1,
-                                              &default_max_deposit_fee))
+          TALER_TESTING_get_trait_max_deposit_fee (instance_cmd,
+                                                   &default_max_deposit_fee))
         TALER_TESTING_interpreter_fail (gis->is);
       if ( (GNUNET_OK !=
             TALER_amount_cmp_currency (
@@ -242,9 +241,8 @@ get_instance_cb (void *cls,
       const struct GNUNET_TIME_Relative *default_wire_transfer_delay;
 
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_relative_time (instance_cmd,
-                                                 0,
-                                                 &default_wire_transfer_delay))
+          TALER_TESTING_get_trait_wire_delay (instance_cmd,
+                                              &default_wire_transfer_delay))
         TALER_TESTING_interpreter_fail (gis->is);
       if (details->default_wire_transfer_delay.rel_value_us !=
           default_wire_transfer_delay->rel_value_us)
@@ -258,9 +256,8 @@ get_instance_cb (void *cls,
     {
       const struct GNUNET_TIME_Relative *default_pay_delay;
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_relative_time (instance_cmd,
-                                                 1,
-                                                 &default_pay_delay))
+          TALER_TESTING_get_trait_pay_delay (instance_cmd,
+                                             &default_pay_delay))
         TALER_TESTING_interpreter_fail (gis->is);
       if (details->default_pay_delay.rel_value_us !=
           default_pay_delay->rel_value_us)
diff --git a/src/testing/testing_api_cmd_get_instances.c 
b/src/testing/testing_api_cmd_get_instances.c
index 0e3342e6..8aee04b1 100644
--- a/src/testing/testing_api_cmd_get_instances.c
+++ b/src/testing/testing_api_cmd_get_instances.c
@@ -113,11 +113,11 @@ get_instances_cb (void *cls,
         gis->instances[i]);
 
       {
-        const char *name;
+        const char **name;
+
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (instance_cmd,
-                                            0,
-                                            &name))
+            TALER_TESTING_get_trait_instance_name (instance_cmd,
+                                                   &name))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch instance name\n");
@@ -125,7 +125,7 @@ get_instances_cb (void *cls,
           return;
         }
         if (0 != strcmp (iis[i].name,
-                         name))
+                         *name))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Instance name does not match\n");
@@ -135,11 +135,11 @@ get_instances_cb (void *cls,
       }
 
       {
-        const char *id;
+        const char **id;
+
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (instance_cmd,
-                                            1,
-                                            &id))
+            TALER_TESTING_get_trait_instance_id (instance_cmd,
+                                                 &id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch instance id\n");
@@ -147,7 +147,7 @@ get_instances_cb (void *cls,
           return;
         }
         if (0 != strcmp (iis[i].id,
-                         id))
+                         *id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Instance id does not match\n");
diff --git a/src/testing/testing_api_cmd_get_orders.c 
b/src/testing/testing_api_cmd_get_orders.c
index dbf647c1..6e1ca622 100644
--- a/src/testing/testing_api_cmd_get_orders.c
+++ b/src/testing/testing_api_cmd_get_orders.c
@@ -113,10 +113,10 @@ get_orders_cb (void *cls,
         gos->orders[i]);
 
       {
-        const char *order_id;
+        const char **order_id;
+
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_order_id (order_cmd,
-                                              0,
                                               &order_id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -125,7 +125,7 @@ get_orders_cb (void *cls,
           return;
         }
         if (0 != strcmp (orders[i].order_id,
-                         order_id))
+                         *order_id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Order id does not match\n");
@@ -147,7 +147,6 @@ get_orders_cb (void *cls,
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_contract_terms (order_cmd,
-                                                    0,
                                                     &contract_terms))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -180,6 +179,9 @@ get_orders_cb (void *cls,
       }
     }
     break;
+  case MHD_HTTP_ACCEPTED:
+    /* FIXME: do more checks here (new KYC logic!) */
+    break;
   default:
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Unhandled HTTP status.\n");
@@ -191,7 +193,6 @@ get_orders_cb (void *cls,
 /**
  * Run the "GET /orders" CMD.
  *
- *
  * @param cls closure.
  * @param cmd command being run now.
  * @param is interpreter state.
@@ -500,9 +501,6 @@ merchant_poll_orders_start_cleanup (void *cls,
 }
 
 
-/**
- * Start a long poll for GET /private/orders.
- */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_poll_orders_start (const char *label,
                                      const char *merchant_url,
@@ -527,7 +525,7 @@ TALER_TESTING_cmd_poll_orders_start (const char *label,
 
 
 /**
- * Run the "GET orders" CMD.
+ * Wait for the "GET orders" CMD to complete.
  *
  * @param cls closure.
  * @param cmd command being run now.
@@ -587,9 +585,6 @@ merchant_poll_orders_conclude_cleanup (void *cls,
 }
 
 
-/**
- * Complete a long poll for GET /private/orders.
- */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_poll_orders_conclude (const char *label,
                                         unsigned int http_status,
diff --git a/src/testing/testing_api_cmd_get_product.c 
b/src/testing/testing_api_cmd_get_product.c
index d1f844b0..7f46a5f3 100644
--- a/src/testing/testing_api_cmd_get_product.c
+++ b/src/testing/testing_api_cmd_get_product.c
@@ -124,18 +124,17 @@ get_product_cb (void *cls,
   {
   case MHD_HTTP_OK:
     {
-      const char *expected_description;
+      const char **expected_description;
 
       product_cmd = TALER_TESTING_interpreter_lookup_command (
         gis->is,
         gis->product_reference);
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_string (product_cmd,
-                                          0,
-                                          &expected_description))
+          TALER_TESTING_get_trait_product_description (product_cmd,
+                                                       &expected_description))
         TALER_TESTING_interpreter_fail (gis->is);
       if (0 != strcmp (description,
-                       expected_description))
+                       *expected_description))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Product description does not match\n");
@@ -145,10 +144,10 @@ get_product_cb (void *cls,
     }
     {
       const json_t *expected_description_i18n;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_json (product_cmd,
-                                        0,
-                                        &expected_description_i18n))
+          TALER_TESTING_get_trait_i18n_description (product_cmd,
+                                                    
&expected_description_i18n))
         TALER_TESTING_interpreter_fail (gis->is);
       if (1 != json_equal (description_i18n,
                            expected_description_i18n))
@@ -161,10 +160,10 @@ get_product_cb (void *cls,
     }
     {
       const struct TALER_Amount *expected_price;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_amount_obj (product_cmd,
-                                              0,
-                                              &expected_price))
+          TALER_TESTING_get_trait_amount (product_cmd,
+                                          &expected_price))
         TALER_TESTING_interpreter_fail (gis->is);
       if ((GNUNET_OK != TALER_amount_cmp_currency (price,
                                                    expected_price)) ||
@@ -178,15 +177,14 @@ get_product_cb (void *cls,
       }
     }
     {
-      const char *expected_image;
+      const char **expected_image;
 
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_string (product_cmd,
-                                          3,
-                                          &expected_image))
+          TALER_TESTING_get_trait_product_image (product_cmd,
+                                                 &expected_image))
         TALER_TESTING_interpreter_fail (gis->is);
       if (0 != strcmp (image,
-                       expected_image))
+                       *expected_image))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Product image does not match\n");
@@ -196,10 +194,10 @@ get_product_cb (void *cls,
     }
     {
       const json_t *expected_taxes;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_json (product_cmd,
-                                        2,
-                                        &expected_taxes))
+          TALER_TESTING_get_trait_taxes (product_cmd,
+                                         &expected_taxes))
         TALER_TESTING_interpreter_fail (gis->is);
       if (1 != json_equal (taxes,
                            expected_taxes))
@@ -211,14 +209,14 @@ get_product_cb (void *cls,
       }
     }
     {
-      const char *expected_unit;
+      const char **expected_unit;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_string (product_cmd,
-                                          1,
-                                          &expected_unit))
+          TALER_TESTING_get_trait_product_unit (product_cmd,
+                                                &expected_unit))
         TALER_TESTING_interpreter_fail (gis->is);
       if (0 != strcmp (unit,
-                       expected_unit))
+                       *expected_unit))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Product unit does not match\n");
@@ -228,10 +226,10 @@ get_product_cb (void *cls,
     }
     {
       const json_t *expected_location;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_json (product_cmd,
-                                        3,
-                                        &expected_location))
+          TALER_TESTING_get_trait_address (product_cmd,
+                                           &expected_location))
         TALER_TESTING_interpreter_fail (gis->is);
       if (1 != json_equal (location,
                            expected_location))
@@ -244,10 +242,10 @@ get_product_cb (void *cls,
     }
     {
       const int64_t *expected_total_stock;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_int64 (product_cmd,
-                                         0,
-                                         &expected_total_stock))
+          TALER_TESTING_get_trait_product_stock (product_cmd,
+                                                 &expected_total_stock))
         TALER_TESTING_interpreter_fail (gis->is);
       if (total_stock != *expected_total_stock)
       {
diff --git a/src/testing/testing_api_cmd_get_products.c 
b/src/testing/testing_api_cmd_get_products.c
index 534ffea5..190bb4c1 100644
--- a/src/testing/testing_api_cmd_get_products.c
+++ b/src/testing/testing_api_cmd_get_products.c
@@ -113,11 +113,11 @@ get_products_cb (void *cls,
         gis->products[i]);
 
       {
-        const char *product_id;
+        const char **product_id;
+
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (product_cmd,
-                                            2,
-                                            &product_id))
+            TALER_TESTING_get_trait_product_id (product_cmd,
+                                                &product_id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch product id\n");
@@ -125,7 +125,7 @@ get_products_cb (void *cls,
           return;
         }
         if (0 != strcmp (products[i].product_id,
-                         product_id))
+                         *product_id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Product id does not match\n");
diff --git a/src/testing/testing_api_cmd_get_reserve.c 
b/src/testing/testing_api_cmd_get_reserve.c
index 539013ab..95d0c3a8 100644
--- a/src/testing/testing_api_cmd_get_reserve.c
+++ b/src/testing/testing_api_cmd_get_reserve.c
@@ -110,12 +110,12 @@ get_reserve_cb (void *cls,
     {
       const struct TALER_Amount *initial_amount;
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_amount_obj (reserve_cmd,
-                                              0,
-                                              &initial_amount))
+          TALER_TESTING_get_trait_amount (reserve_cmd,
+                                          &initial_amount))
         TALER_TESTING_interpreter_fail (grs->is);
-      if ((GNUNET_OK != TALER_amount_cmp_currency 
(&rs->merchant_initial_amount,
-                                                   initial_amount)) ||
+      if ((GNUNET_OK !=
+           TALER_amount_cmp_currency (&rs->merchant_initial_amount,
+                                      initial_amount)) ||
           (0 != TALER_amount_cmp (&rs->merchant_initial_amount,
                                   initial_amount)))
       {
@@ -143,7 +143,6 @@ get_reserve_cb (void *cls,
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_tip_id (tip_cmd,
-                                            0,
                                             &tip_id))
           TALER_TESTING_interpreter_fail (grs->is);
 
@@ -160,13 +159,13 @@ get_reserve_cb (void *cls,
         const struct TALER_Amount *total_amount;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_amount_obj (tip_cmd,
-                                                0,
-                                                &total_amount))
+            TALER_TESTING_get_trait_amount (tip_cmd,
+                                            &total_amount))
           TALER_TESTING_interpreter_fail (grs->is);
 
-        if ((GNUNET_OK != TALER_amount_cmp_currency (&tips[i].amount,
-                                                     total_amount)) ||
+        if ((GNUNET_OK !=
+             TALER_amount_cmp_currency (&tips[i].amount,
+                                        total_amount)) ||
             (0 != TALER_amount_cmp (&tips[i].amount,
                                     total_amount)))
         {
@@ -177,16 +176,15 @@ get_reserve_cb (void *cls,
         }
       }
       {
-        const char *reason;
+        const char **reason;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (tip_cmd,
-                                            0,
+            TALER_TESTING_get_trait_reason (tip_cmd,
                                             &reason))
           TALER_TESTING_interpreter_fail (grs->is);
 
         if (0 != strcmp (tips[i].reason,
-                         reason))
+                         *reason))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Reserve tip reason does not match\n");
@@ -225,7 +223,6 @@ get_reserve_run (void *cls,
     grs->reserve_reference);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_reserve_pub (reserve_cmd,
-                                           0,
                                            &reserve_pub))
     TALER_TESTING_FAIL (is);
 
diff --git a/src/testing/testing_api_cmd_get_reserves.c 
b/src/testing/testing_api_cmd_get_reserves.c
index f673d70b..dd0101b7 100644
--- a/src/testing/testing_api_cmd_get_reserves.c
+++ b/src/testing/testing_api_cmd_get_reserves.c
@@ -114,7 +114,6 @@ get_reserves_cb (void *cls,
 
           if (GNUNET_OK !=
               TALER_TESTING_get_trait_reserve_pub (reserve_cmd,
-                                                   0,
                                                    &reserve_pub))
           {
             GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -138,9 +137,8 @@ get_reserves_cb (void *cls,
           const struct TALER_Amount *initial;
 
           if (GNUNET_OK !=
-              TALER_TESTING_get_trait_amount_obj (reserve_cmd,
-                                                  0,
-                                                  &initial))
+              TALER_TESTING_get_trait_amount (reserve_cmd,
+                                              &initial))
           {
             GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                         "Could not fetch reserve initial balance\n");
diff --git a/src/testing/testing_api_cmd_get_tips.c 
b/src/testing/testing_api_cmd_get_tips.c
index 12b0f56c..9b9a4671 100644
--- a/src/testing/testing_api_cmd_get_tips.c
+++ b/src/testing/testing_api_cmd_get_tips.c
@@ -125,7 +125,6 @@ get_tips_cb (void *cls,
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_tip_id (tip_cmd,
-                                            0,
                                             &tip_id))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -146,9 +145,8 @@ get_tips_cb (void *cls,
         const struct TALER_Amount *tip_amount;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_amount_obj (tip_cmd,
-                                                0,
-                                                &tip_amount))
+            TALER_TESTING_get_trait_amount (tip_cmd,
+                                            &tip_amount))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch tip amount\n");
diff --git a/src/testing/testing_api_cmd_get_transfers.c 
b/src/testing/testing_api_cmd_get_transfers.c
index e82e6436..59e0ecf8 100644
--- a/src/testing/testing_api_cmd_get_transfers.c
+++ b/src/testing/testing_api_cmd_get_transfers.c
@@ -137,7 +137,6 @@ get_transfers_cb (
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_wtid (transfer_cmd,
-                                          0,
                                           &wtid))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -158,24 +157,23 @@ get_transfers_cb (
           transfers[i].credit_serial);
       }
       {
-        const char *payto_uri;
+        const char **payto_uri;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (transfer_cmd,
-                                            0,
-                                            &payto_uri))
+            TALER_TESTING_get_trait_credit_payto_uri (transfer_cmd,
+                                                      &payto_uri))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch wire transfer payto uri\n");
           TALER_TESTING_interpreter_fail (gts->is);
           return;
         }
-        if (0 != strcmp (payto_uri,
+        if (0 != strcmp (*payto_uri,
                          transfers[i].payto_uri))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Wire transfer payto uri does not match: %s != %s\n",
-                      payto_uri,
+                      *payto_uri,
                       transfers[i].payto_uri);
           TALER_TESTING_interpreter_fail (gts->is);
           return;
@@ -185,20 +183,19 @@ get_transfers_cb (
         const struct TALER_Amount *credit_amount;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_amount_obj (transfer_cmd,
-                                                0,
-                                                &credit_amount))
+            TALER_TESTING_get_trait_amount (transfer_cmd,
+                                            &credit_amount))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch wire transfer credit amount\n");
           TALER_TESTING_interpreter_fail (gts->is);
           return;
         }
-        if ((GNUNET_OK != TALER_amount_cmp_currency (credit_amount,
-                                                     
&transfers[i].credit_amount))
-            ||
-            (0 != TALER_amount_cmp (credit_amount,
-                                    &transfers[i].credit_amount)))
+        if ( (GNUNET_OK !=
+              TALER_amount_cmp_currency (credit_amount,
+                                         &transfers[i].credit_amount)) ||
+             (0 != TALER_amount_cmp (credit_amount,
+                                     &transfers[i].credit_amount)))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Wire transfer credit amount does not match\n");
@@ -207,19 +204,18 @@ get_transfers_cb (
         }
       }
       {
-        const char *exchange_url;
+        const char **exchange_url;
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (transfer_cmd,
-                                            1,
-                                            &exchange_url))
+            TALER_TESTING_get_trait_exchange_url (transfer_cmd,
+                                                  &exchange_url))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch wire transfer exchange url\n");
           TALER_TESTING_interpreter_fail (gts->is);
           return;
         }
-        if (0 != strcmp (exchange_url,
+        if (0 != strcmp (*exchange_url,
                          transfers[i].exchange_url))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/testing/testing_api_cmd_instance_auth.c 
b/src/testing/testing_api_cmd_instance_auth.c
index f44b025f..f9597464 100644
--- a/src/testing/testing_api_cmd_instance_auth.c
+++ b/src/testing/testing_api_cmd_instance_auth.c
@@ -167,16 +167,15 @@ auth_instance_cleanup (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 auth_instance_traits (void *cls,
                       const void **ret,
                       const char *trait,
                       unsigned int index)
 {
   struct AuthInstanceState *ais = cls;
-
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_string (0, ais->auth_token),
+    TALER_TESTING_make_trait_auth_token (&ais->auth_token),
     TALER_TESTING_trait_end ()
   };
 
diff --git a/src/testing/testing_api_cmd_kyc_get.c 
b/src/testing/testing_api_cmd_kyc_get.c
new file mode 100644
index 00000000..07fe84e1
--- /dev/null
+++ b/src/testing/testing_api_cmd_kyc_get.c
@@ -0,0 +1,304 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2021 Taler Systems SA
+
+  TALER is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as
+  published by the Free Software Foundation; either version 3, or
+  (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public
+  License along with TALER; see the file COPYING.  If not, see
+  <http://www.gnu.org/licenses/>
+*/
+
+/**
+ * @file testing_api_cmd_kyc_get.c
+ * @brief command to test kyc_get request
+ * @author Christian Grothoff
+ */
+
+#include "platform.h"
+#include <taler/taler_exchange_service.h>
+#include <taler/taler_testing_lib.h>
+#include "taler_merchant_service.h"
+#include "taler_merchant_testing_lib.h"
+
+
+/**
+ * State for a "/kyc" GET CMD.
+ */
+struct KycGetState
+{
+  /**
+   * Operation handle for a GET /private/kyc GET request.
+   */
+  struct TALER_MERCHANT_KycGetHandle *kgh;
+
+  /**
+   * Base URL of the merchant serving the request.
+   */
+  const char *merchant_url;
+
+  /**
+   * Instance to query, NULL if part of @e merchant_url
+   */
+  const char *instance_id;
+
+  /**
+   * Reference to command providing wire hash, NULL to
+   * query all accounts.
+   */
+  const char *h_wire_ref;
+
+  /**
+   * URL of exchange to query.
+   */
+  const char *exchange_url;
+
+  /**
+   * Set to the payment target UUID of the first exchange account
+   * for which we failed to pass the KYC check, or 0.
+   */
+  uint64_t payment_target_uuid;
+
+  /**
+   * Expected HTTP response code.
+   */
+  unsigned int expected_http_status;
+
+  /**
+   * Interpreter state.
+   */
+  struct TALER_TESTING_Interpreter *is;
+
+};
+
+
+/**
+ * Free the state of a "/kyc" GET CMD, and
+ * possibly cancel a pending "kyc" GET operation.
+ *
+ * @param cls closure with the `struct KycGetState`
+ * @param cmd command currently being freed.
+ */
+static void
+kyc_get_cleanup (void *cls,
+                 const struct TALER_TESTING_Command *cmd)
+{
+  struct KycGetState *cs = cls;
+
+  if (NULL != cs->kgh)
+  {
+    TALER_LOG_WARNING ("/kyc GET operation did not complete\n");
+    TALER_MERCHANT_kyc_get_cancel (cs->kgh);
+  }
+  GNUNET_free (cs);
+}
+
+
+/**
+ * Process "GET /public/kyc_get" (lookup) response.
+ *
+ * @param cls closure
+ * @param kr response we got
+ */
+static void
+kyc_get_cb (void *cls,
+            const struct TALER_MERCHANT_KycResponse *kr)
+{
+  struct KycGetState *cs = cls;
+
+  cs->kgh = NULL;
+  if (kr->hr.http_status != cs->expected_http_status)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Expected status %u, got %u\n",
+                cs->expected_http_status,
+                kr->hr.http_status);
+    TALER_TESTING_FAIL (cs->is);
+  }
+  switch (kr->hr.http_status)
+  {
+  case MHD_HTTP_ACCEPTED:
+    if (0 != kr->details.kyc_status.pending_kycs_length)
+    {
+      const char *url;
+      const char *tok;
+      const char *end;
+      char *dec;
+      const char *eq;
+      unsigned long long uuid;
+      size_t toklen;
+      char dummy;
+
+      url = kr->details.kyc_status.pending_kycs[0].kyc_url;
+      tok = strstr (url, "&redirect_uri=");
+      if (NULL == tok)
+        TALER_TESTING_FAIL (cs->is);
+      tok += strlen ("&redirect_uri=");
+      end = strchr (tok, '&');
+      if (NULL == end)
+        toklen = strlen (tok);
+      else
+        toklen = end - tok;
+      (void) GNUNET_STRINGS_urldecode (tok,
+                                       toklen,
+                                       &dec);
+      eq = strrchr (dec, '/');
+      if (NULL == eq)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "Received unexpected KYC URL `%s' (%s)\n",
+                    url,
+                    dec);
+        GNUNET_free (dec);
+        TALER_TESTING_FAIL (cs->is);
+      }
+      eq++;
+      if (1 != sscanf (eq,
+                       "%llu%c",
+                       &uuid,
+                       &dummy))
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "Received unexpected KYC URL `%s' (%s)\n",
+                    url,
+                    dec);
+        GNUNET_free (dec);
+        TALER_TESTING_FAIL (cs->is);
+      }
+      GNUNET_free (dec);
+      cs->payment_target_uuid = uuid;
+    }
+    break;
+  }
+  TALER_TESTING_interpreter_next (cs->is);
+}
+
+
+/**
+ * Run the "kyc_get" CMD.
+ *
+ * @param cls closure.
+ * @param cmd command being currently run.
+ * @param is interpreter state.
+ */
+static void
+kyc_get_run (void *cls,
+             const struct TALER_TESTING_Command *cmd,
+             struct TALER_TESTING_Interpreter *is)
+{
+  struct KycGetState *cs = cls;
+  const struct TALER_MerchantWireHash *h_wire = NULL;
+
+  cs->is = is;
+  if (NULL != cs->h_wire_ref)
+  {
+    const struct TALER_TESTING_Command *wire_cmd;
+
+    if (NULL ==
+        (wire_cmd =
+           TALER_TESTING_interpreter_lookup_command (cs->is,
+                                                     cs->h_wire_ref)))
+    {
+      GNUNET_break (0);
+      TALER_TESTING_FAIL (cs->is);
+    }
+    /* Note: at the time of writing, no command offers an h_wire trait,
+       so for now this code is dead and 'h_wire_ref' must always be NULL... */
+    if (GNUNET_OK !=
+        TALER_TESTING_get_trait_h_wire (wire_cmd,
+                                        &h_wire))
+    {
+      GNUNET_break (0);
+      TALER_TESTING_FAIL (cs->is);
+    }
+  }
+  if (NULL == cs->instance_id)
+    cs->kgh = TALER_MERCHANT_kyc_get (is->ctx,
+                                      cs->merchant_url,
+                                      h_wire,
+                                      cs->exchange_url,
+                                      GNUNET_TIME_UNIT_ZERO,
+                                      &kyc_get_cb,
+                                      cs);
+  else
+    cs->kgh = TALER_MERCHANT_management_kyc_get (is->ctx,
+                                                 cs->merchant_url,
+                                                 cs->instance_id,
+                                                 h_wire,
+                                                 cs->exchange_url,
+                                                 GNUNET_TIME_UNIT_ZERO,
+                                                 &kyc_get_cb,
+                                                 cs);
+
+  GNUNET_assert (NULL != cs->kgh);
+}
+
+
+/**
+ * Offer internal data from "KYC" GET CMD.
+ *
+ * @param cls closure.
+ * @param[out] ret result (could be anything).
+ * @param trait name of the trait.
+ * @param index index number of the object to offer.
+ * @return #GNUNET_OK on success.
+ */
+static enum GNUNET_GenericReturnValue
+kyc_get_traits (void *cls,
+                const void **ret,
+                const char *trait,
+                unsigned int index)
+{
+  struct KycGetState *cs = cls;
+  struct TALER_TESTING_Trait traits[] = {
+    TALER_TESTING_make_trait_payment_target_uuid (
+      &cs->payment_target_uuid),
+    TALER_TESTING_trait_end ()
+  };
+
+  return TALER_TESTING_get_trait (traits,
+                                  ret,
+                                  trait,
+                                  index);
+}
+
+
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_kyc_get (const char *label,
+                                    const char *merchant_url,
+                                    const char *instance_id,
+                                    const char *h_wire_ref,
+                                    const char *exchange_url,
+                                    unsigned int expected_http_status)
+{
+  struct KycGetState *cs;
+
+  cs = GNUNET_new (struct KycGetState);
+  cs->merchant_url = merchant_url;
+  cs->instance_id = instance_id;
+  cs->h_wire_ref = h_wire_ref;
+  cs->exchange_url = exchange_url;
+  cs->expected_http_status = expected_http_status;
+  {
+    struct TALER_TESTING_Command cmd = {
+      .cls = cs,
+      .label = label,
+      .run = &kyc_get_run,
+      .cleanup = &kyc_get_cleanup,
+      .traits = &kyc_get_traits
+    };
+
+    return cmd;
+  }
+}
+
+
+/* end of testing_api_cmd_kyc_get.c */
diff --git a/src/testing/testing_api_cmd_lock_product.c 
b/src/testing/testing_api_cmd_lock_product.c
index 49f815d6..da9e8832 100644
--- a/src/testing/testing_api_cmd_lock_product.c
+++ b/src/testing/testing_api_cmd_lock_product.c
@@ -180,16 +180,16 @@ lock_product_cleanup (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 lock_product_traits (void *cls,
                      const void **ret,
                      const char *trait,
                      unsigned int index)
 {
   struct LockProductState *lps = cls;
-
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_string (0, lps->uuid),
+    TALER_TESTING_make_trait_lock_uuid (
+      (const char **) &lps->uuid),
     TALER_TESTING_trait_end ()
   };
 
diff --git a/src/testing/testing_api_cmd_merchant_get_order.c 
b/src/testing/testing_api_cmd_merchant_get_order.c
index 34c2b0b0..1977f792 100644
--- a/src/testing/testing_api_cmd_merchant_get_order.c
+++ b/src/testing/testing_api_cmd_merchant_get_order.c
@@ -185,7 +185,6 @@ merchant_get_order_cb (
 
           if (GNUNET_OK !=
               TALER_TESTING_get_trait_contract_terms (order_cmd,
-                                                      0,
                                                       
&expected_contract_terms))
           {
             GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -200,16 +199,15 @@ merchant_get_order_cb (
           for (unsigned int i = 0; i < gos->forgets_length; ++i)
           {
             const struct TALER_TESTING_Command *forget_cmd;
-            const unsigned int *paths_length;
+            const uint32_t *paths_length;
 
             forget_cmd = TALER_TESTING_interpreter_lookup_command (
               gos->is,
               gos->forgets[i]);
 
             if (GNUNET_OK !=
-                TALER_TESTING_get_trait_uint32 (forget_cmd,
-                                                0,
-                                                &paths_length))
+                TALER_TESTING_get_trait_paths_length (forget_cmd,
+                                                      &paths_length))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                           "Couldn't fetch forget paths length\n");
@@ -219,13 +217,13 @@ merchant_get_order_cb (
 
             for (unsigned int j = 0; j < *paths_length; ++j)
             {
-              const char *path;
+              const char **path;
               int res = GNUNET_OK;
 
               if (GNUNET_OK !=
-                  TALER_TESTING_get_trait_string (forget_cmd,
-                                                  j,
-                                                  &path))
+                  TALER_TESTING_get_trait_paths (forget_cmd,
+                                                 j,
+                                                 &path))
               {
                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                             "Couldn't fetch forget path\n");
@@ -235,7 +233,7 @@ merchant_get_order_cb (
 
               GNUNET_assert (GNUNET_OK ==
                              TALER_JSON_expand_path (ct,
-                                                     path,
+                                                     *path,
                                                      &apply_forget,
                                                      &res));
               GNUNET_assert (GNUNET_OK == res);
@@ -279,7 +277,6 @@ merchant_get_order_cb (
 
             if (GNUNET_OK !=
                 TALER_TESTING_get_trait_wtid (transfer_cmd,
-                                              0,
                                               &wtid))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -297,19 +294,18 @@ merchant_get_order_cb (
             }
           }
           {
-            const char *exchange_url;
+            const char **exchange_url;
 
             if (GNUNET_OK !=
-                TALER_TESTING_get_trait_string (transfer_cmd,
-                                                1,
-                                                &exchange_url))
+                TALER_TESTING_get_trait_exchange_url (transfer_cmd,
+                                                      &exchange_url))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                           "Could not fetch wire transfer exchange url\n");
               TALER_TESTING_interpreter_fail (gos->is);
               return;
             }
-            if (0 != strcmp (exchange_url,
+            if (0 != strcmp (*exchange_url,
                              osr->details.paid.wts[i].exchange_url))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -324,13 +320,11 @@ merchant_get_order_cb (
             const struct TALER_Amount *transfer_fee;
 
             if ((GNUNET_OK !=
-                 TALER_TESTING_get_trait_amount_obj (transfer_cmd,
-                                                     0,
-                                                     &transfer_amount)) ||
+                 TALER_TESTING_get_trait_amount (transfer_cmd,
+                                                 &transfer_amount)) ||
                 (GNUNET_OK !=
-                 TALER_TESTING_get_trait_amount_obj (transfer_cmd,
-                                                     1,
-                                                     &transfer_fee)))
+                 TALER_TESTING_get_trait_fee (transfer_cmd,
+                                              &transfer_fee)))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                           "Could not fetch wire transfer amount/fee\n");
@@ -387,31 +381,26 @@ merchant_get_order_cb (
             gos->is,
             gos->refunds[i]);
           {
-            const char *expected_amount_str;
-            struct TALER_Amount expected_amount;
+            const struct TALER_Amount *expected_amount;
             struct TALER_Amount *amount_found =
               &osr->details.paid.refunds[i].refund_amount;
 
             if (GNUNET_OK !=
-                TALER_TESTING_get_trait_string (refund_cmd,
-                                                0,
-                                                &expected_amount_str))
+                TALER_TESTING_get_trait_amount (refund_cmd,
+                                                &expected_amount))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                           "Could not fetch refund amount\n");
               TALER_TESTING_interpreter_fail (gos->is);
               return;
             }
-            GNUNET_assert (GNUNET_OK ==
-                           TALER_string_to_amount (expected_amount_str,
-                                                   &expected_amount));
             GNUNET_assert (0 <= TALER_amount_add (&refunded_total,
                                                   &refunded_total,
                                                   amount_found));
             if ((GNUNET_OK !=
-                 TALER_amount_cmp_currency (&expected_amount,
+                 TALER_amount_cmp_currency (expected_amount,
                                             &refunded_total)) ||
-                (0 != TALER_amount_cmp (&expected_amount,
+                (0 != TALER_amount_cmp (expected_amount,
                                         &refunded_total)))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -421,11 +410,10 @@ merchant_get_order_cb (
             }
           }
           {
-            const char *expected_reason;
+            const char **expected_reason;
 
             if (GNUNET_OK !=
-                TALER_TESTING_get_trait_string (refund_cmd,
-                                                1,
+                TALER_TESTING_get_trait_reason (refund_cmd,
                                                 &expected_reason))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -433,7 +421,7 @@ merchant_get_order_cb (
               TALER_TESTING_interpreter_fail (gos->is);
               return;
             }
-            if (0 != strcmp (expected_reason,
+            if (0 != strcmp (*expected_reason,
                              osr->details.paid.refunds[i].reason))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -461,7 +449,7 @@ merchant_get_order_cb (
         /* FIXME: Check all of the members of `pud` */
         struct TALER_MERCHANT_PayUriData pud;
         const struct TALER_TESTING_Command *order_cmd;
-        const char *order_id;
+        const char **order_id;
         const struct TALER_ClaimTokenP *claim_token;
 
         if (GNUNET_OK !=
@@ -481,7 +469,6 @@ merchant_get_order_cb (
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_order_id (order_cmd,
-                                              0,
                                               &order_id))
         {
           TALER_MERCHANT_parse_pay_uri_free (&pud);
@@ -490,7 +477,6 @@ merchant_get_order_cb (
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_claim_token (order_cmd,
-                                                 0,
                                                  &claim_token))
         {
           TALER_MERCHANT_parse_pay_uri_free (&pud);
@@ -519,7 +505,7 @@ merchant_get_order_cb (
           if ((0 != strcmp (host,
                             pud.merchant_host)) ||
               (NULL != pud.merchant_prefix_path) ||
-              (0 != strcmp (order_id,
+              (0 != strcmp (*order_id,
                             pud.order_id)) ||
               (NULL != pud.ssid))
           {
@@ -527,7 +513,7 @@ merchant_get_order_cb (
                         "Order pay uri `%s' does not match, wanted %s/%s\n",
                         osr->details.unpaid.taler_pay_uri,
                         host,
-                        order_id);
+                        *order_id);
             TALER_TESTING_interpreter_fail (gos->is);
             TALER_MERCHANT_parse_pay_uri_free (&pud);
             GNUNET_free (host);
@@ -581,8 +567,8 @@ merchant_get_order_run (void *cls,
 {
   struct MerchantGetOrderState *gos = cls;
   const struct TALER_TESTING_Command *order_cmd;
-  const char *order_id;
-  const struct GNUNET_HashCode *h_contract;
+  const char **order_id;
+  const struct TALER_PrivateContractHash *h_contract;
 
   order_cmd = TALER_TESTING_interpreter_lookup_command (
     is,
@@ -590,20 +576,18 @@ merchant_get_order_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_order_id (order_cmd,
-                                        0,
                                         &order_id))
     TALER_TESTING_FAIL (is);
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (order_cmd,
-                                                0,
                                                 &h_contract))
     TALER_TESTING_FAIL (is);
 
   gos->is = is;
   gos->ogh = TALER_MERCHANT_merchant_order_get (is->ctx,
                                                 gos->merchant_url,
-                                                order_id,
+                                                *order_id,
                                                 NULL,
                                                 true,
                                                 GNUNET_TIME_UNIT_ZERO,
diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c 
b/src/testing/testing_api_cmd_merchant_get_tip.c
index 7c3daac2..81be677d 100644
--- a/src/testing/testing_api_cmd_merchant_get_tip.c
+++ b/src/testing/testing_api_cmd_merchant_get_tip.c
@@ -127,13 +127,14 @@ merchant_get_tip_cb (void *cls,
     // check if the data returned matches that from the POST / PATCH
     {
       const struct TALER_Amount *initial_amount;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_amount_obj (authorize_cmd,
-                                              0,
-                                              &initial_amount))
+          TALER_TESTING_get_trait_amount (authorize_cmd,
+                                          &initial_amount))
         TALER_TESTING_FAIL (gts->is);
-      if ((GNUNET_OK != TALER_amount_cmp_currency (total_authorized,
-                                                   initial_amount)) ||
+      if ((GNUNET_OK !=
+           TALER_amount_cmp_currency (total_authorized,
+                                      initial_amount)) ||
           (0 != TALER_amount_cmp (total_authorized,
                                   initial_amount)))
       {
@@ -144,14 +145,14 @@ merchant_get_tip_cb (void *cls,
       }
     }
     {
-      const char *justification;
+      const char **justification;
+
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_string (authorize_cmd,
-                                          0,
+          TALER_TESTING_get_trait_reason (authorize_cmd,
                                           &justification))
         TALER_TESTING_FAIL (gts->is);
       if (0 != strcmp (reason,
-                       justification))
+                       *justification))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Tip authorized reason does not match\n");
@@ -161,6 +162,7 @@ merchant_get_tip_cb (void *cls,
     }
     {
       const struct GNUNET_TIME_Absolute *tip_expiration;
+
       if (GNUNET_OK !=
           TALER_TESTING_get_trait_absolute_time (authorize_cmd,
                                                  0,
@@ -189,12 +191,11 @@ merchant_get_tip_cb (void *cls,
         pickup_cmd = TALER_TESTING_interpreter_lookup_command (gts->is,
                                                                
gts->pickups[i]);
         {
-          const uint64_t *num_planchets;
+          const uint32_t *num_planchets;
 
           if (GNUNET_OK !=
-              TALER_TESTING_get_trait_uint64 (pickup_cmd,
-                                              0,
-                                              &num_planchets))
+              TALER_TESTING_get_trait_num_planchets (pickup_cmd,
+                                                     &num_planchets))
             TALER_TESTING_FAIL (gts->is);
 
           if (*num_planchets != pickups[i].num_planchets)
@@ -209,16 +210,15 @@ merchant_get_tip_cb (void *cls,
           const struct TALER_Amount *total;
 
           if (GNUNET_OK !=
-              TALER_TESTING_get_trait_amount_obj (pickup_cmd,
-                                                  pickups[i].num_planchets,
-                                                  &total))
+              TALER_TESTING_get_trait_amount (pickup_cmd,
+                                              &total))
             TALER_TESTING_FAIL (gts->is);
 
-          if ((GNUNET_OK != TALER_amount_cmp_currency (total,
-                                                       &pickups[i].
-                                                       requested_amount)) ||
-              (0 != TALER_amount_cmp (total,
-                                      &pickups[i].requested_amount)))
+          if ( (GNUNET_OK !=
+                TALER_amount_cmp_currency (total,
+                                           &pickups[i].requested_amount)) ||
+               (0 != TALER_amount_cmp (total,
+                                       &pickups[i].requested_amount)))
           {
             GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                         "Pickup planchet sum does not match\n");
@@ -230,10 +230,12 @@ merchant_get_tip_cb (void *cls,
                                                total));
         }
       }
-      if ((GNUNET_OK != TALER_amount_cmp_currency (&expected_total_picked_up,
-                                                   total_picked_up)) ||
-          (0 != TALER_amount_cmp (&expected_total_picked_up,
-                                  total_picked_up)))
+      if ( (GNUNET_OK !=
+            TALER_amount_cmp_currency (&expected_total_picked_up,
+                                       total_picked_up)) ||
+           (0 !=
+            TALER_amount_cmp (&expected_total_picked_up,
+                              total_picked_up)) )
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Tip picked up amount does not match\n");
@@ -271,7 +273,6 @@ merchant_get_tip_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_tip_id (tip_cmd,
-                                      0,
                                       &tip_id))
     TALER_TESTING_FAIL (is);
 
diff --git a/src/testing/testing_api_cmd_patch_instance.c 
b/src/testing/testing_api_cmd_patch_instance.c
index 44ae355e..348163af 100644
--- a/src/testing/testing_api_cmd_patch_instance.c
+++ b/src/testing/testing_api_cmd_patch_instance.c
@@ -212,32 +212,33 @@ patch_instance_traits (void *cls,
   #define NUM_TRAITS (pis->payto_uris_length) + 11
   struct TALER_TESTING_Trait traits[NUM_TRAITS];
   traits[0] =
-    TALER_TESTING_make_trait_string (0, pis->name);
+    TALER_TESTING_make_trait_instance_name (&pis->name);
   traits[1] =
-    TALER_TESTING_make_trait_string (1, pis->instance_id);
+    TALER_TESTING_make_trait_instance_id (&pis->instance_id);
   traits[2] =
-    TALER_TESTING_make_trait_json (0, pis->address);
+    TALER_TESTING_make_trait_address (pis->address);
   traits[3] =
-    TALER_TESTING_make_trait_json (1, pis->jurisdiction);
+    TALER_TESTING_make_trait_jurisdiction (pis->jurisdiction);
   traits[4] =
-    TALER_TESTING_make_trait_amount_obj (0, &pis->default_max_wire_fee);
+    TALER_TESTING_make_trait_max_wire_fee (&pis->default_max_wire_fee);
   traits[5] =
-    TALER_TESTING_make_trait_uint32 (0, &pis->default_wire_fee_amortization);
+    TALER_TESTING_make_trait_wire_fee_amortization (
+      &pis->default_wire_fee_amortization);
   traits[6] =
-    TALER_TESTING_make_trait_amount_obj (1, &pis->default_max_deposit_fee);
+    TALER_TESTING_make_trait_max_deposit_fee (&pis->default_max_deposit_fee);
   traits[7] =
-    TALER_TESTING_make_trait_relative_time (0,
-                                            &pis->default_wire_transfer_delay);
+    TALER_TESTING_make_trait_wire_delay (&pis->default_wire_transfer_delay);
   traits[8] =
-    TALER_TESTING_make_trait_relative_time (1, &pis->default_pay_delay);
+    TALER_TESTING_make_trait_pay_delay (&pis->default_pay_delay);
   traits[9] =
-    TALER_TESTING_make_trait_uint32 (1, &pis->payto_uris_length);
+    TALER_TESTING_make_trait_payto_length (&pis->payto_uris_length);
   traits[NUM_TRAITS - 1] =
     TALER_TESTING_trait_end ();
   for (unsigned int i = 0; i < pis->payto_uris_length; ++i)
   {
     traits[10 + i] =
-      TALER_TESTING_make_trait_string (2 + i, pis->payto_uris[i]);
+      TALER_TESTING_make_trait_payto_uris (i,
+                                           &pis->payto_uris[i]);
   }
 
   return TALER_TESTING_get_trait (traits,
diff --git a/src/testing/testing_api_cmd_patch_product.c 
b/src/testing/testing_api_cmd_patch_product.c
index fd0b8d49..41d992e2 100644
--- a/src/testing/testing_api_cmd_patch_product.c
+++ b/src/testing/testing_api_cmd_patch_product.c
@@ -201,7 +201,7 @@ patch_product_run (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 patch_product_traits (void *cls,
                       const void **ret,
                       const char *trait,
@@ -209,16 +209,18 @@ patch_product_traits (void *cls,
 {
   struct PatchProductState *pps = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_string (0, pps->description),
-    TALER_TESTING_make_trait_json (0, pps->description_i18n),
-    TALER_TESTING_make_trait_string (1, pps->unit),
-    TALER_TESTING_make_trait_amount_obj (0, &pps->price),
-    TALER_TESTING_make_trait_string (3, pps->image),
-    TALER_TESTING_make_trait_json (2, pps->taxes),
-    TALER_TESTING_make_trait_int64 (0, &pps->total_stock),
-    TALER_TESTING_make_trait_json (3, pps->address),
-    TALER_TESTING_make_trait_absolute_time (0, &pps->next_restock),
-    TALER_TESTING_make_trait_string (2, pps->product_id),
+    TALER_TESTING_make_trait_product_description (&pps->description),
+    TALER_TESTING_make_trait_i18n_description (pps->description_i18n),
+    TALER_TESTING_make_trait_product_unit (&pps->unit),
+    TALER_TESTING_make_trait_amount (&pps->price),
+    TALER_TESTING_make_trait_product_image (
+      (const char **) &pps->image),
+    TALER_TESTING_make_trait_taxes (pps->taxes),
+    TALER_TESTING_make_trait_product_stock (&pps->total_stock),
+    TALER_TESTING_make_trait_address (pps->address),
+    TALER_TESTING_make_trait_absolute_time (0,
+                                            &pps->next_restock),
+    TALER_TESTING_make_trait_product_id (&pps->product_id),
     TALER_TESTING_trait_end (),
   };
 
diff --git a/src/testing/testing_api_cmd_pay_order.c 
b/src/testing/testing_api_cmd_pay_order.c
index 05776afa..6087ef2b 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -38,7 +38,7 @@ struct PayState
   /**
    * Contract terms hash code.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * The interpreter state.
@@ -108,7 +108,7 @@ struct PayState
  *        per-contract fee, only per-coin exists.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 build_coins (struct TALER_MERCHANT_PayCoin **pc,
              unsigned int *npc,
              char *coins,
@@ -127,6 +127,7 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
     unsigned int ci;
     struct TALER_MERCHANT_PayCoin *icoin;
     const struct TALER_EXCHANGE_DenomPublicKey *dpk;
+    const char **exchange_url;
 
     /* Token syntax is "LABEL[/NUMBER]" */
     ctok = strchr (token, '/');
@@ -165,22 +166,21 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
       const struct TALER_Amount *denom_value;
       const struct TALER_EXCHANGE_DenomPublicKey *denom_pub;
 
-      GNUNET_assert
-        (GNUNET_OK == TALER_TESTING_get_trait_coin_priv
-          (coin_cmd, 0, &coin_priv));
-
-      GNUNET_assert
-        (GNUNET_OK == TALER_TESTING_get_trait_denom_pub
-          (coin_cmd, 0, &denom_pub));
-
-      GNUNET_assert
-        (GNUNET_OK == TALER_TESTING_get_trait_denom_sig
-          (coin_cmd, 0, &denom_sig));
-
-      GNUNET_assert
-        (GNUNET_OK == TALER_TESTING_get_trait_amount_obj
-          (coin_cmd, 0, &denom_value));
-
+      GNUNET_assert (GNUNET_OK ==
+                     TALER_TESTING_get_trait_coin_priv (coin_cmd,
+                                                        0,
+                                                        &coin_priv));
+      GNUNET_assert (GNUNET_OK ==
+                     TALER_TESTING_get_trait_denom_pub (coin_cmd,
+                                                        0,
+                                                        &denom_pub));
+      GNUNET_assert (GNUNET_OK ==
+                     TALER_TESTING_get_trait_denom_sig (coin_cmd,
+                                                        0,
+                                                        &denom_sig));
+      GNUNET_assert (GNUNET_OK ==
+                     TALER_TESTING_get_trait_amount (coin_cmd,
+                                                     &denom_value));
       icoin->coin_priv = *coin_priv;
       icoin->denom_pub = denom_pub->key;
       icoin->denom_sig = *denom_sig;
@@ -196,9 +196,9 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
                                           &icoin->denom_value,
                                           &dpk->fee_deposit));
     GNUNET_assert (GNUNET_OK ==
-                   TALER_TESTING_get_trait_url (coin_cmd,
-                                                
TALER_TESTING_UT_EXCHANGE_BASE_URL,
-                                                &icoin->exchange_url));
+                   TALER_TESTING_get_trait_exchange_url (coin_cmd,
+                                                         &exchange_url));
+    icoin->exchange_url = *exchange_url;
   }
 
   return GNUNET_OK;
@@ -260,15 +260,15 @@ pay_run (void *cls,
   struct GNUNET_TIME_Absolute pay_deadline;
   struct GNUNET_TIME_Absolute timestamp;
   struct TALER_MerchantPublicKeyP merchant_pub;
-  struct GNUNET_HashCode h_wire;
-  const struct GNUNET_HashCode *h_proposal;
+  struct TALER_MerchantWireHash h_wire;
+  const struct TALER_PrivateContractHash *h_proposal;
   struct TALER_Amount total_amount;
   struct TALER_Amount max_fee;
   const char *error_name;
   unsigned int error_line;
   struct TALER_MERCHANT_PayCoin *pay_coins;
   unsigned int npay_coins;
-  struct TALER_MerchantSignatureP *merchant_sig;
+  const struct TALER_MerchantSignatureP *merchant_sig;
 
   ps->is = is;
   proposal_cmd = TALER_TESTING_interpreter_lookup_command (
@@ -280,7 +280,6 @@ pay_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_contract_terms (proposal_cmd,
-                                              0,
                                               &contract_terms))
     TALER_TESTING_FAIL (is);
   {
@@ -350,13 +349,11 @@ pay_run (void *cls,
   }
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_merchant_sig (proposal_cmd,
-                                            0,
                                             &merchant_sig))
     TALER_TESTING_FAIL (is);
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (proposal_cmd,
-                                                0,
                                                 &h_proposal))
     TALER_TESTING_FAIL (is);
   ps->h_contract_terms = *h_proposal;
@@ -419,7 +416,7 @@ pay_cleanup (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 pay_traits (void *cls,
             const void **ret,
             const char *trait,
@@ -427,54 +424,57 @@ pay_traits (void *cls,
 {
 
   struct PayState *ps = cls;
-  const char *order_id;
+  const char **order_id;
   const struct TALER_TESTING_Command *proposal_cmd;
   const struct TALER_MerchantPublicKeyP *merchant_pub;
 
   if (NULL ==
-      (proposal_cmd = TALER_TESTING_interpreter_lookup_command
-                        (ps->is, ps->proposal_reference)))
+      (proposal_cmd =
+         TALER_TESTING_interpreter_lookup_command (ps->is,
+                                                   ps->proposal_reference)))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
 
-  if (GNUNET_OK != TALER_TESTING_get_trait_order_id
-        (proposal_cmd, 0, &order_id))
+  if (GNUNET_OK !=
+      TALER_TESTING_get_trait_order_id (proposal_cmd,
+                                        &order_id))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
 
-  if (GNUNET_OK != TALER_TESTING_get_trait_merchant_pub
-        (proposal_cmd,
-        0,
-        &merchant_pub))
+  if (GNUNET_OK !=
+      TALER_TESTING_get_trait_merchant_pub (proposal_cmd,
+                                            &merchant_pub))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
   {
-    struct TALER_TESTING_Trait traits[] = {
-      TALER_TESTING_make_trait_proposal_reference (0,
-                                                   ps->proposal_reference),
-      TALER_TESTING_make_trait_coin_reference (0,
-                                               ps->coin_reference),
-      TALER_TESTING_make_trait_order_id (0,
-                                         order_id),
-      TALER_TESTING_make_trait_merchant_pub (0,
-                                             merchant_pub),
-      TALER_TESTING_make_trait_merchant_sig (0,
-                                             &ps->merchant_sig),
-      TALER_TESTING_make_trait_string (0,
-                                       ps->amount_with_fee),
-      TALER_TESTING_trait_end ()
-    };
+    struct TALER_Amount amount_with_fee;
 
-    return TALER_TESTING_get_trait (traits,
-                                    ret,
-                                    trait,
-                                    index);
+    GNUNET_assert (GNUNET_OK ==
+                   TALER_string_to_amount (ps->amount_with_fee,
+                                           &amount_with_fee));
+    {
+      struct TALER_TESTING_Trait traits[] = {
+        TALER_TESTING_make_trait_proposal_reference (&ps->proposal_reference),
+        TALER_TESTING_make_trait_coin_reference (0,
+                                                 &ps->coin_reference),
+        TALER_TESTING_make_trait_order_id (order_id),
+        TALER_TESTING_make_trait_merchant_pub (merchant_pub),
+        TALER_TESTING_make_trait_merchant_sig (&ps->merchant_sig),
+        TALER_TESTING_make_trait_amount (&amount_with_fee),
+        TALER_TESTING_trait_end ()
+      };
+
+      return TALER_TESTING_get_trait (traits,
+                                      ret,
+                                      trait,
+                                      index);
+    }
   }
 }
 
diff --git a/src/testing/testing_api_cmd_post_instances.c 
b/src/testing/testing_api_cmd_post_instances.c
index b2e345bc..4d1f0d26 100644
--- a/src/testing/testing_api_cmd_post_instances.c
+++ b/src/testing/testing_api_cmd_post_instances.c
@@ -215,7 +215,7 @@ post_instances_run (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 post_instances_traits (void *cls,
                        const void **ret,
                        const char *trait,
@@ -225,32 +225,33 @@ post_instances_traits (void *cls,
   #define NUM_TRAITS (pis->payto_uris_length) + 11
   struct TALER_TESTING_Trait traits[NUM_TRAITS];
   traits[0] =
-    TALER_TESTING_make_trait_string (0, pis->name);
+    TALER_TESTING_make_trait_instance_name (&pis->name);
   traits[1] =
-    TALER_TESTING_make_trait_string (1, pis->instance_id);
+    TALER_TESTING_make_trait_instance_id (&pis->instance_id);
   traits[2] =
-    TALER_TESTING_make_trait_json (0, pis->address);
+    TALER_TESTING_make_trait_address (pis->address);
   traits[3] =
-    TALER_TESTING_make_trait_json (1, pis->jurisdiction);
+    TALER_TESTING_make_trait_jurisdiction (pis->jurisdiction);
   traits[4] =
-    TALER_TESTING_make_trait_amount_obj (0, &pis->default_max_wire_fee);
+    TALER_TESTING_make_trait_max_wire_fee (&pis->default_max_wire_fee);
   traits[5] =
-    TALER_TESTING_make_trait_uint32 (0, &pis->default_wire_fee_amortization);
+    TALER_TESTING_make_trait_wire_fee_amortization (
+      &pis->default_wire_fee_amortization);
   traits[6] =
-    TALER_TESTING_make_trait_amount_obj (1, &pis->default_max_deposit_fee);
+    TALER_TESTING_make_trait_max_deposit_fee (&pis->default_max_deposit_fee);
   traits[7] =
-    TALER_TESTING_make_trait_relative_time (0,
-                                            &pis->default_wire_transfer_delay);
+    TALER_TESTING_make_trait_wire_delay (&pis->default_wire_transfer_delay);
   traits[8] =
-    TALER_TESTING_make_trait_relative_time (1, &pis->default_pay_delay);
+    TALER_TESTING_make_trait_pay_delay (&pis->default_pay_delay);
   traits[9] =
-    TALER_TESTING_make_trait_uint32 (1, &pis->payto_uris_length);
+    TALER_TESTING_make_trait_payto_length (&pis->payto_uris_length);
   traits[NUM_TRAITS - 1] =
     TALER_TESTING_trait_end ();
   for (unsigned int i = 0; i < pis->payto_uris_length; ++i)
   {
     traits[10 + i] =
-      TALER_TESTING_make_trait_string (2 + i, pis->payto_uris[i]);
+      TALER_TESTING_make_trait_payto_uris (i,
+                                           &pis->payto_uris[i]);
   }
 
   return TALER_TESTING_get_trait (traits,
diff --git a/src/testing/testing_api_cmd_post_orders.c 
b/src/testing/testing_api_cmd_post_orders.c
index f7c00388..1568d151 100644
--- a/src/testing/testing_api_cmd_post_orders.c
+++ b/src/testing/testing_api_cmd_post_orders.c
@@ -35,11 +35,6 @@
 struct OrdersState
 {
 
-  /**
-   * The order.
-   */
-  char *order;
-
   /**
    * Expected status code.
    */
@@ -60,10 +55,15 @@ struct OrdersState
    */
   json_t *contract_terms;
 
+  /**
+   * Order submitted to the backend.
+   */
+  json_t *order_terms;
+
   /**
    * Contract terms hash code.
    */
-  struct GNUNET_HashCode h_contract_terms;
+  struct TALER_PrivateContractHash h_contract_terms;
 
   /**
    * The /orders operation handle.
@@ -149,23 +149,22 @@ struct OrdersState
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 orders_traits (void *cls,
                const void **ret,
                const char *trait,
                unsigned int index)
 {
   struct OrdersState *ps = cls;
-
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_order_id (0, ps->order_id),
-    TALER_TESTING_make_trait_contract_terms (0, ps->contract_terms),
-    TALER_TESTING_make_trait_h_contract_terms (0, &ps->h_contract_terms),
-    TALER_TESTING_make_trait_merchant_sig (0, &ps->merchant_sig),
-    TALER_TESTING_make_trait_merchant_pub (0, &ps->merchant_pub),
-    TALER_TESTING_make_trait_claim_nonce (0, &ps->nonce),
-    TALER_TESTING_make_trait_claim_token (0, &ps->claim_token),
-    TALER_TESTING_make_trait_string (0, ps->order),
+    TALER_TESTING_make_trait_order_id (&ps->order_id),
+    TALER_TESTING_make_trait_contract_terms (ps->contract_terms),
+    TALER_TESTING_make_trait_order_terms (ps->order_terms),
+    TALER_TESTING_make_trait_h_contract_terms (&ps->h_contract_terms),
+    TALER_TESTING_make_trait_merchant_sig (&ps->merchant_sig),
+    TALER_TESTING_make_trait_merchant_pub (&ps->merchant_pub),
+    TALER_TESTING_make_trait_claim_nonce (&ps->nonce),
+    TALER_TESTING_make_trait_claim_token (&ps->claim_token),
     TALER_TESTING_trait_end ()
   };
 
@@ -192,7 +191,7 @@ orders_claim_cb (void *cls,
                  const struct TALER_MERCHANT_HttpResponse *hr,
                  const json_t *contract_terms,
                  const struct TALER_MerchantSignatureP *sig,
-                 const struct GNUNET_HashCode *hash)
+                 const struct TALER_PrivateContractHash *hash)
 {
   struct OrdersState *ps = cls;
   struct TALER_MerchantPublicKeyP merchant_pub;
@@ -292,7 +291,6 @@ order_cb (void *cls,
         ps->duplicate_of);
       if (GNUNET_OK !=
           TALER_TESTING_get_trait_claim_token (order_cmd,
-                                               0,
                                                &prev_token))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -371,23 +369,9 @@ orders_run (void *cls,
             struct TALER_TESTING_Interpreter *is)
 {
   struct OrdersState *ps = cls;
-  json_t *order;
-  json_error_t error;
 
   ps->is = is;
-  order = json_loads (ps->order,
-                      JSON_REJECT_DUPLICATES,
-                      &error);
-  if (NULL == order)
-  {
-    // human error here.
-    GNUNET_break (0);
-    fprintf (stderr, "%s\n", error.text);
-    TALER_TESTING_interpreter_fail (is);
-    return;
-  }
-
-  if (NULL == json_object_get (order,
+  if (NULL == json_object_get (ps->order_terms,
                                "order_id"))
   {
     struct GNUNET_TIME_Absolute now;
@@ -399,7 +383,7 @@ orders_run (void *cls,
                  (&now.abs_value_us,
                  sizeof (now.abs_value_us));
     GNUNET_assert (0 ==
-                   json_object_set_new (order,
+                   json_object_set_new (ps->order_terms,
                                         "order_id",
                                         json_string (order_id)));
     GNUNET_free (order_id);
@@ -409,11 +393,10 @@ orders_run (void *cls,
                               sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
   ps->po = TALER_MERCHANT_orders_post (is->ctx,
                                        ps->merchant_url,
-                                       order,
+                                       ps->order_terms,
                                        GNUNET_TIME_UNIT_ZERO,
                                        &order_cb,
                                        ps);
-  json_decref (order);
   GNUNET_assert (NULL != ps->po);
 }
 
@@ -431,8 +414,7 @@ orders_run2 (void *cls,
              struct TALER_TESTING_Interpreter *is)
 {
   struct OrdersState *ps = cls;
-  const char *order_str = ps->order;
-  json_t *order;
+  const json_t *order;
   json_error_t error;
   char *products_string = GNUNET_strdup (ps->products);
   char *locks_string = GNUNET_strdup (ps->locks);
@@ -446,23 +428,42 @@ orders_run2 (void *cls,
   if (NULL != ps->duplicate_of)
   {
     const struct TALER_TESTING_Command *order_cmd;
+    const json_t *ct;
+
     order_cmd = TALER_TESTING_interpreter_lookup_command (
       is,
       ps->duplicate_of);
     if (GNUNET_OK !=
-        TALER_TESTING_get_trait_string (order_cmd,
-                                        0,
-                                        &order_str))
+        TALER_TESTING_get_trait_order_terms (order_cmd,
+                                             &ct))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Could not fetch previous order string\n");
       TALER_TESTING_interpreter_fail (is);
       return;
     }
+    order = (json_t *) ct;
+  }
+  else
+  {
+    if (NULL == json_object_get (ps->order_terms,
+                                 "order_id"))
+    {
+      struct GNUNET_TIME_Absolute now;
+      char *order_id;
+
+      // FIXME: should probably use get_monotone() to ensure uniqueness!
+      now = GNUNET_TIME_absolute_get ();
+      order_id = GNUNET_STRINGS_data_to_string_alloc
+        (&now.abs_value_us,
+         sizeof (now.abs_value_us));
+      json_object_set_new (ps->order_terms,
+                           "order_id",
+                           json_string (order_id));
+      GNUNET_free (order_id);
+    }
+    order = ps->order_terms;
   }
-  order = json_loads (order_str,
-                      JSON_REJECT_DUPLICATES,
-                      &error);
   if (NULL == order)
   {
     // human error here.
@@ -472,22 +473,6 @@ orders_run2 (void *cls,
     return;
   }
 
-  if (NULL == json_object_get (order,
-                               "order_id"))
-  {
-    struct GNUNET_TIME_Absolute now;
-    char *order_id;
-
-    // FIXME: should probably use get_monotone() to ensure uniqueness!
-    now = GNUNET_TIME_absolute_get ();
-    order_id = GNUNET_STRINGS_data_to_string_alloc
-                 (&now.abs_value_us,
-                 sizeof (now.abs_value_us));
-    json_object_set_new (order,
-                         "order_id",
-                         json_string (order_id));
-    GNUNET_free (order_id);
-  }
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
                               &ps->nonce,
                               sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
@@ -527,16 +512,15 @@ orders_run2 (void *cls,
        token = strtok (NULL, ";"))
   {
     const struct TALER_TESTING_Command *lock_cmd;
-    const char *uuid;
+    const char **uuid;
 
     lock_cmd = TALER_TESTING_interpreter_lookup_command (
       is,
       token);
 
     if (GNUNET_OK !=
-        TALER_TESTING_get_trait_string (lock_cmd,
-                                        0,
-                                        &uuid))
+        TALER_TESTING_get_trait_lock_uuid (lock_cmd,
+                                           &uuid))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Could not fetch lock uuid\n");
@@ -546,7 +530,7 @@ orders_run2 (void *cls,
 
     GNUNET_array_append (locks,
                          locks_length,
-                         uuid);
+                         *uuid);
   }
   ps->po = TALER_MERCHANT_orders_post2 (is->ctx,
                                         ps->merchant_url,
@@ -560,7 +544,6 @@ orders_run2 (void *cls,
                                         ps->make_claim_token,
                                         &order_cb,
                                         ps);
-  json_decref (order);
   GNUNET_free (products_string);
   GNUNET_free (locks_string);
   GNUNET_array_grow (products,
@@ -605,7 +588,7 @@ orders_cleanup (void *cls,
   }
 
   json_decref (ps->contract_terms);
-  GNUNET_free (ps->order);
+  json_decref (ps->order_terms);
   GNUNET_free_nz ((void *) ps->order_id);
   GNUNET_free (ps);
 }
@@ -643,7 +626,7 @@ make_order_json (const char *order_id,
                  struct GNUNET_TIME_Absolute refund_deadline,
                  struct GNUNET_TIME_Absolute pay_deadline,
                  const char *amount,
-                 char **order)
+                 json_t **order)
 {
   struct GNUNET_TIME_Absolute refund = refund_deadline;
   struct GNUNET_TIME_Absolute pay = pay_deadline;
@@ -677,8 +660,7 @@ make_order_json (const char *order_id,
                                          "$.dummy_array[*].item",
                                          &mark_forgettable,
                                          NULL));
-  *order = json_dumps (contract_terms, 0);
-  json_decref (contract_terms);
+  *order = contract_terms;
 }
 
 
@@ -699,7 +681,7 @@ TALER_TESTING_cmd_merchant_post_orders_no_claim (
                    refund_deadline,
                    pay_deadline,
                    amount,
-                   &ps->order);
+                   &ps->order_terms);
   ps->http_status = http_status;
   ps->expected_order_id = order_id;
   ps->merchant_url = merchant_url;
@@ -735,7 +717,7 @@ TALER_TESTING_cmd_merchant_post_orders (
                    refund_deadline,
                    pay_deadline,
                    amount,
-                   &ps->order);
+                   &ps->order_terms);
   ps->http_status = http_status;
   ps->expected_order_id = order_id;
   ps->merchant_url = merchant_url;
@@ -776,8 +758,7 @@ TALER_TESTING_cmd_merchant_post_orders2 (
                    refund_deadline,
                    pay_deadline,
                    amount,
-                   &ps->order);
-
+                   &ps->order_terms);
   ps->http_status = http_status;
   ps->expected_order_id = order_id;
   ps->merchant_url = merchant_url;
diff --git a/src/testing/testing_api_cmd_post_orders_paid.c 
b/src/testing/testing_api_cmd_post_orders_paid.c
index 713e2505..2050478f 100644
--- a/src/testing/testing_api_cmd_post_orders_paid.c
+++ b/src/testing/testing_api_cmd_post_orders_paid.c
@@ -110,30 +110,27 @@ paid_run (void *cls,
 {
   struct PostOrdersPaidState *ops = cls;
   const struct TALER_TESTING_Command *pay_cmd;
-  const char *proposal_reference;
+  const char **proposal_reference;
   const struct TALER_TESTING_Command *proposal_cmd;
   const char *order_id;
-  const struct GNUNET_HashCode *h_contract_terms;
-  struct TALER_MerchantSignatureP *merchant_sig;
+  const struct TALER_PrivateContractHash *h_contract_terms;
+  const struct TALER_MerchantSignatureP *merchant_sig;
 
   ops->is = is;
-
   pay_cmd = TALER_TESTING_interpreter_lookup_command (is,
                                                       ops->pay_reference);
   if (NULL == pay_cmd)
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_merchant_sig (pay_cmd,
-                                            0,
                                             &merchant_sig))
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_proposal_reference (pay_cmd,
-                                                  0,
                                                   &proposal_reference))
     TALER_TESTING_FAIL (is);
   proposal_cmd = TALER_TESTING_interpreter_lookup_command (is,
-                                                           proposal_reference);
+                                                           
*proposal_reference);
 
   if (NULL == proposal_cmd)
     TALER_TESTING_FAIL (is);
@@ -145,7 +142,6 @@ paid_run (void *cls,
 
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_contract_terms (proposal_cmd,
-                                                0,
                                                 &contract_terms))
       TALER_TESTING_FAIL (is);
     {
@@ -180,7 +176,6 @@ paid_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (proposal_cmd,
-                                                0,
                                                 &h_contract_terms))
     TALER_TESTING_FAIL (is);
 
diff --git a/src/testing/testing_api_cmd_post_products.c 
b/src/testing/testing_api_cmd_post_products.c
index 8216318f..372a5fab 100644
--- a/src/testing/testing_api_cmd_post_products.c
+++ b/src/testing/testing_api_cmd_post_products.c
@@ -204,16 +204,18 @@ post_products_traits (void *cls,
 {
   struct PostProductsState *pps = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_string (0, pps->description),
-    TALER_TESTING_make_trait_json (0, pps->description_i18n),
-    TALER_TESTING_make_trait_string (1, pps->unit),
-    TALER_TESTING_make_trait_amount_obj (0, &pps->price),
-    TALER_TESTING_make_trait_string (3, pps->image),
-    TALER_TESTING_make_trait_json (2, pps->taxes),
-    TALER_TESTING_make_trait_int64 (0, &pps->total_stock),
-    TALER_TESTING_make_trait_json (3, pps->address),
-    TALER_TESTING_make_trait_absolute_time (0, &pps->next_restock),
-    TALER_TESTING_make_trait_string (2, pps->product_id),
+    TALER_TESTING_make_trait_product_description (&pps->description),
+    TALER_TESTING_make_trait_i18n_description (pps->description_i18n),
+    TALER_TESTING_make_trait_product_unit (&pps->unit),
+    TALER_TESTING_make_trait_amount (&pps->price),
+    TALER_TESTING_make_trait_product_image (
+      (const char **) &pps->image),
+    TALER_TESTING_make_trait_taxes (pps->taxes),
+    TALER_TESTING_make_trait_product_stock (&pps->total_stock),
+    TALER_TESTING_make_trait_address (pps->address),
+    TALER_TESTING_make_trait_absolute_time (0,
+                                            &pps->next_restock),
+    TALER_TESTING_make_trait_product_id (&pps->product_id),
     TALER_TESTING_trait_end (),
   };
 
diff --git a/src/testing/testing_api_cmd_post_reserves.c 
b/src/testing/testing_api_cmd_post_reserves.c
index 31866384..b2167534 100644
--- a/src/testing/testing_api_cmd_post_reserves.c
+++ b/src/testing/testing_api_cmd_post_reserves.c
@@ -133,7 +133,7 @@ post_reserves_cb (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 post_reserves_traits (void *cls,
                       const void **ret,
                       const char *trait,
@@ -141,8 +141,8 @@ post_reserves_traits (void *cls,
 {
   struct PostReservesState *prs = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_reserve_pub (0, &prs->reserve_pub),
-    TALER_TESTING_make_trait_amount_obj (0, &prs->initial_balance),
+    TALER_TESTING_make_trait_reserve_pub (&prs->reserve_pub),
+    TALER_TESTING_make_trait_amount (&prs->initial_balance),
     TALER_TESTING_trait_end (),
   };
 
diff --git a/src/testing/testing_api_cmd_post_transfers.c 
b/src/testing/testing_api_cmd_post_transfers.c
index 40f1d595..77a2456b 100644
--- a/src/testing/testing_api_cmd_post_transfers.c
+++ b/src/testing/testing_api_cmd_post_transfers.c
@@ -332,7 +332,7 @@ transfers_cb (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 post_transfers_traits (void *cls,
                        const void **ret,
                        const char *trait,
@@ -340,12 +340,15 @@ post_transfers_traits (void *cls,
 {
   struct PostTransfersState *pts = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_wtid (0, &pts->wtid),
-    TALER_TESTING_make_trait_string (0, pts->credit_account),
-    TALER_TESTING_make_trait_amount_obj (0, &pts->credit_amount),
-    TALER_TESTING_make_trait_amount_obj (1, &pts->wire_fee),
-    TALER_TESTING_make_trait_string (1, pts->exchange_url),
-    TALER_TESTING_make_trait_absolute_time (0, &pts->execution_time),
+    TALER_TESTING_make_trait_wtid (&pts->wtid),
+    TALER_TESTING_make_trait_credit_payto_uri (
+      (const char **) &pts->credit_account),
+    TALER_TESTING_make_trait_amount (&pts->credit_amount),
+    TALER_TESTING_make_trait_fee (&pts->wire_fee),
+    TALER_TESTING_make_trait_exchange_url (
+      (const char **) &pts->exchange_url),
+    TALER_TESTING_make_trait_absolute_time (0,
+                                            &pts->execution_time),
     TALER_TESTING_make_trait_bank_row (&pts->serial),
     TALER_TESTING_trait_end (),
   };
diff --git a/src/testing/testing_api_cmd_refund_order.c 
b/src/testing/testing_api_cmd_refund_order.c
index fd06f887..15154149 100644
--- a/src/testing/testing_api_cmd_refund_order.c
+++ b/src/testing/testing_api_cmd_refund_order.c
@@ -52,7 +52,7 @@ struct RefundState
   /**
    * The amount to refund.
    */
-  const char *refund_amount;
+  struct TALER_Amount refund_amount;
 
   /**
    * Human-readable justification for the refund.
@@ -85,7 +85,7 @@ static void
 refund_cb (void *cls,
            const struct TALER_MERCHANT_HttpResponse *hr,
            const char *taler_refund_uri,
-           const struct GNUNET_HashCode *h_contract)
+           const struct TALER_PrivateContractHash *h_contract)
 {
   struct RefundState *ris = cls;
 
@@ -184,17 +184,12 @@ refund_increase_run (void *cls,
                      struct TALER_TESTING_Interpreter *is)
 {
   struct RefundState *ris = cls;
-  struct TALER_Amount refund_amount;
 
   ris->is = is;
-  if (GNUNET_OK !=
-      TALER_string_to_amount (ris->refund_amount,
-                              &refund_amount))
-    TALER_TESTING_FAIL (is);
   ris->orh = TALER_MERCHANT_post_order_refund (is->ctx,
                                                ris->merchant_url,
                                                ris->order_id,
-                                               &refund_amount,
+                                               &ris->refund_amount,
                                                ris->reason,
                                                &refund_cb,
                                                ris);
@@ -221,10 +216,8 @@ refund_increase_traits (void *cls,
 {
   struct RefundState *ris = cls;
   struct TALER_TESTING_Trait traits[] = {
-    TALER_TESTING_make_trait_string (0,
-                                     ris->refund_amount),
-    TALER_TESTING_make_trait_string (1,
-                                     ris->reason),
+    TALER_TESTING_make_trait_amount (&ris->refund_amount),
+    TALER_TESTING_make_trait_reason (&ris->reason),
     TALER_TESTING_trait_end ()
   };
 
@@ -270,7 +263,9 @@ TALER_TESTING_cmd_merchant_order_refund (const char *label,
   ris = GNUNET_new (struct RefundState);
   ris->merchant_url = merchant_url;
   ris->order_id = order_id;
-  ris->refund_amount = refund_amount;
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_string_to_amount (refund_amount,
+                                         &ris->refund_amount));
   ris->reason = reason;
   ris->http_code = http_code;
   {
diff --git a/src/testing/testing_api_cmd_tip_authorize.c 
b/src/testing/testing_api_cmd_tip_authorize.c
index 3fb4c1bc..4be6b30a 100644
--- a/src/testing/testing_api_cmd_tip_authorize.c
+++ b/src/testing/testing_api_cmd_tip_authorize.c
@@ -198,28 +198,26 @@ tip_authorize_cb (void *cls,
  * @param index index number of the object to extract.
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 tip_authorize_traits (void *cls,
                       const void **ret,
                       const char *trait,
                       unsigned int index)
 {
   struct TipAuthorizeState *tas = cls;
-
-  {
-    struct TALER_TESTING_Trait traits[] = {
-      TALER_TESTING_make_trait_tip_id (0, &tas->tip_id),
-      TALER_TESTING_make_trait_amount_obj (0, &tas->amount),
-      TALER_TESTING_make_trait_string (0, tas->justification),
-      TALER_TESTING_make_trait_absolute_time (0, &tas->tip_expiration),
-      TALER_TESTING_trait_end (),
-    };
-
-    return TALER_TESTING_get_trait (traits,
-                                    ret,
-                                    trait,
-                                    index);
-  }
+  struct TALER_TESTING_Trait traits[] = {
+    TALER_TESTING_make_trait_tip_id (&tas->tip_id),
+    TALER_TESTING_make_trait_amount (&tas->amount),
+    TALER_TESTING_make_trait_reason (&tas->justification),
+    TALER_TESTING_make_trait_absolute_time (0,
+                                            &tas->tip_expiration),
+    TALER_TESTING_trait_end (),
+  };
+
+  return TALER_TESTING_get_trait (traits,
+                                  ret,
+                                  trait,
+                                  index);
 }
 
 
@@ -270,7 +268,6 @@ do_retry (void *cls)
       tas->reserve_reference);
     GNUNET_assert (GNUNET_OK ==
                    TALER_TESTING_get_trait_reserve_pub (reserve_cmd,
-                                                        0,
                                                         &reserve_pub));
     tas->tao = TALER_MERCHANT_tip_authorize2 (tas->is->ctx,
                                               tas->merchant_url,
diff --git a/src/testing/testing_api_cmd_tip_pickup.c 
b/src/testing/testing_api_cmd_tip_pickup.c
index 019113ae..cd73c53d 100644
--- a/src/testing/testing_api_cmd_tip_pickup.c
+++ b/src/testing/testing_api_cmd_tip_pickup.c
@@ -92,7 +92,7 @@ struct TipPickupState
   /**
    * How many coins are involved in the tipping operation.
    */
-  uint64_t num_coins;
+  uint32_t num_coins;
 
   /**
    * The array of denomination keys, in the same order of @a
@@ -165,8 +165,8 @@ pickup_cb (void *cls,
   tps->sigs = GNUNET_new_array (tps->num_coins,
                                 struct TALER_DenominationSignature);
   for (unsigned int i = 0; i<num_sigs; i++)
-    tps->sigs[i].rsa_signature
-      = GNUNET_CRYPTO_rsa_signature_dup (sigs[i].rsa_signature);
+    TALER_denom_sig_deep_copy (&tps->sigs[i],
+                               &sigs[i]);
   TALER_TESTING_interpreter_next (tps->is);
 }
 
@@ -203,7 +203,7 @@ tip_pickup_run (void *cls,
   }
   else
   {
-    const unsigned int *np;
+    const uint32_t *np;
 
     if (NULL ==  /* looking for "parent" tip-pickup command */
         (replay_cmd
@@ -212,9 +212,8 @@ tip_pickup_run (void *cls,
       TALER_TESTING_FAIL (is);
 
     if (GNUNET_OK !=
-        TALER_TESTING_get_trait_uint (replay_cmd,
-                                      0,
-                                      &np))
+        TALER_TESTING_get_trait_num_planchets (replay_cmd,
+                                               &np))
       TALER_TESTING_FAIL (is);
     num_planchets = *np;
   }
@@ -259,7 +258,7 @@ tip_pickup_run (void *cls,
       }
       else
       {
-        struct TALER_PlanchetSecretsP *ps;
+        const struct TALER_PlanchetSecretsP *ps;
 
         if (GNUNET_OK !=
             TALER_TESTING_get_trait_denom_pub (replay_cmd,
@@ -278,7 +277,6 @@ tip_pickup_run (void *cls,
     }
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_tip_id (authorize_cmd,
-                                        0,
                                         &tip_id))
       TALER_TESTING_FAIL (is);
 
@@ -313,8 +311,7 @@ tip_pickup_cleanup (void *cls,
   if (NULL != tps->sigs)
   {
     for (unsigned int i = 0; i<tps->num_coins; i++)
-      if (NULL != tps->sigs[i].rsa_signature)
-        GNUNET_CRYPTO_rsa_signature_free (tps->sigs[i].rsa_signature);
+      TALER_denom_sig_free (&tps->sigs[i]);
     GNUNET_free (tps->sigs);
   }
   if (NULL != tps->tpo)
@@ -326,43 +323,39 @@ tip_pickup_cleanup (void *cls,
 }
 
 
-static int
+static enum GNUNET_GenericReturnValue
 tip_pickup_traits (void *cls,
                    const void **ret,
                    const char *trait,
                    unsigned int index)
 {
   struct TipPickupState *tps = cls;
-  #define NUM_TRAITS (tps->num_coins * 5) + 4
-  struct TALER_TESTING_Trait traits[NUM_TRAITS];
 
-  for (unsigned int i = 0; i<tps->num_coins; i++)
+  if (index >= tps->num_coins)
+    return GNUNET_SYSERR;
   {
-    traits[i] = TALER_TESTING_make_trait_planchet_secrets (i,
-                                                           &tps->psa[i]);
-    traits[i + tps->num_coins] =
-      TALER_TESTING_make_trait_coin_priv (i, &tps->psa[i].coin_priv);
-    traits[i + (tps->num_coins * 2)] =
-      TALER_TESTING_make_trait_denom_pub (i, tps->dks[i]);
-    traits[i + (tps->num_coins * 3)] =
-      TALER_TESTING_make_trait_denom_sig (i, &tps->sigs[i]);
-    traits[i + (tps->num_coins * 4)] =
-      TALER_TESTING_make_trait_amount_obj (i, &tps->amounts_obj[i]);
+    struct TALER_TESTING_Trait traits[] = {
+      TALER_TESTING_make_trait_planchet_secrets (index,
+                                                 &tps->psa[index]),
+      TALER_TESTING_make_trait_coin_priv (index,
+                                          &tps->psa[index].coin_priv),
+      TALER_TESTING_make_trait_denom_pub (index,
+                                          tps->dks[index]),
+      TALER_TESTING_make_trait_denom_sig (index,
+                                          &tps->sigs[index]),
+      TALER_TESTING_make_trait_amounts (index,
+                                        &tps->amounts_obj[index]),
+      TALER_TESTING_make_trait_amount (&tps->total_amount),
+      TALER_TESTING_make_trait_num_planchets (&tps->num_coins),
+      TALER_TESTING_make_trait_exchange_url (&tps->exchange_url),
+      TALER_TESTING_trait_end ()
+    };
+
+    return TALER_TESTING_get_trait (traits,
+                                    ret,
+                                    trait,
+                                    index);
   }
-  traits[NUM_TRAITS - 4]
-    = TALER_TESTING_make_trait_amount_obj (tps->num_coins,
-                                           &tps->total_amount);
-  traits[NUM_TRAITS - 3]
-    = TALER_TESTING_make_trait_uint64 (0,
-                                       &tps->num_coins);
-  traits[NUM_TRAITS - 2]
-    = TALER_TESTING_make_trait_url (TALER_TESTING_UT_EXCHANGE_BASE_URL,
-                                    tps->exchange_url);
-  traits[NUM_TRAITS - 1] = TALER_TESTING_trait_end ();
-  return TALER_TESTING_get_trait (traits,
-                                  ret,
-                                  trait,
-                                  index);
 }
 
 
diff --git a/src/testing/testing_api_cmd_wallet_get_order.c 
b/src/testing/testing_api_cmd_wallet_get_order.c
index a58dda80..faa0a77d 100644
--- a/src/testing/testing_api_cmd_wallet_get_order.c
+++ b/src/testing/testing_api_cmd_wallet_get_order.c
@@ -106,7 +106,6 @@ wallet_get_order_cb (
   const char *taler_pay_uri,
   const char *already_paid_order_id)
 {
-  /* FIXME, deeper checks should be implemented here. */
   struct WalletGetOrderState *gos = cls;
   bool paid_b = (paid == GNUNET_YES);
   bool refunded_b = (refunded == GNUNET_YES);
@@ -154,7 +153,7 @@ wallet_get_order_cb (
       /* FIXME: Check all of the members of `pud` */
       struct TALER_MERCHANT_PayUriData pud;
       const struct TALER_TESTING_Command *order_cmd;
-      const char *order_id;
+      const char **order_id;
       const struct TALER_ClaimTokenP *claim_token;
 
       if (GNUNET_OK !=
@@ -174,7 +173,6 @@ wallet_get_order_cb (
 
       if (GNUNET_OK !=
           TALER_TESTING_get_trait_order_id (order_cmd,
-                                            0,
                                             &order_id))
       {
         TALER_MERCHANT_parse_pay_uri_free (&pud);
@@ -183,7 +181,6 @@ wallet_get_order_cb (
 
       if (GNUNET_OK !=
           TALER_TESTING_get_trait_claim_token (order_cmd,
-                                               0,
                                                &claim_token))
       {
         TALER_MERCHANT_parse_pay_uri_free (&pud);
@@ -213,7 +210,7 @@ wallet_get_order_cb (
         if ((0 != strcmp (host,
                           pud.merchant_host)) ||
             (NULL != pud.merchant_prefix_path) ||
-            (0 != strcmp (order_id,
+            (0 != strcmp (*order_id,
                           pud.order_id)) ||
             (NULL != pud.ssid))
         {
@@ -268,8 +265,8 @@ wallet_get_order_run (void *cls,
 {
   struct WalletGetOrderState *gos = cls;
   const struct TALER_TESTING_Command *order_cmd;
-  const char *order_id;
-  const struct GNUNET_HashCode *h_contract;
+  const char **order_id;
+  const struct TALER_PrivateContractHash *h_contract;
 
   order_cmd = TALER_TESTING_interpreter_lookup_command (
     is,
@@ -277,20 +274,18 @@ wallet_get_order_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_order_id (order_cmd,
-                                        0,
                                         &order_id))
     TALER_TESTING_FAIL (is);
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (order_cmd,
-                                                0,
                                                 &h_contract))
     TALER_TESTING_FAIL (is);
 
   gos->is = is;
   gos->ogh = TALER_MERCHANT_wallet_order_get (is->ctx,
                                               gos->merchant_url,
-                                              order_id,
+                                              *order_id,
                                               h_contract,
                                               GNUNET_TIME_UNIT_ZERO,
                                               NULL,
@@ -620,7 +615,8 @@ wallet_poll_order_cb (
                 "Unhandled HTTP status.\n");
     break;
   }
-  if (NULL != pos->cs)
+  if ( (NULL != pos->cs) &&
+       (NULL != pos->cs->task) )
   {
     GNUNET_SCHEDULER_cancel (pos->cs->task);
     pos->cs->task = GNUNET_SCHEDULER_add_now (&conclude_task,
@@ -643,8 +639,8 @@ wallet_poll_order_start_run (void *cls,
 {
   struct WalletPollOrderStartState *pos = cls;
   const struct TALER_TESTING_Command *order_cmd;
-  const char *order_id;
-  const struct GNUNET_HashCode *h_contract;
+  const char **order_id;
+  const struct TALER_PrivateContractHash *h_contract;
 
   order_cmd = TALER_TESTING_interpreter_lookup_command (
     is,
@@ -652,13 +648,11 @@ wallet_poll_order_start_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_order_id (order_cmd,
-                                        0,
                                         &order_id))
     TALER_TESTING_FAIL (is);
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (order_cmd,
-                                                0,
                                                 &h_contract))
     TALER_TESTING_FAIL (is);
 
@@ -669,7 +663,7 @@ wallet_poll_order_start_run (void *cls,
   pos->is = is;
   pos->ogh = TALER_MERCHANT_wallet_order_get (is->ctx,
                                               pos->merchant_url,
-                                              order_id,
+                                              *order_id,
                                               h_contract,
                                               pos->timeout,
                                               pos->session_id,
diff --git a/src/testing/testing_api_cmd_wallet_get_tip.c 
b/src/testing/testing_api_cmd_wallet_get_tip.c
index e6d28ff8..d08e4bcb 100644
--- a/src/testing/testing_api_cmd_wallet_get_tip.c
+++ b/src/testing/testing_api_cmd_wallet_get_tip.c
@@ -172,7 +172,6 @@ wallet_get_tip_run (void *cls,
 
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_tip_id (tip_cmd,
-                                      0,
                                       &tip_id))
     TALER_TESTING_FAIL (is);
 
diff --git a/src/testing/testing_api_cmd_wallet_post_orders_refund.c 
b/src/testing/testing_api_cmd_wallet_post_orders_refund.c
index 7befb828..b138b327 100644
--- a/src/testing/testing_api_cmd_wallet_post_orders_refund.c
+++ b/src/testing/testing_api_cmd_wallet_post_orders_refund.c
@@ -115,35 +115,30 @@ refund_cb (
       for (unsigned int i = 0; i < refunds_length; ++i)
       {
         const struct TALER_TESTING_Command *refund_cmd;
-        const char *expected_amount_str;
-        struct TALER_Amount expected_amount;
+        const struct TALER_Amount *expected_amount;
 
         refund_cmd = TALER_TESTING_interpreter_lookup_command (
           wrs->is,
           wrs->refunds[i]);
 
         if (GNUNET_OK !=
-            TALER_TESTING_get_trait_string (refund_cmd,
-                                            0,
-                                            &expected_amount_str))
+            TALER_TESTING_get_trait_amount (refund_cmd,
+                                            &expected_amount))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                       "Could not fetch refund amount\n");
           TALER_TESTING_interpreter_fail (wrs->is);
           return;
         }
-        GNUNET_assert (GNUNET_OK ==
-                       TALER_string_to_amount (expected_amount_str,
-                                               &expected_amount));
         /* The most recent refunds are returned first */
         GNUNET_assert (0 <= TALER_amount_add (&refunded_total,
                                               &refunded_total,
                                               &refunds[refunds_length - 1
                                                        - i].refund_amount));
         if ((GNUNET_OK !=
-             TALER_amount_cmp_currency (&expected_amount,
+             TALER_amount_cmp_currency (expected_amount,
                                         &refunded_total)) ||
-            (0 != TALER_amount_cmp (&expected_amount,
+            (0 != TALER_amount_cmp (expected_amount,
                                     &refunded_total)))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -178,14 +173,13 @@ obtain_refunds_run (void *cls,
   const struct TALER_TESTING_Command *proposal_cmd =
     TALER_TESTING_interpreter_lookup_command (is,
                                               wrs->proposal_reference);
-  const struct GNUNET_HashCode *h_contract_terms;
+  const struct TALER_PrivateContractHash *h_contract_terms;
   const char *order_id;
 
   if (NULL == proposal_cmd)
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_h_contract_terms (proposal_cmd,
-                                                0,
                                                 &h_contract_terms))
     TALER_TESTING_FAIL (is);
 
@@ -196,7 +190,6 @@ obtain_refunds_run (void *cls,
 
     if (GNUNET_OK !=
         TALER_TESTING_get_trait_contract_terms (proposal_cmd,
-                                                0,
                                                 &contract_terms))
       TALER_TESTING_FAIL (is);
     {
diff --git a/src/testing/testing_api_trait_claim_nonce.c 
b/src/testing/testing_api_trait_claim_nonce.c
deleted file mode 100644
index 7a878812..00000000
--- a/src/testing/testing_api_trait_claim_nonce.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2020 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-/**
- * @file testing_api_trait_claim_nonce.c
- * @brief offer a trait that is the nonce used to claim an order.
- * @author Jonathan Buchanan
- */
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-
-#define TALER_TESTING_TRAIT_CLAIM_NONCE "nonce"
-
-
-int
-TALER_TESTING_get_trait_claim_nonce
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct GNUNET_CRYPTO_EddsaPublicKey **nonce)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) nonce,
-                      TALER_TESTING_TRAIT_CLAIM_NONCE,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_claim_nonce
-  (unsigned int index,
-  const struct GNUNET_CRYPTO_EddsaPublicKey *nonce)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_CLAIM_NONCE,
-    .ptr = (const void *) nonce
-  };
-  return ret;
-}
-
-
-/* end of testing_api_trait_claim_nonce.c */
diff --git a/src/testing/testing_api_trait_hash.c 
b/src/testing/testing_api_trait_hash.c
deleted file mode 100644
index 17360626..00000000
--- a/src/testing/testing_api_trait_hash.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2018 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-/**
- * @file testing_api_trait_hash.c
- * @brief offer any trait that is passed over as a hash code.
- * @author Marcello Stanisci
- */
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-
-/**
- * FIXME: have _one_ pair of getter/setter for hash-coded
- * traits and define the getters/setters for tip id and hashed
- * contract terms as _macros_.
- */
-
-#define TALER_TESTING_TRAIT_TIP_ID "tip-id"
-#define TALER_TESTING_TRAIT_H_CONTRACT_TERMS "h-contract-terms"
-
-int
-TALER_TESTING_get_trait_tip_id
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct GNUNET_HashCode **tip_id)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) tip_id,
-                      TALER_TESTING_TRAIT_TIP_ID,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_tip_id
-  (unsigned int index,
-  const struct GNUNET_HashCode *tip_id)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_TIP_ID,
-    .ptr = (const void *) tip_id
-  };
-  return ret;
-}
-
-
-int
-TALER_TESTING_get_trait_h_contract_terms
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct GNUNET_HashCode **h_contract_terms)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) h_contract_terms,
-                      TALER_TESTING_TRAIT_H_CONTRACT_TERMS,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_h_contract_terms
-  (unsigned int index,
-  const struct GNUNET_HashCode *h_contract_terms)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_H_CONTRACT_TERMS,
-    .ptr = (const void *) h_contract_terms
-  };
-  return ret;
-}
diff --git a/src/testing/testing_api_trait_merchant_sig.c 
b/src/testing/testing_api_trait_merchant_sig.c
deleted file mode 100644
index 2662a870..00000000
--- a/src/testing/testing_api_trait_merchant_sig.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2018 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-/**
- * @file testing_api_trait_merchant_sig.c
- * @brief offer merchant signature over contract
- * @author Marcello Stanisci
- */
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-
-#define TALER_TESTING_TRAIT_MERCHANT_SIG "reserve-private-key"
-
-int
-TALER_TESTING_get_trait_merchant_sig
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_MerchantSignatureP **merchant_sig)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) merchant_sig,
-                      TALER_TESTING_TRAIT_MERCHANT_SIG,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_merchant_sig
-  (unsigned int index,
-  const struct TALER_MerchantSignatureP *merchant_sig)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_MERCHANT_SIG,
-    .ptr = (const void *) merchant_sig
-  };
-  return ret;
-}
-
-
-/* end of testing_api_trait_merchant_sig.c */
diff --git a/src/testing/testing_api_trait_planchet.c 
b/src/testing/testing_api_trait_planchet.c
deleted file mode 100644
index 97ee8881..00000000
--- a/src/testing/testing_api_trait_planchet.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2018 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-/**
- * @file testing_api_trait_planchet.c
- * @brief offer planchet secrets as trait.
- * @author Marcello Stanisci
- */
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-
-#define TALER_TESTING_TRAIT_PLANCHET_SECRETS "planchet-secrets"
-
-int
-TALER_TESTING_get_trait_planchet_secrets
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_PlanchetSecretsP **planchet_secrets)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) planchet_secrets,
-                      TALER_TESTING_TRAIT_PLANCHET_SECRETS,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_planchet_secrets
-  (unsigned int index,
-  const struct TALER_PlanchetSecretsP *planchet_secrets)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_PLANCHET_SECRETS,
-    .ptr = (const void *) planchet_secrets
-  };
-  return ret;
-}
-
-
-/* end of testing_api_trait_planchet.c */
diff --git a/src/testing/testing_api_trait_refund_entry.c 
b/src/testing/testing_api_trait_refund_entry.c
deleted file mode 100644
index 5c99bac2..00000000
--- a/src/testing/testing_api_trait_refund_entry.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2014-2018 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-
-/**
- * @file testing_api_trait_refund_entry.c
- * @brief command to offer refund entry trait.
- * @author Marcello Stanisci
- */
-
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-#include "taler_merchant_service.h"
-
-// FIXME: rename: entry->detail!
-
-#define TALER_TESTING_TRAIT_REFUND_ENTRY "refund-entry"
-
-int
-TALER_TESTING_get_trait_refund_entry (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const struct TALER_MERCHANT_RefundDetail **refund_entry)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) refund_entry,
-                      TALER_TESTING_TRAIT_REFUND_ENTRY,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_refund_entry (
-  unsigned int index,
-  const struct TALER_MERCHANT_RefundDetail *refund_entry)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_REFUND_ENTRY,
-    .ptr = (const void *) refund_entry
-  };
-  return ret;
-}
-
-
-/* end of testing_api_trait_refund_entry.c */
diff --git a/src/testing/testing_api_trait_string.c 
b/src/testing/testing_api_trait_string.c
deleted file mode 100644
index eae2e077..00000000
--- a/src/testing/testing_api_trait_string.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2018 Taler Systems SA
-
-  TALER is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as
-  published by the Free Software Foundation; either version 3, or
-  (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public
-  License along with TALER; see the file COPYING.  If not, see
-  <http://www.gnu.org/licenses/>
-*/
-/**
- * @file testing_api_trait_string.c
- * @brief offer traits that come as strings.
- * @author Marcello Stanisci
- */
-#include "platform.h"
-#include <taler/taler_signatures.h>
-#include <taler/taler_exchange_service.h>
-#include <taler/taler_testing_lib.h>
-
-#define TALER_TESTING_TRAIT_PROPOSAL_REFERENCE "proposal-reference"
-#define TALER_TESTING_TRAIT_COIN_REFERENCE "coin-reference"
-
-
-int
-TALER_TESTING_get_trait_proposal_reference
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const char **proposal_reference)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) proposal_reference,
-                      TALER_TESTING_TRAIT_PROPOSAL_REFERENCE,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_proposal_reference
-  (unsigned int index,
-  const char *proposal_reference)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_PROPOSAL_REFERENCE,
-    .ptr = (const void *) proposal_reference
-  };
-  return ret;
-}
-
-
-int
-TALER_TESTING_get_trait_coin_reference
-  (const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  const char **coin_reference)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) coin_reference,
-                      TALER_TESTING_TRAIT_COIN_REFERENCE,
-                      index);
-}
-
-
-struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_coin_reference
-  (unsigned int index,
-  const char *coin_reference)
-{
-  struct TALER_TESTING_Trait ret = {
-    .index = index,
-    .trait_name = TALER_TESTING_TRAIT_COIN_REFERENCE,
-    .ptr = (const void *) coin_reference
-  };
-  return ret;
-}
-
-
-/* end of testing_api_trait_string.c */
diff --git a/src/testing/testing_api_traits.c b/src/testing/testing_api_traits.c
new file mode 100644
index 00000000..efeb012c
--- /dev/null
+++ b/src/testing/testing_api_traits.c
@@ -0,0 +1,34 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2018, 2021 Taler Systems SA
+
+  TALER is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as
+  published by the Free Software Foundation; either version 3, or
+  (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public
+  License along with TALER; see the file COPYING.  If not, see
+  <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file testing/testing_api_traits.c
+ * @brief loop for trait resolution
+ * @author Christian Grothoff
+ * @author Marcello Stanisci
+ */
+#include "platform.h"
+#include "taler_merchant_testing_lib.h"
+
+
+TALER_MERCHANT_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_IMPL_SIMPLE_TRAIT)
+
+TALER_MERCHANT_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_IMPL_INDEXED_TRAIT)
+
+
+/* end of testing_api_traits.c */

-- 
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]