404 until live access is announced, and nothing is charged in sandbox.
This quickstart takes you from a sandbox application to the accounts, balances and transactions of the Didit Test Bank with copy-paste requests.
Every response below is shortened to the fields that matter.
Keep the API key on your server: it never reaches a browser or an app.
Step 1: create an API key with the Bank data permission
Bank data is not part of full access. A full-access key, including the application’s primary secret, is refused on every Bank data call with403 bank_data_access_denied.
- In the Business Console, open your sandbox application and go to API keys.
- Create a key with custom access and add Bank data: Read for the reads, Write for the calls that create, change or delete something.
- Copy the key and export it:
Step 2: create a link
A link is one run of the screens where a person connects a bank. Create an ongoing one for the Test Bank:country is the three-letter country of the person’s bank and is optional.
Send it when you know it, so the person sees only that country’s banks; without it they choose among every country you can serve.
For one-time access send "access": "one_time" (the default).
id with your user.
The url and the client_token are returned once, when the link is created.
Step 3: open the link and connect the Didit Test Bank
Open theurl in a browser, or send it to the person by email or chat.
The person sees the consent screen, picks Didit Test Bank, signs in with one of the test customers and chooses the accounts to share.
The sandbox page lists the test customers and what each gives you.
To return the person to your site afterwards, see Return to your site.
Without a redirect_url the person finishes on Didit’s result page and you learn the result from the webhook or from a read.
Step 4: receive the webhooks and confirm
Subscribe a destination to thebank.* events in the console, as for any webhook.
When the person finishes, bank.link.completed arrives with the link_id and the connection_id, then bank.connection.created when the first sync has stored the accounts.
Never trust a link id that a browser sends you.
Read the link yourself:
status is completed or a final one (cancelled, expired, failed). A failed link carries an error.code; a cancelled one reads error: null.
Step 5: read accounts, balances and transactions
next_page_token while there is more to read.
See Accounts, balances and transactions.
Step 6: follow the change feed
The change feed returns only what changed since your last read. Your first read, with no cursor, is the full snapshot: every transaction the connection has, each asadded, with reset: true.
A first page can carry has_more: true with a next_page_token and no next_cursor yet.
Keep reading with page_token while has_more is true, and store the next_cursor of the last page (the one with has_more: false) for next time:
reset: true means the response is a full snapshot: replace your copy with it instead of adding to it.
bank.data.updated tells you when a sync stored something new.
Step 7: sync now
An ongoing connection syncs by itself. To read the bank now, ask for a sync:sync.live_syncs_left_today and sync.budgets on the connection say how many are left and when they reset, and a call beyond the limit answers 429 refresh_limit_reached with the reset time.
See Refresh bank data on demand.
Step 8: stop access and delete
Stopping access and deleting are two different calls.id, status, status_reason, created_at and erasure.
See Data, consent and deletion.
Next steps
- Connections: one-time and ongoing access, consent and renewal.
- Bank webhooks
- Pricing
- API reference