-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
4446 lines (4059 loc) · 149 KB
/
openapi.yaml
File metadata and controls
4446 lines (4059 loc) · 149 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
title: The Plexus API
version: 0.0.1
x-logo:
url: logo.svg
backgroundColor: '#FFFFFF'
contact:
name: plexus GmbH
email: support@plexus.zone
url: https://www.plexus.zone
description: |-
## Postman
* [Collection](plexus-API-v4-test-server.postman_collection.json)
* [Environment](plexus-API-v4-test-server.postman_environment.json)
## Introduction
### <div style="color:red">PSD2</div>
**Due to new requirements in context of PSD2, a draft version of the adapted plexus API is available
[here](http://psd2-docs-preview.plexus.zone/index.html).**
### Introduction
This is the technical documentation of the plexus API. For a general introduction to plexus services
please visit [https://www.plexus.zone](https://www.plexus.zone).
The plexus API offers a unified interface to thousands of banks and numerous payment service
providers. It provides services like retrieving the transaction history, initiating payments,
viewing security portfolios, or receiving notifications on changes like incoming transactions.
### Request API access
To request client credentials to use the plexus API visit
[https://www.plexus.zone/client-id](https://www.plexus.zone/client-id).
### Demo Bank
To get acquainted with the API without using a real bank access, plexus provides a demo bank. It
offers all necessary data for testing and integration in your application.
| Field | Value |
| -- | -- |
| IBAN | DE67900900424711951500 |
| BIC | DEMODE01 |
| Bank Code | 90090042 |
| Account number | 4711951500 |
| Username | demo |
| Password | demo |
| TAN | 111111 (constant for all transactions) |
## Technical foundation
All API access is over HTTPS and all data is sent and received as JSON unless otherwise
specified.
### Errors
If an error occurs during a request, the API returns an HTTP status code >=400 and provides more
information in the response-body.
#### Error Object Structure
| Field | Description |
| -- | -- |
| `code` | Numeric representation of the error |
| `data` | Additional error information (validation information and other details) |
| `description` | Short summary |
| `group` | Group of error |
| `message` | Original message of the bank (only in task errors) |
#### Error Codes
Error codes are grouped in ranges
| Range | Group |
| -- | -- |
| 1000 - 1999 | client |
| 10000 - 19999 | user |
| 20000 - 29999 | bank |
| 30000 - 39999 | plexus |
| 40000 - 49999 | connectivity |
| 50000 - 59999 | categorization |
whereas each code has the following meaning
| Code | Group | Description |
| ------- | ------ | ------------------------------------------------ |
| 1000 | client | Invalid request |
| 1001 | client | Entry already exists |
| 1002 | client | Entity not found |
| 1003 | client | Unauthorized |
| 1004 | client | Invalid client authorization |
| 1005 | client | Payment already processed |
| 1006 | client | Unprocessable entity |
| 1007 | client | Forbidden |
| 1008 | client | Resource busy |
| 1010 | client | User locked |
| 10000 | user | Login credentials are invalid |
| 10001 | user | PIN is invalid |
| 10002 | user | Online access is blocked |
| 10003 | user | TAN scheme not activated |
| 10004 | user | TAN is invalid |
| 10005 | user | No authorization for this account |
| 10006 | user | Transaction rejected |
| 10007 | user | PIN change necessary |
| 10008 | user | No authorization for this business transaction |
| 10009 | user | HBCI activation necessary |
| 10010 | user | Account is blocked |
| 10011 | user | Account no longer exists |
| 10012 | user | TAN scheme is blocked |
| 10013 | user | Status of transaction inconclusive |
| 10014 | user | Account not activated for online banking |
| 10015 | user | Redundant submissions |
| 10016 | user | Invalid OTP |
| 20000 | bank | Processing at the bank not possible |
| 20001 | bank | Bank / account unknown |
| 20002 | bank | Transaction canceled |
| 20003 | bank | Maintenance |
| 20004 | bank | Technical migration |
| 20005 | bank | Transaction not possible |
| 20006 | bank | Login not possible |
| 20007 | bank | Pop up |
| 30000 | plexus | Processing at plexus not possible |
| 30005 | plexus | Task is expired |
| 30006 | plexus | Service temporarily not available |
| 40000 | plexus | Bank not supported |
#### Resource locked
With ongoing improvements on our system at any point a resource might return the HTTP status
code `423` and the error code `1008`. Your application should implement a retry logic with
incremental backoff in the realm of seconds and up to minutes.
The most likley scenario where this happens is after a version change that requires datamigration.
The first request to an unmigrated user would then trigger such a response, consecutive calls
might return `423` until migration is done.
#### Examples:
##### Bad Request - 400
```
{
"error": {
"code": 1000,
"data": {
"bank_code": ["Not a valid string."],
"credentials": ["Credentials must contain at least 2 strings."]
},
"description": "Request body doesn't match input schema.",
"group": "client"
}
}
```
##### Not Found - 404
```
{
"error": {
"code": 1002,
"data": {},
"description": "Not Found",
"group": "client",
}
}
```
## JWE encryption
The plexus API provides the ability to encrypt sensitive information like credentials and
authentication challenge responses with [JSON Web Encryption](https://tools.ietf.org/html/rfc7516).
This is an additional security mechanism to the usual transport layer encryption of the
data.
A common use-case is when a client application communicates through an intermediate server with
the plexus API. To avoid privacy and security issues the sensitive data can be encrypted with
[JWE](https://tools.ietf.org/html/rfc7516) on the client application side to conceal them from
the intermediate server.
plexus provides an [example library](https://github.com/plexus-connect/plexus_jwe_example) which
implements client-side JWE encryption of the credential fields.
Please note that the plaintext to be encrypted has to be a valid [JSON value](https://json.org/).
This means especially that string literals have to be surrounded by double quotes (e.g. `"123456"`).
### plexus public key (production)
```
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1qB2hmObbCbAM+lc+ggDauoIZReejEimnvrmeqEs0opeTeZiiietoHT1FkB8HjlgCWrh6UimxrRvBwwvNn/4uiVEqxuPb37ozWRj87bp1R3iwhzIGHBMgkibfFf9v3FxEjtY6CgCvOJ/12+AiotL+4jBCwsUWcqui3phq4/C19bQTWaN8u1Q1ABB0SSExcfqH3Ahg6i4pJfDwY+/khb4rgvmqPpb7a0tHiWuWqAMUxfEO/GJVaDV+Bq4k5vfUNirIcazUtmnLhBVSTBcjw7OEDEIHGckwUHs6prKE0kkQD4Xjm06XupuZW8/H+/oPBdHJBr+Ugv5Kzlsst/81BEyoQIDAQAB
```
### plexus public key (staging)
```
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxiV1OFoaF/c0BqQLwp1QqmJ+TgPHoLfllEigREsvRCbJImCln6RLtNbLbNTHDaV1+96idkFiQW0y0jlu9RhNuO8p8a5hO8zDpYC1vV5DkWRpbPbapiVYHb8eETI7obA1TAnkN7beTPT3uGm59qhqwlyi+OyfiVdi4N8g2xIq6wWw6nVm9wkvn5BXPjNNBMNE7hdHBcH4zszPSkLq1DjRgLYGjYkhZoP97cqxkcb9epS1KXGNy3Rc977kolvq7JzDdZQLLMW3hf9GGY+GHdMWwyV0+C9klFNLFRZvZoqk0VhYq1oxTp0snvS5NAC8p4mMFJ93HaMUXb3rasGDUiRylQIDAQAB
```
### Supported algorithms
| Key encryption | Content encryption |
| -- | -- |
| RSA-OAEP | A128CBC-HS256 |
| | A256CBC-HS512 |
servers:
- url: https://api.plexus.me
description: Production system
- url: https://staging.plexus.me
description: Staging system
tags:
- name: Transactions
description: |
Each financial provider account has a list of transactions associated with it. In general the
information provided for each transaction should be roughly similar to the contents of the
printed or online transaction statement available from the respective provider. Please note
that not all banks provide the same level of detail.
Fields marked with *FinTS* contain additional data retrieved from banks supporting FinTS/HBCI and
are only present if the respective bank supplies this data.
To display categories the access token must also include the scope `categories=ro`.
- name: Securities
description: >-
Each depot account has a list of securities associated with it. In general the information
provided for each security should be roughly similar to the contents of the printed or online
depot listings available from the respective bank. Please note that not all banks provide the
same level of detail.
- name: Standing Orders
description: |
Bank accounts can have standing orders associated with them if supported by the respective bank.
## Execution day and interval
When working with standing orders you have to take some characteristics into account. If a
`last_execution_date` is set, the standing order has a limited term and will not run
indefinitely. Its day of month must be the same as that of the first execution.
If you want to identify the next execution date you have to use the `interval` and `execution_day`
parameters to calculate the next execution date. interval defines the regular cycle the
standing order gets executed. On top of it the `execution_day` states the day of execution
within the interval.
This value depends on the `interval` chosen. If the interval is set to `weekly`, possible values
for `execution_day` are: `0` (daily), `1` (Monday), `2` (Tuesday) … `7` (Sunday). Note that
not every bank supports the `weekly` interval.
If the interval is set to one of the other possible values, `execution_day` could be: `1-30`
(1st day of the month to 30th day of the month) or `97` (closing of the month minus two), `98`
(closing of the month minus one), `99` (closing of the month).
The same values are used for all the other intervals. That is, you can only specify the day of
month of a payment, even for yearly payments. The date of a repeated execution is then
computed by adding interval to the month of the date of submission, ignoring
`first_execution_date`, and using `execution_day` for day of month.
#### (Contrived) Example:
- Submission: 2017-01-20
- First execution: 2017-02-10
- Interval: half yearly
- Execution day: 15
- Next execution (computed): 2017-06-15
To be sure, set the execution day to the day of the first execution and set the first
execution date in the current month.
#### (Realistic) Example:
- Submission: 2017-02-01
- First execution: 2017-02-10
- Interval: half yearly
- Execution day: 20
- Next execution (computed): 2017-07-20
The minimum lead time (time between submission and first execution) is 2 days, maximum lead
time is 180 days. This means you cannot submit a standing order to be executed on the same
day.
Also note that the actual execution of a standing order may occur later due to weekends or
holidays.
- name: Notifications
description: |
Whenever an account gets synchronized with the associated financial provider and new data is
fetched, your application can asynchronously be notified via webhooks about certain events.
For which events your application gets called depends on the notification key used, whose
format is described in the following section.
For a notification to be considered as delivered successfully, the webhook endpoint should
return HTTP response codes in the range of `2xx` or `3xx`. Everything else will be
assumed an error.
## Callback Request Headers
When a notification is triggerd the configured callback endpoint is called by the plexus API
setting the `User-Agent` header to `plexus-notification/<plexus-api-version>`. E.g.
```
User-Agent: plexus-notification/19.10.0
```
# Observe Keys
When configuring a new notification you have to specify an observe key which defines the
trigger condition for the notification. The observe key is composed of a path and a number of
query parameters similar to an URL without scheme and host part.
A client is only allowed to configure a notification of a certain type if he has the required
scope for this specific notification.
## Account balance
Triggered when the respective account balance changes
| Observe key | `/rest/accounts/{account-id}/balance?inferior_limit=<int>` |
| -- | -- |
| **Scope** | `balance=ro` |
### Parameters
| Name | In | Description |
| -- | -- | -- |
| account-id | path | plexus account ID |
| inferior_limit | query | Trigger if the balance of the account is below this value |
## Transactions of Account
Triggered when an account has received new transactions
| Observe key | `/rest/accounts/{account-id}/transactions?<params>` |
| -- | -- |
| **Scope** | `transactions=ro` |
### Parameters
All query-paramters for this observe key can be combined with `include_pending` but not
amongst each other.
| Name | In | Description |
| -- | -- | -- |
| account-id | path | plexus account ID. |
| include_pending | query | Also consider pending transactions. |
| more_expenses_then_deposits | query | Trigger if the sum of expenses in the current month exceeds the sum of deposits. |
| current_month_expense_goal | query | Trigger if the sum of expenses in the current month exceeds the provided value. |
| single_expense_goal | query | Trigger for expense transactions exceeding the provided value. |
| single_deposit_goal | query | Trigger for expense transactions exceeding the provided value. |
| purpose | query | Trigger on transactions whose purpose contains the provided value. |
| name | query | Trigger on transactions whose sender/receiver name contains the provided value. |
## All transactions
| Observe key | `/rest/transactions` |
| -- | -- |
| **Scope** | `transactions=ro` |
### Parameters
All query-paramters for this observe key can be combined with `include_pending` but not
amongst each other.
| Name | In | Description |
| -- | -- | -- |
| include_pending | query | Also consider pending transactions. |
| more_expenses_then_deposits | query | Trigger if the sum of expenses in the current month exceeds the sum of deposits. |
| current_month_expense_goal | query | Trigger if the sum of expenses in the current month exceeds the provided value. |
| single_expense_goal | query | Trigger for expense transactions exceeding the provided value. |
| single_deposit_goal | query | Trigger for expense transactions exceeding the provided value. |
| purpose | query | Trigger on transactions whose purpose contains the provided value. |
| name | query | Trigger on transactions whose sender/receiver name contains the provided value. |
## Auto-sync error
Triggered when the saved PIN of a user is not accepted from the corresponding bank while
performing an auto sync.
| Observe key | `/rest/accounts/{account-id}/sync?wrong_pin=1` |
| -- | -- |
| **Scope** | `balance=ro transactions=ro` |
### Parameters
| Name | In | Description |
| -- | -- | -- |
| account-id | path | plexus account ID |
| wrong_pin | query | Trigger if the PIN of the provider access was reported to be in this state. |
## Test-notification
Triggered immediately. This special notification key can be used to test the delivery of
notifications. The notification message will be sent immediately and no registration occurs.
| Observe key | `rest/notifications/test` |
| -- | -- |
| **Scope** | - |
- name: Payments
description: |
Each account can contain payments. Payments can be created, updated, deleted and submitted.
To initiate a payment, create a payment and submit it.
- name: Catalog
description: |
The plexus API provides access to many different financial providers, like banks and online
payment services. Information on them can be accessed in the catalog, where service details
and credentials requirements are listed.
## API Calls
Setting the `Accept-Language` to one of the available language will return results in this
language.
- name: Accounts
description: |
- name: User Management
description: |
## One plexus user per application user
If the use case requires to interact with the plexus API for one user over an extended period of
time, it is recommended to create one plexus user per application user. This way the data of
each of your users is securely separated.
In this scenario it is recommended to create the plexus users with a username directly mappable
from your application user IDs, e.g. using `<your user ID>@plexus.<yourapplication domain>`.
That way you do not have to save any additional information and still do not block email
address of your user for explicit plexus API usage. A similar, but more secure, mapping is
recommended for the user's password.
## One plexus user per application transaction
It is possible to only integrate the plexus API as part of processing a transaction, e.g. to
verify account owner information. In this scenario it is recommended to create one plexus user
per transaction and delete it after the plexus API integration part of the transaction
processing is completed.
For the same reasons as in the other case a simple mapping between your transaction and the
plexus username/password is recommended for this case as well, e.g. `<your transaction
ID>@plexus.<your application domain>` as username.
In order to keep transaction processing time as short as possible, we recommend to defer any
clean-up activities.
- name: Synchronizations
description: |
## Connect a provider access
In order to be able to fetch financial data from a provider the corresponding access has
to be configured first. The configuration procedure is summarized as follows
1. Lookup the financial provider to be connected in [the catalog](#operation/listCatalog) and
select one of the available access methods. Also notice which credentials are required to
be used for this provider access.
2. Obtain the required login credentials as specified by the access method from the customer.
3. Add a new [access](#operation/addProviderAccess) handle.
4. Start a [synchronization](#operation/createSync) for the access.
5. Guide the customer through the process of strong customer authentication.
## Synchronize a provider access
In order to keep the financial data accessible through the plexus API up-to-date the financial
provider has to be periodically queried for updates. This process is called synchronization.
The plexus API performs an automatic synchronization on a daily basis, as long as the customer
has given the authorization to store the credentials for the provider access to be
synchronized.
A synchronization that is manually triggerd through the API allows the customer to respond to
authorization challenges.
## Background operations
Interactions with a financial service provider are never executed in the scope of an API
request but rather performed asynchroneously in the background. A synchronization is an
example for such a background operation. The states that a synchronization can traverse during
its lifetime are defined by the following state-machine.
<div class="diagram">
graph LR
B[QUEUED]
B --> C[RUNNING]
C --> D[AWAIT_AUTH]
D --> |response created| C
C --> E[FAILED]
D --> E
C --> F[COMPLETED]
</div>
Every synchronization starts in the `QUEDED` state and is moved to the `RUNNING` state when it
is picked up by the job processing backend. While communicating with the financial service
provider an authorization challenge can be issued, in which case the syncrhonization is moved
to the `AWAIT_AUTH` state. In this state the end-user's interaction is required in order to
[solve the challenge](#operation/solveSyncChallenge). For a detailed description of
available challange types see the section [Strong Customer Authentication](#tag/Strong-Customer-Authentication).
After the challenge has been solved the synchronization switches back to the `RUNNING` state
and eventually to the `COMPLETED` state. While processing a syncrhonization multiple
authorization challenges can be issued so that the state can toggle between `AWAIT_AUTH` and
`RUNNING`. In case of an error the work item's state will be set to `FAILED` and no further
processing will take place.
- name: Strong Customer Authentication
description: |
The PSD2 requires a strong customer authentication for all interactions with a customer's
bank. This means that two out of the following three factors have to be used for
authentication:
- Possession
- Inherence (Identity)
- Knowledge
An authenticated customer can authorize interactions triggered through the plexus API, like
e.g. a synchronization of account and transaction data or the submission of a payment.
The following sections describe the challenge types supported by the plexus API.
### Decoupled challenges
In this case the process of strong customer authentication is to be carried out with a
device or app that is provided by the financial service provider.
### Redirect challenges
In case of a redirect challenge the authentication is performed at the authentication
server of the financial service provider. The customer's user agent has to be redirected to
the URI given in the challenge.
### Embedded challenges
In this case the authentication process is embedded into the user interface on the side of
the TPP. The following different formats of challenges are available
| Format | Description |
| --- | --- |
| TEXT | An instructional text from the service provider describing further steps. |
| HTML | Similar to TEXT but with additional markup. |
| HHD | The data encodes an animated image processable by the users TAN generator. Please [contact us](mailto:developer@plexus.zone) in case you would like to provide native support for this in your application. |
| PHOTO | An image which should be shown to the user. The image is encoded following [RFC 2397](http://tools.ietf.org/html/rfc2397) |
**Note**: An end user might have multiple SCA methods available to him. In this case a SCA
method has to be selected.
x-tagGroups:
- name: General
tags:
- Client Authorization
- User Management
- Catalog
- Accesses
- Strong Customer Authentication
- Synchronizations
- Accounts
- Banks
- Transactions
- Payments
- Standing Orders
- Securities
- Notifications
- Version
paths:
/auth/token:
post:
tags:
- Client Authorization
summary: Create access token
operationId: createAccessToken
description: |-
### Access Tokens
Access tokens authorize your application to perform operations on the resources of a user,
they are short lived e.g. 1 hour.
To obtain an access token you can use one of the following grant types:
| Grant Type | Description |
| -- | -- |
| `password` | User Credentials |
| `refresh_token` | Refresh Token |
| `authorization_code` | Authorization Code |
The user has to be [created](#operation/createUser) beforehand.
### Password
The password does not expire but three consecutive wrong attempts will lock the user.
### Authorization Code
An authorization code can only be used once and has a short lifetime e.g. 5 minutes.
### Refresh Tokens
A refresh token allows it to request additional access tokens (e.g. after the access token
has expired). Refresh tokens are only valid to a maximum of 90 days.
When issuing a refresh request the response may contain a new refresh token so that your
application has to discard the old token and replace it with the new refresh token.
### Note
The actual length in bytes of all tokens (access and refresh tokens as well as authorization
codes) can vary. Therefore it is highly advised to not limit the size of the database field
in your storage backend. If you have to specify a size for the corresponding database field
a choice of at least 2048 bytes is highly recommended.
security:
- client_auth: []
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/UserCredentialRequest'
- $ref: '#/components/schemas/RefreshTokenRequest'
- $ref: '#/components/schemas/AuthorizationCodeRequest'
responses:
'200':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/AccessToken'
example:
access_token: AoFmNJLDTW8jQtGSJ1iZeeoLiwNZ2ihz3iiCHGpuvE439nppuY
expires_in: 3600
scope: accounts=ro balance=ro transactions=ro offline
token_type: Bearer
refresh_token: RTfI2WNyK78NozupDH9ai8GPRbjjdVsXPPt...
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'4XX':
$ref: '#/components/responses/GenericError'
/rest/accesses:
post:
summary: Add provider access
description: |-
Attach a new provider access to the user's account. If the provider uses an authentication
flow where customer credentials have to be presented, use the information from the catalog
to identify available input fields. All mandatory (`is_optional=false`) public
(`is_secret=false`) fields have to be provided when creating an access. All credentials
that are sent with the request are securely stored in the plexus backend.
tags:
- Accesses
security:
- user_auth: []
operationId: addProviderAccess
responses:
'201':
$ref: '#/components/responses/AccessDetails'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
requestBody:
$ref: '#/components/requestBodies/CreateAccess'
get:
summary: List provider accesses
operationId: listProviderAccesses
description: |-
List all connected provider accesses of user.
tags:
- Accesses
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/ProviderAccessList'
'401':
$ref: '#/components/responses/Unauthorized'
/rest/accesses/{access-id}:
get:
summary: Get provider access
operationId: getProviderAccess
description: |-
Retrieve the details of a specific provider access identified by its ID.
tags:
- Accesses
security:
- user_auth: []
parameters:
- $ref: '#/components/parameters/AccessID'
responses:
'200':
$ref: '#/components/responses/AccessDetails'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/rest/accesses/{access-id}/remove_pin:
post:
summary: Remove stored PIN
operationId: removePINFromProviderAccess
description: |-
Remove a PIN from the API backend that has been previously stored for automatic
synchronization or ease of use.
tags:
- Accesses
security:
- user_auth: []
parameters:
- $ref: '#/components/parameters/AccessID'
responses:
'200':
$ref: '#/components/responses/AccessDetails'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/rest/accesses/{access-id}/syncs:
post:
summary: Start provider synchronization
operationId: createSync
description: |
In order for the plexus API to have up-to-date transaction and account information, it needs
to query the bank servers, a process which is called synchronization. With this call you can
create a new synchronization to fetch updated data from the provider.
If the confidential parts of the provider credentials have not been given when creating the
access they have to be send with this request. If the `save_secrets` flag is set to `true`
the credentials are stored in the plexus backend, so that subsequent synchronizations can be
triggered without providing the credentials again.
tags:
- Synchronizations
parameters:
- $ref: '#/components/parameters/AccessID'
security:
- user_auth: []
requestBody:
$ref: '#/components/requestBodies/CreateSynchronization'
responses:
'201':
$ref: '#/components/responses/Synchronization'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/rest/accesses/{access-id}/syncs/{sync-id}:
get:
summary: Get synchronization status
operationId: getSyncStatus
tags:
- Synchronizations
parameters:
- $ref: '#/components/parameters/AccessID'
- $ref: '#/components/parameters/SyncID'
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/Synchronization'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/rest/accesses/{access-id}/syncs/{sync-id}/challenges:
get:
summary: List synchronization challenges
operationId: listSyncChallenges
tags:
- Strong Customer Authentication
parameters:
- $ref: '#/components/parameters/AccessID'
- $ref: '#/components/parameters/SyncID'
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/ChallengeList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/rest/accesses/{access-id}/syncs/{sync-id}/challenges/{challenge-id}:
get:
summary: Get synchronization challenge
operationId: getSyncChallenge
tags:
- Strong Customer Authentication
parameters:
- $ref: '#/components/parameters/AccessID'
- $ref: '#/components/parameters/SyncID'
- $ref: '#/components/parameters/ChallengeID'
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/Challenge'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/rest/accesses/{access-id}/syncs/{sync-id}/challenges/{challenge-id}/response:
post:
summary: Solve synchronization challenge
description: |-
This endpoint is used to answer an authorization challenge that was issued by the financial
provider. In addition to the normal transport layer encryption it is possible to encrypt
the challenge response usinge [JSON web encryption](#section/JWE-encryption). Note that a
challenge can only be answered once. Subsequent submission of a response to the same
challenge will result in an error (HTTP status `409`).
operationId: solveSyncChallenge
tags:
- Strong Customer Authentication
parameters:
- $ref: '#/components/parameters/AccessID'
- $ref: '#/components/parameters/SyncID'
- $ref: '#/components/parameters/ChallengeID'
security:
- user_auth: []
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AuthMethodSelectResponse'
- $ref: '#/components/schemas/ChallengeResponse'
- $ref: '#/components/schemas/ChallengeResponseJWE'
responses:
'202':
$ref: '#/components/responses/Accepted'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'409':
$ref: '#/components/responses/Conflict'
/rest/accounts:
get:
tags:
- Accounts
summary: List accounts
operationId: listAccounts
description: |-
Get a list of all available accounts to which the user has granted access.
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/AccountList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'4XX':
$ref: '#/components/responses/GenericError'
/rest/accounts/{account-id}:
get:
summary: Get account
operationId: getAccount
description: |-
Retrieve detailed information about an account identified by its ID.
tags:
- Accounts
security:
- user_auth: []
parameters:
- $ref: '#/components/parameters/AccountID'
- $ref: '#/components/parameters/CentsQuery'
responses:
'200':
$ref: '#/components/responses/AccountDetails'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'4XX':
$ref: '#/components/responses/GenericError'
delete:
summary: Delete account
operationId: deleteAccount
description: |-
Once the last remaining account of a bank contact has been removed, the provider access
will be automatically removed as well.
tags:
- Accounts
security:
- user_auth: []
parameters:
- $ref: '#/components/parameters/AccountID'
responses:
'204':
$ref: '#/components/responses/NoContent'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/rest/accounts/{account-id}/balance:
get:
summary: Get account balance
operationId: getAccountBalance
description: |-
Retrieve the balance of an account identified by its ID.
tags:
- Accounts
parameters:
- $ref: '#/components/parameters/AccountID'
- $ref: '#/components/parameters/CentsQuery'
security:
- user_auth: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountBalance'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'4XX':
$ref: '#/components/responses/GenericError'
/rest/transactions:
get:
summary: List transactions
operationId: listTransactions
description: |-
Get a list of the transactions of all accounts. You can additionally constrain the amount
of transactions being returned by using the query parameters described below as filters.
tags:
- Transactions
parameters:
- $ref: '#/components/parameters/AccountsFilter'
- $ref: '#/components/parameters/TransactionFilter'
- $ref: '#/components/parameters/SynchronizationFilter'
- $ref: '#/components/parameters/CountQuery'
- $ref: '#/components/parameters/OffsetQuery'
- $ref: '#/components/parameters/SortQuery'
- $ref: '#/components/parameters/SinceQuery'
- $ref: '#/components/parameters/UntilQuery'
- $ref: '#/components/parameters/TransactionSinceTypeQuery'
- $ref: '#/components/parameters/TransactionTypesQuery'
- $ref: '#/components/parameters/CentsQuery'
- $ref: '#/components/parameters/IncludePendingQuery'
- $ref: '#/components/parameters/IncludeStatisticsQuery'
security:
- user_auth: []
responses:
'200':
$ref: '#/components/responses/TransactionList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/rest/accounts/{account-id}/transactions:
get:
summary: List transactions of account
operationId: listTransactionsOfAccount
description: |-
Get a list of the transactions associated with a specific account. You can additionally
constrain the amount of transactions being returned by using the query parameters described
below as filters.
tags:
- Transactions
security:
- user_auth: []
parameters:
- $ref: '#/components/parameters/AccountID'
- $ref: '#/components/parameters/AccountsFilter'
- $ref: '#/components/parameters/TransactionFilter'
- $ref: '#/components/parameters/CountQuery'
- $ref: '#/components/parameters/OffsetQuery'
- $ref: '#/components/parameters/IncludePendingQuery'
- $ref: '#/components/parameters/SortQuery'
- $ref: '#/components/parameters/SinceQuery'
- $ref: '#/components/parameters/UntilQuery'
- $ref: '#/components/parameters/TransactionSinceTypeQuery'
- $ref: '#/components/parameters/TransactionTypesQuery'
- $ref: '#/components/parameters/CentsQuery'
- $ref: '#/components/parameters/IncludeStatisticsQuery'
responses: