curl --request GET \
--url https://api.fintoc.com/v1/subscription_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/subscription_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/v1/subscription_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/v1/subscription_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/v1/subscription_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/v1/subscription_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/subscription_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": "si_mceqLoFwfBVHi3q4",
"object": "subscription_intent",
"business_profile": null,
"created_at": "2023-03-08T15:24:11Z",
"customer_email": "payer@example.com",
"mode": "live",
"public_error": null,
"reference_id": "ABC12345",
"status": "created",
"subscription": null,
"widget_token": null
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such subscriptions/subscription_intent: si_mceqLoFwfBVHi3q4",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Get a subscription intent
Retrieves a subscription intent by its id. Only subscription intents matching the live or test mode of the API key are visible. widget_token is always null outside creation.
curl --request GET \
--url https://api.fintoc.com/v1/subscription_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/subscription_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/v1/subscription_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/v1/subscription_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/v1/subscription_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/v1/subscription_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/subscription_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": "si_mceqLoFwfBVHi3q4",
"object": "subscription_intent",
"business_profile": null,
"created_at": "2023-03-08T15:24:11Z",
"customer_email": "payer@example.com",
"mode": "live",
"public_error": null,
"reference_id": "ABC12345",
"status": "created",
"subscription": null,
"widget_token": null
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such subscriptions/subscription_intent: si_mceqLoFwfBVHi3q4",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Autorizaciones
Parámetros de ruta
The id of the subscription intent to retrieve.
Respuesta
The subscription intent. widget_token is always null outside creation.
Represents the flow a payer goes through to authorize a subscription at their bank. A successful subscription intent produces a Subscription.
Unique identifier of the subscription intent.
"si_mceqLoFwfBVHi3q4"
Type of the object. Always subscription_intent.
Information shown to the payer in the widget. null when not provided on creation.
Show child attributes
Show child attributes
ISO 8601 timestamp, in UTC, of when the subscription intent was created.
"2023-03-08T15:24:11Z"
Email address of the payer. Fintoc sends the subscription receipt to this address when the subscription intent succeeds.
"payer@example.com"
Mode of the object. live objects use real institution data, test objects use fake data for integration testing.
test, live "live"
Error code describing why the subscription intent did not succeed. null unless status is failed or rejected.
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 "login_invalid_credentials"
Identifier the payer's bank uses to display the subscription on the bank's portal. null when not provided on creation.
"ABC12345"
Status of the subscription intent. One of created (waiting for the payer to start the authorization), in_progress (the payer is authorizing the subscription at their bank), succeeded (the payer authorized the subscription), failed (the authorization failed or expired), or rejected (the payer's bank rejected the subscription).
created, in_progress, succeeded, failed, rejected "succeeded"
Subscription created when the subscription intent succeeds. null in every other status.
Show child attributes
Show child attributes
Token used to open the widget so the payer can authorize the subscription. Only returned when the subscription intent is created; null in every other response.
"si_mceqLoFwfBVHi3q4_sec_a8Mw9bnHzgVRCMTSDgrJpvkN"
¿Esta página le ayudó?