taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 93d0d8373e3f7bbf2d7a3cb1be492d9c1b277c7f
parent bdc58f018a4023f0640922da4fb5d282d7615069
Author: Antoine A <>
Date:   Tue, 23 Jan 2024 20:47:29 +0100

Update Revenue and WireGateway API

Diffstat:
Mcore/api-bank-revenue.rst | 56+++++++++++++++++++++++++++++++++++++-------------------
Mcore/api-bank-wire.rst | 27+++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 19 deletions(-)

diff --git a/core/api-bank-revenue.rst b/core/api-bank-revenue.rst @@ -22,6 +22,34 @@ Taler Bank Revenue HTTP API This section describes an API offered by libeufin-nexus and libeufin-bank. The API is used by the merchant (or other parties) to query for incoming transactions to their account. +.. http:get:: /config + + Return the protocol version and configuration information about the bank. + This specification corresponds to ``current`` protocol being version **0**. + + **Response:** + + :http:statuscode:`200 OK`: + The exchange responds with a `RevenueConfig` object. This request should + virtually always be successful. + + **Details:** + + .. ts:def:: RevenueConfig + + interface RevenueConfig { + // Name of the API. + name: "taler-revenue"; + + // libtool-style representation of the Bank protocol version, see + // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning + // The format is "current:revision:age". + version: string; + + // Currency used by this gateway. + currency: string; + } + -------------- Authentication @@ -36,14 +64,9 @@ Querying the transaction history .. http:get:: /history - Return a list of transactions made from an exchange to the merchant. - - Incoming transactions must contain a valid wire transfer identifier and - exchange base URL. If a bank transaction does not conform to the right - syntax, the wire gateway must not report it to the merchant via this - endpoint. + Return a list of transactions made to an account. - The bank account of the merchant is determined via the base URL and/or the + The bank account is determined via the base URL and/or the user name in the ``Authorization`` header. In fact, the transaction history might come from a "virtual" account, where multiple real bank accounts are merged into one history. @@ -93,23 +116,21 @@ Querying the transaction history **Details:** - .. ts:def:: MerchantIncomingHistory + .. ts:def:: RevenueIncomingHistory - interface MerchantIncomingHistory { + interface RevenueIncomingHistory { // Array of incoming transactions. - incoming_transactions : MerchantIncomingBankTransaction[]; + incoming_transactions : RevenueIncomingBankTransaction[]; // Payto URI to identify the receiver of funds. - // This must be one of the merchant's bank accounts. // Credit account is shared by all incoming transactions // as per the nature of the request. credit_account: string; - } - .. ts:def:: MerchantIncomingBankTransaction + .. ts:def:: RevenueIncomingBankTransaction - interface MerchantIncomingBankTransaction { + interface RevenueIncomingBankTransaction { // Opaque identifier of the returned record. row_id: SafeUint64; @@ -122,9 +143,6 @@ Querying the transaction history // Payto URI to identify the sender of funds. debit_account: string; - // Base URL of the exchange where the transfer originated form. - exchange_url: string; - - // The wire transfer identifier. - wtid: WireTransferIdentifierRawP; + // The wire transfer subject. + subject: string; } diff --git a/core/api-bank-wire.rst b/core/api-bank-wire.rst @@ -24,6 +24,33 @@ well as by the auditor to query incoming and outgoing transactions. This API is currently implemented by the Taler Demo Bank, as well as by LibEuFin (work in progress). +.. http:get:: /config + + Return the protocol version and configuration information about the bank. + This specification corresponds to ``current`` protocol being version **0**. + + **Response:** + + :http:statuscode:`200 OK`: + The exchange responds with a `WireConfig` object. This request should + virtually always be successful. + + **Details:** + + .. ts:def:: WireConfig + + interface WireConfig { + // Name of the API. + name: "taler-wire-gateway"; + + // libtool-style representation of the Bank protocol version, see + // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning + // The format is "current:revision:age". + version: string; + + // Currency used by this gateway. + currency: string; + } -------------- Authentication