-
Notifications
You must be signed in to change notification settings - Fork 14
Doc 1776/open banking partner documentation on docsswanio #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1e14090
c181475
2bb41a8
7e8353b
886b751
ceff774
5646b67
8fb74d5
de3ca37
ac6f1e9
e584fd7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| An Open Banking service that lets a Third-Party Provider retrieve account information from a user's payment account. | ||
| The Account Information Service (AIS) covers account details, balances, and transaction history, accessed under PSD2 with the user's consent. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A Third-Party Provider authorized to access account information on behalf of a user. | ||
| Account Information Service Providers (AISPs) can read account balances and transaction history after the user grants explicit consent. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A pan-European standards initiative that defines the API specifications most banks use for Open Banking. | ||
| Swan's Open Banking interface follows the Berlin Group standard, which gives Third-Party Providers a consistent way to access accounts across the European Economic Area. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| An Open Banking service that lets a Third-Party Provider initiate several payments in a single request. | ||
| Bulk Payment Initiation Service (Bulk PIS) is primarily used by accounting and treasury tools to batch outgoing SEPA Credit Transfers. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,2 @@ | ||||||
| A 180-day token granting a Third-Party Provider Open Banking access to a user's Swan account. | ||||||
| The consent token is issued after the user completes Strong Customer Authentication and must be renewed every 180 days, as required by PSD2. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A European framework that lets users grant regulated third parties access to their payment accounts. | ||
| Swan's Open Banking service lets licensed providers retrieve account information and initiate payments on behalf of Swan account holders, under PSD2. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| An Open Banking service that lets a Third-Party Provider initiate a payment from a user's account. | ||
| The Payment Initiation Service (PIS) requires the user to grant consent for each payment. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A Third-Party Provider authorized to initiate payments on behalf of a user. | ||
| Payment Initiation Service Providers (PISPs) can request SEPA Credit Transfers from a user's account after the user grants explicit consent for each payment. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| The second Payment Services Directive, an EU regulation that governs electronic payment services across the European Economic Area. | ||
| PSD2 requires banks to give regulated Third-Party Providers access to payment accounts through Open Banking interfaces, with the account holder's consent. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Swan's PSD2 compliance platform for Open Banking. | ||
| Salt Edge sits between Third-Party Providers and Swan, managing TPP registration, authentication flows, and data formatting to the Berlin Group standard. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,2 @@ | ||||||
| A PSD2 requirement that protects sensitive banking actions with two independent authentication factors. | ||||||
| Strong Customer Authentication (SCA) combines something the user has (such as their phone) with something they know or are (such as a passcode or biometric), and is required for Open Banking consent and payment confirmation. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Split for readability. |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A regulated company licensed to access bank data or initiate payments on a user's behalf. | ||
| Third-Party Providers (TPPs) are authorized under PSD2 and connect to Swan accounts through Salt Edge, Swan's compliance platform. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,127 @@ | ||||||
| --- | ||||||
| title: Account Information Service (AIS) | ||||||
| --- | ||||||
|
|
||||||
| # Account Information Service (AIS) | ||||||
|
|
||||||
| import AisDefinition from '../definitions/_ais.mdx'; | ||||||
|
|
||||||
| > <AisDefinition /> | ||||||
|
|
||||||
| ## What TPPs can access {#access} | ||||||
|
|
||||||
| - Account list and details. | ||||||
| - Account balances (available, booked, and pending). | ||||||
| - Transaction history, with filtering and pagination. | ||||||
|
|
||||||
| ## AIS flow {#flow} | ||||||
|
|
||||||
| The diagram below shows the full AIS sequence, from the moment the user connects their Swan account to the software application receiving the account data. | ||||||
|
|
||||||
| ```mermaid | ||||||
| sequenceDiagram | ||||||
| autonumber | ||||||
| participant User | ||||||
| participant SoftwareApp as Software application | ||||||
| participant TPP | ||||||
| participant SaltEdge as Salt Edge | ||||||
| participant Swan | ||||||
| User->>SoftwareApp: Wants to connect their Swan account | ||||||
| SoftwareApp->>TPP: Requests the bank connection | ||||||
| TPP->>SaltEdge: Sends authorization request | ||||||
| SaltEdge->>Swan: PSD2 Connector starts the consent flow | ||||||
| Swan-->>User: Redirects to Swan consent application | ||||||
| User->>Swan: Authenticates with SCA and grants consent | ||||||
| Swan-->>SaltEdge: Returns the access token | ||||||
| SaltEdge-->>TPP: Forwards the access token | ||||||
| TPP->>SaltEdge: Requests account data | ||||||
| SaltEdge->>Swan: Fetches account data | ||||||
| Swan-->>SaltEdge: Returns balances and transactions | ||||||
| SaltEdge-->>TPP: Forwards account data | ||||||
| TPP-->>SoftwareApp: Delivers data, which the software displays to the user | ||||||
| ``` | ||||||
|
|
||||||
| ## Common AIS use cases {#use-cases} | ||||||
|
|
||||||
| - Accounting and financial management software importing bank transactions automatically. | ||||||
| - Personal finance management apps aggregating balances across multiple banks. | ||||||
| - Business expense tracking and reconciliation tools. | ||||||
|
|
||||||
| ## Access conditions {#conditions} | ||||||
|
|
||||||
| - The [Swan user](/topics/users/) must authenticate and grant explicit consent. | ||||||
| - The user must have an active [account membership](/topics/accounts/memberships/) with the `canViewAccount` permission. | ||||||
| - Consent must be valid, meaning it has not expired or been revoked. | ||||||
| - The connection must be active, meaning Salt Edge's daily refresh is working. | ||||||
|
|
||||||
| ## Transaction history {#transaction-history} | ||||||
|
|
||||||
| - By default, Swan returns all transactions since account creation, including cards and transfers. | ||||||
| - TPPs commonly filter results to the last 3 months on their end. | ||||||
| - Some TPPs expose an endpoint that lets users retrieve transaction history beyond 3 months. | ||||||
|
|
||||||
| ## Account scope {#account-scope} | ||||||
|
|
||||||
| By default, Swan returns all accounts the user has access to. | ||||||
|
|
||||||
| :::note All or nothing | ||||||
| The consent flow does not currently allow users to select a subset of accounts; it is all or nothing. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
" All or nothing" isn't a great heading for this; recommend making it more user-focused. |
||||||
| This is a known limitation of the current consent flow. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be calling this out as a limitation? Isn't just stating the behaviour enough? |
||||||
| ::: | ||||||
|
|
||||||
| ## No accounts visible after authentication {#troubleshooting-no-accounts} | ||||||
|
|
||||||
| This most often happens when a user authenticates with their **personal phone number**, but their Swan account is tied to their **professional phone number**. | ||||||
| The phone number is Swan's unique [user](/topics/users/) identifier, so authentication succeeds but returns no accounts. | ||||||
|
|
||||||
| **Solutions**: | ||||||
|
|
||||||
| - **Option 1, try with the correct phone number**: authenticate again using the professional phone number linked to the Swan account. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - **Option 2, transfer accounts to the personal phone number**: | ||||||
| 1. If the personal phone number is already linked to another Swan user, that user must first be deactivated to free the number (see the [`deactivateUser` mutation preconditions](/topics/users/overview/guide-deactivate)). | ||||||
| 1. The user linked to the professional phone number (and to the accounts) then changes their phone number to the personal one at [link.swan.io/edit-phone](https://link.swan.io/edit-phone). | ||||||
| 1. Once complete, the accounts are accessible using the personal phone number. | ||||||
|
|
||||||
| For complex cases involving multi-project users, contact [Swan Support](https://supportform.swan.io/). | ||||||
|
|
||||||
| ## Transaction field mapping {#field-mapping} | ||||||
|
|
||||||
| The table below maps Swan's internal transaction fields to the external fields exposed through Salt Edge, following the Berlin Group standard. | ||||||
|
|
||||||
| | Internal field (Swan) | External field (Salt Edge) | Notes | | ||||||
| |---|---|---| | ||||||
| | `id` | `id` | | | ||||||
| | `amount.value` | `amount` | Negative string for debit, positive for credit. | | ||||||
| | `amount.currency` | `currency` | Currency code, such as `EUR` or `USD`. | | ||||||
| | `statusInfo.bookingDate` | `booking_date` | Optional. Date in `YYYY-MM-DD` format. | | ||||||
| | `statusInfo.status` | `status` | Only `Booked` and `Pending` transactions are exposed. `Rejected` transactions are not served through AIS. | | ||||||
| | `statusInfo.valueDate` when `Booked`, otherwise `updatedAt` | `value_date` | Date in `YYYY-MM-DD` format. When the transaction is not booked, this refers to the `updatedAt` date. | | ||||||
| | `label` | `remittance_information.unstructured` | Transaction label or description. Swan defaults to something like `Transfer to/from X` if the input was empty when initiating a SEPA Credit Transfer. | | ||||||
| | `reference` | `remittance_information.structured` | Structured payment reference. | | ||||||
| | `paymentId` | `extra.additional_information` | Not the same as the transaction ID. A payment can have multiple transactions, for example for fees. | | ||||||
| | For SCTs: `creditor.name`. Else if user is on the credit side: `account.holder.info.name`. Else: `counterparty`. | `creditor_details.name` | Creditor or recipient name. | | ||||||
| | `creditor.IBAN` | `creditor_details.account.iban` | Optional. Always served when the transaction is a SEPA Credit Transfer or the end user is on the credit side. | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Currently use 'user' and 'end user' interchangeably throughout the content. Update to user across everything. |
||||||
| | `creditor.currency` | `creditor_details.account.currency` | Optional. Only served when the end user is on the credit side. | | ||||||
| | For SCTs: `debtor.name`. Else if user is on the debit side: `account.holder.info.name`. Else: `counterparty`. | `debtor_details.name` | Debtor or payer name. | | ||||||
| | `debtor.IBAN` | `debtor_details.account.iban` | Optional. Always served when the transaction is a SEPA Credit Transfer or the end user is on the debit side. | | ||||||
| | `debtor.currency` | `debtor_details.account.currency` | Optional. Only served when the end user is on the debit side. | | ||||||
|
|
||||||
| :::note Why rejected transactions are not served | ||||||
| Rejected transactions were never actually debited or credited. | ||||||
| They represent failed payment attempts rather than completed financial movements, so they are excluded from AIS data. | ||||||
| ::: | ||||||
|
|
||||||
| :::caution Reconciliation: do not use `value_date` for pending transactions | ||||||
| For pending transactions, `value_date` maps to `updatedAt`, which changes every time the transaction is updated. | ||||||
|
|
||||||
| Instead: | ||||||
|
|
||||||
| - Use `id` as the stable unique key across all states. | ||||||
| - Use `booking_date` as the date anchor. | ||||||
| - Only reconcile transactions with status `Booked`. | ||||||
| ::: | ||||||
|
|
||||||
| ## References {#references} | ||||||
|
|
||||||
| - [Salt Edge transaction docs](https://priora.saltedge.com/docs/aspsp/v2/swan/ais#connector-endpoints-accounts-accounts-transactions). | ||||||
| - [Swan Transaction interface](https://api-reference.swan.io/interfaces/transaction). | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.