curl --request PATCH \
--url https://api-sandbox.beinfi.com/account/tenant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoObjectKey": "<string>"
}
'import requests
url = "https://api-sandbox.beinfi.com/account/tenant"
payload = {
"name": "<string>",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoObjectKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
termsUrl: 'https://acme.ai/termos',
supportEmail: 'contato@acme.ai',
logoObjectKey: '<string>'
})
};
fetch('https://api-sandbox.beinfi.com/account/tenant', 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-sandbox.beinfi.com/account/tenant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'termsUrl' => 'https://acme.ai/termos',
'supportEmail' => 'contato@acme.ai',
'logoObjectKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.beinfi.com/account/tenant"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api-sandbox.beinfi.com/account/tenant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/account/tenant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"status": "active",
"collectionMode": "byop",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>",
"errors": [
{
"field": "<string>",
"value": "<string>",
"constraint": "<string>",
"description": "<string>"
}
]
}Update your account
Send only the fields you want to change; at least one. null leaves a field unchanged.
curl --request PATCH \
--url https://api-sandbox.beinfi.com/account/tenant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoObjectKey": "<string>"
}
'import requests
url = "https://api-sandbox.beinfi.com/account/tenant"
payload = {
"name": "<string>",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoObjectKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
termsUrl: 'https://acme.ai/termos',
supportEmail: 'contato@acme.ai',
logoObjectKey: '<string>'
})
};
fetch('https://api-sandbox.beinfi.com/account/tenant', 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-sandbox.beinfi.com/account/tenant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'termsUrl' => 'https://acme.ai/termos',
'supportEmail' => 'contato@acme.ai',
'logoObjectKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.beinfi.com/account/tenant"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api-sandbox.beinfi.com/account/tenant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/account/tenant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"termsUrl\": \"https://acme.ai/termos\",\n \"supportEmail\": \"contato@acme.ai\",\n \"logoObjectKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"status": "active",
"collectionMode": "byop",
"termsUrl": "https://acme.ai/termos",
"supportEmail": "contato@acme.ai",
"logoUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>",
"errors": [
{
"field": "<string>",
"value": "<string>",
"constraint": "<string>",
"description": "<string>"
}
]
}Authorizations
Your account's secret key: Authorization: Bearer sk_test_… or sk_live_…. Server-side only.
Headers
A unique key per operation (a UUID works). Retrying with the same key returns the original response.
Body
Account name
active, suspended, closed, null https:// URL of your terms of use, quoted in the consent a buyer accepts before a recurring charge. An empty string clears it.
"https://acme.ai/termos"
Contact email: set as Reply-To on buyer emails and used for account notices. When unset, the owner's login email is used.
"contato@acme.ai"
Response
Success.
Your Infi account.
Your account's public identifier, used in checkout URLs (/pay/{slug}).
active, suspended, closed How the account collects in production: byop through your connected providers, managed through Infi's account. Always byop in sandbox.
byop, managed URL of your terms of use. null when unset.
"https://acme.ai/termos"
Contact email. null when unset.
"contato@acme.ai"
Logo shown at checkout. null when unset.