adorsys / psd2-accelerator

PSD2 Compliant Sandbox Implementing the XS2A API
https://adorsys.com/en/products/modelbank/
Other
27 stars 8 forks source link

Account balances when completing a payment #95

Closed chriszach closed 5 years ago

chriszach commented 5 years ago

Greetings,

I am trying out the psd2-accelerator Sandbox and I am facing an issue, though I'm not sure if I'm doing something wrong.

Using the PIS endpoints and following the tutorial on the Developers portal, I'm trying to initiate a payment (single payment, sepa-credit-transfer). The steps I've followed are :

  1. Send a payment initiation request via the /v1/payments endpoint. Debtor account is DE11760365688833114935 and creditor account is DE15500105172295759744 as demonstrated in the example
  2. Grab the SCA Redirect link from the response for authentication (use a GET request). The payment request status changes to finalised and by checking the payment information via the GET method, payment status changes to ASCP

My question is, if the payment is executed shouldn't the balances change on the DE11760365688833114935 account? I'm using the AIS flow to check that and the account's balance stays the same (1500). The AIS flow I'm using is

  1. Request a consent to view the account's (DE11760365688833114935) balances,transactions etc (as in the example)
  2. Grab the SCA Redirect link from the response and the consent request status changes to valid
  3. GET /v1/accounts
  4. GET /v1/accounts/{{account_id}}/balances

I'm just familiarizing myself with the code and the whole environment so I might have missed something. I've also tried to initiate the payment by explicitly starting the authorization process (POST request) and then use the PUT method to update the PSU data but this doesn't work, as I get a 403 response saying "This service is not reachable for the addressed PSU due to a channel independent blocking by the ASPSP. Additional information might be given by the ASPSP"

My question is, am I doing something wrong or is this intended behaviour (payment gets to ASCP status as intended but balances dont change) ?

wandi34 commented 5 years ago

Hi Chriszach,

thanks for trying out our accelerator.

Yes the behaviour you described is exactly how it should be, since the account data of the accelerator is static, not dynamic. So making payments and similar actions do not affect the data.

Everything after the successfully SCA of a payment is logic of the core banking system of the aspsp. So its no more in scope of the PSD2-Accelerator.

If you have any further questions, do not hesitate to reply.

chriszach commented 5 years ago

Hi wandi34,

First of all, thank you for the immediate reply.

If I understand correctly, if someone wants to simulate the full functionality (e.g the payments being executed and seeing changes in the accounts), it would have to be by setting up the full xs2a interface found here https://github.com/adorsys/xs2a, since there is an ASPSP mock server ?

wandi34 commented 5 years ago

This is correct. The PSD2-Accelerator implements the SPI interfaces of https://github.com/adorsys/xs2a and handles the request with static data.

The xs2a project also has a mock-server, which has dynamic data handling. So payments would affect account data. But the implementation of the mock-server is just experimental and will be removed in future releases of xs2a. It is also a lot more difficult to start the xs2a project in comparison to the accelerator. The interface implementation of PSD2-Accelerator is more advanced and tested.

If you would like to have dynamic testdata, you can use the mock-server and implement missing features by your own. Similar as we did it for the sandbox with static data.

chriszach commented 5 years ago

Thanks a lot for the clarification, much appreciated.

Closing the issue.