summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-01-11 23:41:16 +0100
committerFlorian Dold <florian.dold@gmail.com>2020-01-11 23:41:16 +0100
commit186ae7da9a9e281da425b45906db047f3eb1f0ee (patch)
tree76724e7c8964566c03c936d5ba0f6f12dde34ace /core
parentc3d4c0d0c6e8866bd0bc75157bdbefe8639a7541 (diff)
downloaddocs-186ae7da9a9e281da425b45906db047f3eb1f0ee.tar.gz
docs-186ae7da9a9e281da425b45906db047f3eb1f0ee.tar.bz2
docs-186ae7da9a9e281da425b45906db047f3eb1f0ee.zip
transaction->transfer, document /admin/add-incoming
Diffstat (limited to 'core')
-rw-r--r--core/api-wire-plugin-bank.rst33
1 files changed, 31 insertions, 2 deletions
diff --git a/core/api-wire-plugin-bank.rst b/core/api-wire-plugin-bank.rst
index 7eef1cb0..aac6e035 100644
--- a/core/api-wire-plugin-bank.rst
+++ b/core/api-wire-plugin-bank.rst
@@ -36,8 +36,7 @@ The wire plugin authenticates requests to the wire gatway via
Making Transactions
-------------------
-
-.. http:post:: ${BASE_URL}/transaction
+.. http:post:: ${BASE_URL}/transfer
This API allows the exchange to make a transaction, typically to a merchant. The bank account
of the exchange is not included in the request, but instead derived from the user name in the
@@ -268,3 +267,33 @@ Querying the transaction history
// The wire transfer ID in the outgoing transaction.
wtid: ShortHashCode;
}
+
+
+-----------------------
+Wire Transfer Test APIs
+-----------------------
+
+Endpoints in this section are only used for integration tests and never
+exposed by bank gateways in production.
+
+.. http:post:: ${BASE_URL}/admin/add-incoming
+
+ Simulate a transfer from a customer to the exchange. This API is *not*
+ idempotent since it's only used in testing.
+
+ .. ts:def:: OutgoingBankTransaction
+
+ interface AddIncomingRequest {
+ // Amount to transfer.
+ amount: Amount;
+
+ // Reserve public key that is included in the wire transfer details
+ // to identify the reserve that is being topped up.
+ reserve_pub: EddsaPublicKey
+
+ // Account (as payto URI) that makes the wire transfer to the exchange.
+ // Usually this account must be created by the test harness before this API is
+ // used. An exception is the "exchange-fakebank", where any debit account can be
+ // specified, as it is automatically created.
+ debit_account: string;
+ }