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"
}Cuando Fintoc completa la actualización, recibes el evento
account.refresh_intent.succeeded. Luego puedes solicitar los movimientos bancarios más recientes a la API de Fintoc.Si la actualización falla o el banco informa que las credenciales no son válidas, recibes el evento
account.refresh_intent.failed o account.refresh_intent.rejected, respectivamente.
Refresh On Demand tiene un costo adicional y debe estar habilitado para tu organización. La API puede rechazar solicitudes mientras haya otra actualización en curso, si las cuentas están al día o durante un tiempo de espera después de un intento anterior. Consulta Actualización bajo demanda para saber cómo habilitarlo, conocer las restricciones de uso y recibir los resultados mediante webhooks.Parámetros de consulta
Respuesta
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
¿Esta página le ayudó?