curl --request POST \
--url https://api.fintoc.com/v1/refresh_intents \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/refresh_intents"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/refresh_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/refresh_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/refresh_intents"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v1/refresh_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/refresh_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "ri_2dXqkOKkS9mOvnaW",
"object": "refresh_intent",
"created_at": "2021-08-23T18:22:46.792Z",
"public_error": null,
"refreshed_object": "link",
"refreshed_object_id": "link_nzwA3XWYiZkg4ojK",
"requires_mfa": null,
"status": "created",
"type": "only_last"
}Create a refresh intent
Creates a refresh intent for a link, using the link’s link_token to authenticate the request. Unless the institution requires multi-factor authentication, the refresh starts asynchronously and Fintoc notifies the result through webhooks. Your organization needs the on demand refresh policy, and Fintoc rate limits consecutive refreshes (5 minutes between only_last refreshes, 60 minutes between historical ones).
curl --request POST \
--url https://api.fintoc.com/v1/refresh_intents \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/refresh_intents"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/refresh_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/refresh_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/refresh_intents"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v1/refresh_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/refresh_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "ri_2dXqkOKkS9mOvnaW",
"object": "refresh_intent",
"created_at": "2021-08-23T18:22:46.792Z",
"public_error": null,
"refreshed_object": "link",
"refreshed_object_id": "link_nzwA3XWYiZkg4ojK",
"requires_mfa": null,
"status": "created",
"type": "only_last"
}When Fintoc completes the update, you receive the
account.refresh_intent.succeeded event. You can then request the latest bank movements from the Fintoc API.When the update fails or the bank reports invalid credentials, you receive the
account.refresh_intent.failed or account.refresh_intent.rejected event, respectively.
Refresh On Demand is available at an extra cost and must be enabled for your organization. The API can reject requests while another refresh is in progress, while accounts are up to date, or during a waiting period after a previous attempt. See Refreshing on demand for how to enable the feature, usage restrictions, and webhook results.Query Parameters
Response
Refresh intent created. If requires_mfa is null the refresh starts immediately; otherwise complete the multi-factor authentication in the widget with requires_mfa.widget_token.
Reason the refresh did not complete. retryable_error means you can retry the refresh. support_required_error means you need to contact Fintoc support. invalid_credentials_error means the institution rejected the credentials, so the account holder needs to reconnect the link. credentials_locked_error means the institution reports the account as locked, so the account holder needs to unlock the account with the institution before the link can refresh again. null when status is neither failed nor rejected, and when the institution did not report a reason Fintoc can map.
retryable_error, support_required_error, invalid_credentials_error, credentials_locked_error, null null
Was this page helpful?