Obtener configuración de facturación
curl --request GET \
--url https://api.truthlocks.com/v1/billing/config \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/config"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"country_code": "<string>",
"country_verified": true,
"country_review_required": true,
"pricing_region": "<string>",
"effective_provider": "<string>",
"visible_providers": [
"<string>"
],
"current_plan": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Facturación
Obtener configuración de facturación
Devuelve el proveedor de pagos efectivo y el plan actual para el inquilino autenticado.
GET
/
v1
/
billing
/
config
Obtener configuración de facturación
curl --request GET \
--url https://api.truthlocks.com/v1/billing/config \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/config"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"country_code": "<string>",
"country_verified": true,
"country_review_required": true,
"pricing_region": "<string>",
"effective_provider": "<string>",
"visible_providers": [
"<string>"
],
"current_plan": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/config
Respuesta
El proveedor de pago seleccionado para esta región (
stripe o flutterwave; vacío si no está disponible).Si el personal ha aprobado el país de facturación actual y no hay una revisión de reemplazo pendiente.
Cuando es verdadero, la evidencia del país debe ser aprobada antes de que se pueda habilitar la nueva facturación de pago.
country no lo anula. Las opciones de proveedor dependen del país y la configuración; el proceso de pago de la suscripción también requiere la configuración del plan recurrente del proveedor.
Consulte enrutamiento de proveedores para conocer las limitaciones de verificación y pago.
