Bank API

The following APIs are served from banks, in order to allow exchanges to deposit funds to money recipients. A typical scenario for calling this APIs is after a merchant has deposited coins to the exchange, and the exchange needs to give real money to the merchant.

Administrative API

This API allows one user to send money to another user, withing the same “test” bank. The user calling it has to authenticate by including his credentials in the request.

POST /admin/add/incoming

Request: The body of this request must have the format of a BankDepositRequest.

Response:

status 200 OK:The request has been correctly handled, so the funds have been transferred to the recipient’s account
status 400 Bad Request:
 The bank replies a BankIncomingError object

Details:

interface BankDepositRequest {

  // The username of the user calling this API.
  username: string;

  // Password of the user calling this API.
  password: string;

  // JSON 'amount' object. The amount the caller wants to transfer
  // to the recipient's count
  amount: Amount;

  // Exchange base URL, used to perform tracking requests against the
  // wire transfer ID.  Note that in the actual bank wire transfer,
  // the schema may have to be encoded differently, i.e.
  // "https://exchange.com/" may become "https exchange.com" due to
  // character set restrictions.  It is the responsibility of the
  // wire transfer adapter to properly encode/decode the URL.
  // Payment service providers must ensure that their URL is short
  // enough to fit together with the wire transfer identifier into
  // the wire transfer subject of their respective banking system.
  exchange_url: string;

  // The id of this wire transfer, a `TALER_WireTransferIdentifierRawP`.
  // Should be encoded together with a checksum in actual wire transfers.
  // (See TALER_WireTransferIdentifierP for an encoding with CRC8.).
  wtid: base32;

  // The sender's account identificator
  debit_account: number;

  // The recipient's account identificator
  credit_account: number;

}
interface BankIncomingError {

  // Human readable explanation of the failure.
  reason: string;

}

User API

This API gets the user a list of his transactions, optionally limiting the number of results.

POST /history

Request: The body of this request must have the format of a HistoryRequest. TBD

Response TBD

interface HistoryRequest {

  // The username of the user calling this API.
  username: string;

  // Password of the user calling this API.
  password: string;

  // Row number identifier in the bank's database
  // such that only rows with GREATER (meaning younger
  // records) row number will be returned.
  start: number;

  // How many rows we want returned, at most.
  delta: number;
}

Util API

Whenever the user wants to know the bank account number of a public account, the following path returns a human readable HTML containing this information

/public-accounts/details?account=accountName