diff options
Diffstat (limited to 'core/api-bank-revenue.rst')
-rw-r--r-- | core/api-bank-revenue.rst | 64 |
1 files changed, 43 insertions, 21 deletions
diff --git a/core/api-bank-revenue.rst b/core/api-bank-revenue.rst index e266bced..a647fb35 100644 --- a/core/api-bank-revenue.rst +++ b/core/api-bank-revenue.rst @@ -22,6 +22,38 @@ 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; + + // URN of the implementation (needed to interpret 'revision' in version). + // @since v0, may become mandatory in the future. + implementation?: string; + } + -------------- Authentication @@ -34,16 +66,11 @@ The bank library authenticates requests to the bank merchant API using Querying the transaction history -------------------------------- -.. http:get:: ${BASE_URL}/history +.. http:get:: /history - Return a list of transactions made from an exchange to the merchant. + Return a list of transactions made to an account. - 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. - - 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. @@ -91,25 +118,23 @@ Querying the transaction history :http:statuscode:`404 Not found`: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. - .. ts:def:: MerchantIncomingHistory + **Details:** - interface MerchantIncomingHistory { + .. ts:def:: RevenueIncomingHistory + 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 - - interface MerchantIncomingBankTransaction { + .. ts:def:: RevenueIncomingBankTransaction + interface RevenueIncomingBankTransaction { // Opaque identifier of the returned record. row_id: SafeUint64; @@ -122,9 +147,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; } |