Checkout-Sitzung erstellen
curl --request POST \
--url https://api.truthlocks.com/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"plan_key": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan_key: '<string>'})
};
fetch('https://api.truthlocks.com/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/checkout"
payload = { "plan_key": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/checkout"
payload := strings.NewReader("{\n \"plan_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"checkout_url": "<string>",
"activated": true,
"plan_key": "<string>",
"message": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "BILLING_COUNTRY_REVIEW_REQUIRED",
"error": "<string>"
}Abrechnung
Checkout-Sitzung erstellen
Eine Zahlungssitzung initiieren, um Ihren Plan zu aktualisieren oder zu ändern.
POST
/
v1
/
billing
/
checkout
Checkout-Sitzung erstellen
curl --request POST \
--url https://api.truthlocks.com/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"plan_key": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan_key: '<string>'})
};
fetch('https://api.truthlocks.com/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/checkout"
payload = { "plan_key": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/checkout"
payload := strings.NewReader("{\n \"plan_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"checkout_url": "<string>",
"activated": true,
"plan_key": "<string>",
"message": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "BILLING_COUNTRY_REVIEW_REQUIRED",
"error": "<string>"
}POST /v1/billing/checkout
activated: true ohne gehosteten Checkout zurückgeben; sie können dennoch Nutzungsgebühren verursachen.
Mitarbeiter müssen das Abrechnungsland genehmigen, bevor kostenpflichtige Pläne oder nutzungsbasierte Geschäftsebenen aktiviert werden. Ein nicht genehmigtes Land gibt HTTP 409 mit code: BILLING_COUNTRY_REVIEW_REQUIRED zurück. Schließen Sie die Länderprüfung zuerst auf der angemeldeten Abrechnungsseite ab.
Senden Sie einen Anbieter aus dem visible_providers des Kontos. Ein URL-Parameter kann das Abrechnungsland nicht ändern. Bestehende kostenpflichtige persönliche Abonnements müssen verwaltet werden, bevor ein weiterer Checkout gestartet wird. Flutterwave lehnt den monatlichen Checkout ab, wenn der wiederkehrende Zahlungsplan fehlt.
Ein Checkout-Link ist kein Zahlungsnachweis. Aktualisieren Sie das Abonnement nach Bestätigung durch den Anbieter.
Antwort
Die URL der gehosteten Checkout-Seite. Leiten Sie den Benutzer zu dieser URL um, um die Zahlung abzuschließen.
Autorisierungen
Body
application/json

