Get a setup intent
curl --request GET \
--url https://api.fintoc.com/v2/setup_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/setup_intents/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/setup_intents/{id}', 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/v2/setup_intents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/setup_intents/{id}"
req, _ := http.NewRequest("GET", 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.get("https://api.fintoc.com/v2/setup_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/setup_intents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "seti_2cKoy3PEXAuvkr4ofXC1KdMvCgZ",
"object": "setup_intent",
"status": "failed",
"error_reason": "invalid_card"
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such setup_intent: seti_nonexistent",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Setup intents
Get a setup intent
Retrieves the setup intent with the given id. The setup intent must belong to your organization and match the live or test mode of the API key used.
GET
/
v2
/
setup_intents
/
{id}
Get a setup intent
curl --request GET \
--url https://api.fintoc.com/v2/setup_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/setup_intents/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/setup_intents/{id}', 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/v2/setup_intents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/setup_intents/{id}"
req, _ := http.NewRequest("GET", 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.get("https://api.fintoc.com/v2/setup_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/setup_intents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "seti_2cKoy3PEXAuvkr4ofXC1KdMvCgZ",
"object": "setup_intent",
"status": "failed",
"error_reason": "invalid_card"
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such setup_intent: seti_nonexistent",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Response
The setup intent with the given id.
Error code describing why the latest setup attempt failed or expired. null until an attempt fails or expires, and when the setup succeeds.
Available options:
null, login_invalid_credentials, login_credentials_locked, authorization_timeout, mfa_authorization_timeout, mfa_unavailable, bank_connection_error, bank_not_available, password_change_required, request_timeout, subscription_intent_expired, account_type_not_permitted, internal_error, user_left, card_declined, invalid_amount, invalid_card_credentials, invalid_card, authentication_failed, insufficient_funds, payment_method_canceled, payment_method_inactive, identity_verification_failed, expired Example:
"invalid_card"
Was this page helpful?