From e41cdf846de639bbb49ffc01ea830689605bccb2 Mon Sep 17 00:00:00 2001 From: MS Date: Fri, 4 Dec 2020 12:52:03 +0100 Subject: Align specs to code. --- libeufin/api-sandbox.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libeufin/api-sandbox.rst') diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst index d848ba40..a410b9ee 100644 --- a/libeufin/api-sandbox.rst +++ b/libeufin/api-sandbox.rst @@ -22,15 +22,28 @@ HTTP API // IBAN that will receive the payment. creditorIban: string; + // FIXME + creditorBic: string; + // FIXME + creditorName: string; // IBAN that will send the payment. debitorIban: string; + // FIXME + debitorBic: string; + // FIXME + debitorName: string; amount: string; currency: string; // subject of the payment. subject: string; + + // Whether the payment is credit or debit *for* the + // account being managed *by* the running sandbox. + // Can take the values: "CRDT" or "DBIT". + direction: string; } .. -- cgit v1.2.3 From 3b86fb44cf603b63bfb5f132def4f963b83ab17b Mon Sep 17 00:00:00 2001 From: MS Date: Fri, 4 Dec 2020 13:07:12 +0100 Subject: more on Sandbox payments API --- libeufin/api-sandbox.rst | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'libeufin/api-sandbox.rst') diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst index a410b9ee..6f1d152f 100644 --- a/libeufin/api-sandbox.rst +++ b/libeufin/api-sandbox.rst @@ -9,16 +9,33 @@ HTTP API .. Payments. +.. http:get:: /admin/payments + + Return the list of *all* the payments known by the sandbox. + + **Response** + + .. code-block:: tsref + + interface SandboxPayments { + + // The list of all known payments, regardless + // of any IBAN involved in them. + payments: SandboxPayment[]; + } + .. http:post:: /admin/payments Adds a new payment to the book. Mainly used for testing purposes. **Request:** + + One object of type `SandboxPayment` - .. ts:def:: PaymentRequest + .. ts:def:: SandboxPayment - interface PaymentRequest { + interface SandboxPayment { // IBAN that will receive the payment. creditorIban: string; -- cgit v1.2.3 From 085d99420a7aa23b04bd4ce1e256eec9e182c166 Mon Sep 17 00:00:00 2001 From: MS Date: Fri, 4 Dec 2020 13:22:49 +0100 Subject: Sandbox API. Endpoint to request a Camt document. --- libeufin/api-sandbox.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'libeufin/api-sandbox.rst') diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst index 6f1d152f..d1214d52 100644 --- a/libeufin/api-sandbox.rst +++ b/libeufin/api-sandbox.rst @@ -9,6 +9,31 @@ HTTP API .. Payments. + +.. http:post:: /admin/payments/camt + + Return the history of one IBAN in Camt.053 format. + + **Request** + + .. code-block:: tsref + + interface CamtParams { + + // IBAN managed by the running Sandbox, for which + // the Camt.053 response is going to be generated. + iban: string; + + // The Camt type to return. Only '53' is allowed + // at this moment. + type: number; + } + + **Response** + + The expected Camt.053 document. + + .. http:get:: /admin/payments Return the list of *all* the payments known by the sandbox. -- cgit v1.2.3