GuthabenCheckout-Session für Guthaben erstellen

Checkout-Session für Guthaben erstellen

Eine eingebettete Stripe-Checkout-Session für einen Guthabenkauf erstellen. planId angeben, oder sowohl customAmount als auch customCredits (customAmount Minimum 99).

curl -X POST "https://api.talkturo.com/api/credits/checkout" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (tk_live_ or tk_test_)" \
  -d '{
  "accountId": "example_string",
  "accountSlug": "example_string",
  "planId": "example_string",
  "customAmount": 3.14,
  "customCredits": 3.14,
  "customerId": "example_string",
  "customerEmail": "user@example.com",
  "toltReferral": "example_string"
}'
{
  "success": true,
  "checkoutToken": "example_string",
  "sessionId": "example_string",
  "credits": 3.14,
  "amount": 3.14
}
POST
/credits/checkout
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (tk_live_ or tk_test_)
Bearer Tokenstring
Required

Talkturo-API-Schlüssel. Senden als Authorization: Bearer tk_live_... oder Authorization: Bearer tk_test_.... Standard-Scope ist *; Rate-Limit standardmäßig 1000 Anfragen pro Stunde.

Talkturo-API-Schlüssel. Senden als Authorization: Bearer tk_live_... oder Authorization: Bearer tk_test_.... Standard-Scope ist *; Rate-Limit standardmäßig 1000 Anfragen pro Stunde.
API Key (cookie: sb-access-token)
sb-access-tokenstring
Required

Authentifiziertes Talkturo-Web-Session-Cookie (Supabase-httpOnly-Session). Browser-Clients senden dies nach der Anmeldung typischerweise automatisch. Je nach Client können auch zugehörige Refresh-Cookies vorhanden sein.

Authentifiziertes Talkturo-Web-Session-Cookie (Supabase-httpOnly-Session). Browser-Clients senden dies nach der Anmeldung typischerweise automatisch. Je nach Client können auch zugehörige Refresh-Cookies vorhanden sein.
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tk_live_ or tk_test_). Talkturo-API-Schlüssel. Senden als Authorization: Bearer tk_live_... oder Authorization: Bearer tk_test_.... Standard-Scope ist *; Rate-Limit standardmäßig 1000 Anfragen pro Stunde.

path
parameterstring
Required

API Key for authentication. Authentifiziertes Talkturo-Web-Session-Cookie (Supabase-httpOnly-Session). Browser-Clients senden dies nach der Anmeldung typischerweise automatisch. Je nach Client können auch zugehörige Refresh-Cookies vorhanden sein.

Responses

successboolean
checkoutTokenstring
sessionIdstring
creditsnumber
amountnumber