Create Subscription Intent
curl --request POST \
--url https://api.fintoc.com/v1/subscription_intents \
--header 'Content-Type: application/json' \
--data '
{
"reference_id": "<string>",
"business_profile": {
"name": "<string>"
}
}
'import requests
url = "https://api.fintoc.com/v1/subscription_intents"
payload = {
"reference_id": "<string>",
"business_profile": { "name": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({reference_id: '<string>', business_profile: {name: '<string>'}})
};
fetch('https://api.fintoc.com/v1/subscription_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/subscription_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '<string>',
'business_profile' => [
'name' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/subscription_intents"
payload := strings.NewReader("{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/subscription_intents")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/subscription_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"si_m7N9rAWJS9dWDKEe\",\n \"object\": \"subscription_intent\",\n \"widget_token\": \"si_m7N9rAWJS9dWDKEe_sec_1y7o6DYLY299p7ePP7zevTEj\",\n \"status\": \"created\",\n \"bank_acount\": null,\n \"subscription\": null,\n\t\"created_at\": \"2021-11-11T02:29:16Z\"\n}""{}"Subscription Intents
Create Subscription Intent
POST
/
subscription_intents
Create Subscription Intent
curl --request POST \
--url https://api.fintoc.com/v1/subscription_intents \
--header 'Content-Type: application/json' \
--data '
{
"reference_id": "<string>",
"business_profile": {
"name": "<string>"
}
}
'import requests
url = "https://api.fintoc.com/v1/subscription_intents"
payload = {
"reference_id": "<string>",
"business_profile": { "name": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({reference_id: '<string>', business_profile: {name: '<string>'}})
};
fetch('https://api.fintoc.com/v1/subscription_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/subscription_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '<string>',
'business_profile' => [
'name' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/subscription_intents"
payload := strings.NewReader("{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/subscription_intents")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/subscription_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"<string>\",\n \"business_profile\": {\n \"name\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"si_m7N9rAWJS9dWDKEe\",\n \"object\": \"subscription_intent\",\n \"widget_token\": \"si_m7N9rAWJS9dWDKEe_sec_1y7o6DYLY299p7ePP7zevTEj\",\n \"status\": \"created\",\n \"bank_acount\": null,\n \"subscription\": null,\n\t\"created_at\": \"2021-11-11T02:29:16Z\"\n}""{}"v1 · Base URL https://api.fintoc.com/v1Headers
Fintoc Secret Key
Body
application/json
Optional ID provided by the merchant which will determine how the bank identifies the subscription on its portal. If not provided, user's holder_idwill be used. Length must be between 1-15 characters, and its only available for Subscriptions' clients.
Optional information about the name to be shown as the company to which the user is subscribing to
Show child attributes
Show child attributes
Was this page helpful?
⌘I