Abrechnung
Basis-URL: https://app.neuroflash.com/api/workspace-service
Verwalten Sie Abrechnungskontakte und greifen Sie auf das Stripe-Abrechnungsportal zu.
Create stripe checkout sessions
POST
/v1/workspaces/{workspaceId}/billing-contacts/{billingContactId}/stripe-checkout-sessionsAntwort
FeldTypBeschreibung
_embeddedobject
couponobject
_embeddedobject
pricingPlanobject
activebooleanAuf true setzen, wenn dieser Tarifplan bei bestehenden und neuen Abonnements konfiguriert werden kannbillingIntervalstringcategoryIdstringID der Kategorie, zu der dieser Plan gehörtdisplayNamestringName für interne Zwecke wie die Admin-UI oder HubSpot. Sollte Kunden nicht angezeigt werdenidstringID des TarifplansimportedFromLegacyIdintegerisDefaultbooleanIst dies der Standardplan für Neukunden?priceInEuronumberWie viel der Kunde für dieses Abonnement bezahlen musspricePerCurrencyobjectEine Zuordnung von Zeichenfolgenschlüsseln zu GleitkommawertenstripeBillingPortalEnabledbooleantrue, wenn Abonnements mit diesem Tarifplan im Stripe-Abrechnungsportal selbst verwaltet werden könnenstripePriceIdstringID des Preises in StripestripeTrackTokenMeterstringstripeTrackUsagebooleanVeraltettierintegertrialDaysintegerWie viele Testtage sind für diesen Plan zulässigpricingPlanCategoryobject
displayNamestringidstringtranslationKeystringdiscountPercentagenumberlegacyPricingPlanIdintegerpricingPlanIdstringtranslationKeystringcallbackUrlstringURL, zu der nach erfolgreichem Checkout umgeleitet werden soll.languagestringSprache, in der die Checkout-Sitzung geöffnet werden soll. Standardmäßig die Sprache des authentifizierten KundenlegacyPricingPlanIdintegerveraltete ID des Tarifs, für den ein Abonnement erstellt werden sollpricingPlanIdstringstatusstringstripeClientSecretstringClient-Geheimnis für diese Checkout-Sitzung. Wird nur direkt nach der Erstellung gesetztstripePriceIdstringStripe-ID des Preises aus dem neuen Abonnement, das ausgecheckt wirdstripeSubscriptionIdstringID des Stripe-Abonnements, auf das in diesem Checkout abonniert wirdBeispiel
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}/stripe-checkout-sessions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}/stripe-checkout-sessions",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/billing-contacts/${billingContactId}/stripe-checkout-sessions`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/billing-contacts/"+billingContactID+"/stripe-checkout-sessions", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Antwort:
{
"_embedded": {
"coupon": {
"_embedded": {
"pricingPlan": {
"active": "...",
"billingInterval": "...",
"categoryId": "...",
"displayName": "...",
"id": "...",
"importedFromLegacyId": "...",
"isDefault": "...",
"priceInEuro": "...",
"pricePerCurrency": "...",
"stripeBillingPortalEnabled": "...",
"stripePriceId": "...",
"stripeTrackTokenMeter": "...",
"stripeTrackUsage": "...",
"tier": "...",
"trialDays": "..."
},
"pricingPlanCategory": {
"displayName": "...",
"id": "...",
"translationKey": "..."
}
},
"discountPercentage": 0,
"legacyPricingPlanId": 0,
"pricingPlanId": "string",
"translationKey": "string"
}
},
"callbackUrl": "https://app.neuroflash.com/payment-callback?session_id={CHECKOUT_SESSION_ID}",
"language": "de",
"legacyPricingPlanId": 150,
"pricingPlanId": "string",
"status": "complete",
"stripeClientSecret": "string",
"stripePriceId": "string",
"stripeSubscriptionId": "string"
}
Get
GET
/v1/workspaces/{workspaceId}/billing-contacts/{billingContactId}Antwort
FeldTypBeschreibung
activeDiscountstringschreibgeschützt von Stripe synchronisiert: „true" wenn ein Rabatt für diesen Stripe-Kunden aktiv istaddressLine1stringschreibgeschützt von Stripe synchronisiert: Erste Zeile der Adresse des AbrechnungskontaktsaddressLine2stringschreibgeschützt von Stripe synchronisiert: Zweite Zeile der Adresse des Abrechnungskontaktscitystringschreibgeschützt von Stripe synchronisiert: Stadt des Abrechnungskontaktscountrystringschreibgeschützt von Stripe synchronisiert: Land des AbrechnungskontaktscreatedAtstringcreatedByUserIdstringdefaultPaymentCardNumberLastFourDigitsstringdefaultPaymentMethodstringdefaultPaymentMethodCardBrandstringemailstringE-Mail-Adresse des AbrechnungskontaktsidstringimportedFromLegacyCustomerIdintegerVeraltet: wird nur benötigt, solange der Import aus der Legacy-API noch aktiv ist ID des Legacy-Kunden, aus dem dieser importiert wurdenamestringName des AbrechnungskontaktspostalCodestringreadonly von Stripe synchronisiert: Postleitzahl des Abrechnungskontaktsstatestringreadonly von Stripe synchronisiert: Bundesland des AbrechnungskontaktsstripeCustomerIdstringStripe-Kundenkennung zu Abrechnungszwecken. Könnte optional werden, wenn wir andere Zahlungsanbieter hinzufügenupdatedAtstringBeispiel
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/billing-contacts/${billingContactId}`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/billing-contacts/"+billingContactID+"", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Antwort:
{
"activeDiscount": "string",
"addressLine1": "123 Main St",
"addressLine2": "123 Main St",
"city": "Berlin",
"country": "DE",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"defaultPaymentCardNumberLastFourDigits": "1234",
"defaultPaymentMethod": "acss_debit",
"defaultPaymentMethodCardBrand": "amex",
"email": "max.mustermann@neuroflash.com",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyCustomerId": 12345,
"name": "Max Mustermann",
"postalCode": "12345",
"state": "Schleswig-Holstein",
"stripeCustomerId": "cus_12345abcdef",
"updatedAt": "2025-01-14T16:20:59Z"
}
Get
GET
/v1/workspaces/{workspaceId}/billing-contacts/{billingContactId}/stripe-checkout-sessions/{sessionId}Antwort
FeldTypBeschreibung
_embeddedobject
couponobject
_embeddedobject
pricingPlanobject
activebooleanAuf true setzen, wenn dieser Tarifplan bei bestehenden und neuen Abonnements konfiguriert werden kannbillingIntervalstringcategoryIdstringID der Kategorie, zu der dieser Plan gehörtdisplayNamestringName für interne Zwecke wie die Admin-UI oder HubSpot. Sollte Kunden nicht angezeigt werdenidstringID des TarifplansimportedFromLegacyIdintegerisDefaultbooleanIst dies der Standardplan für Neukunden?priceInEuronumberWie viel der Kunde für dieses Abonnement bezahlen musspricePerCurrencyobjectEine Zuordnung von Zeichenfolgenschlüsseln zu GleitkommawertenstripeBillingPortalEnabledbooleantrue, wenn Abonnements mit diesem Tarifplan im Stripe-Abrechnungsportal selbst verwaltet werden könnenstripePriceIdstringID des Preises in StripestripeTrackTokenMeterstringstripeTrackUsagebooleanVeraltettierintegertrialDaysintegerWie viele Testtage sind für diesen Plan zulässigpricingPlanCategoryobject
displayNamestringidstringtranslationKeystringdiscountPercentagenumberlegacyPricingPlanIdintegerpricingPlanIdstringtranslationKeystringcallbackUrlstringURL, zu der nach erfolgreichem Checkout umgeleitet werden soll.languagestringSprache, in der die Checkout-Sitzung geöffnet werden soll. Standardmäßig die Sprache des authentifizierten KundenlegacyPricingPlanIdintegerveraltete ID des Tarifs, für den ein Abonnement erstellt werden sollpricingPlanIdstringstatusstringstripeClientSecretstringClient-Geheimnis für diese Checkout-Sitzung. Wird nur direkt nach der Erstellung gesetztstripePriceIdstringStripe-ID des Preises aus dem neuen Abonnement, das ausgecheckt wirdstripeSubscriptionIdstringID des Stripe-Abonnements, auf das in diesem Checkout abonniert wirdBeispiel
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}/stripe-checkout-sessions/{session_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}/stripe-checkout-sessions/{session_id}",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/billing-contacts/${billingContactId}/stripe-checkout-sessions/${sessionId}`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/billing-contacts/"+billingContactID+"/stripe-checkout-sessions/"+sessionID+"", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Antwort:
{
"_embedded": {
"coupon": {
"_embedded": {
"pricingPlan": {
"active": "...",
"billingInterval": "...",
"categoryId": "...",
"displayName": "...",
"id": "...",
"importedFromLegacyId": "...",
"isDefault": "...",
"priceInEuro": "...",
"pricePerCurrency": "...",
"stripeBillingPortalEnabled": "...",
"stripePriceId": "...",
"stripeTrackTokenMeter": "...",
"stripeTrackUsage": "...",
"tier": "...",
"trialDays": "..."
},
"pricingPlanCategory": {
"displayName": "...",
"id": "...",
"translationKey": "..."
}
},
"discountPercentage": 0,
"legacyPricingPlanId": 0,
"pricingPlanId": "string",
"translationKey": "string"
}
},
"callbackUrl": "https://app.neuroflash.com/payment-callback?session_id={CHECKOUT_SESSION_ID}",
"language": "de",
"legacyPricingPlanId": 150,
"pricingPlanId": "string",
"status": "complete",
"stripeClientSecret": "string",
"stripePriceId": "string",
"stripeSubscriptionId": "string"
}
Update
PUT
/v1/workspaces/{workspaceId}/billing-contacts/{billingContactId}Antwort
FeldTypBeschreibung
activeDiscountstringschreibgeschützt von Stripe synchronisiert: „true" wenn ein Rabatt für diesen Stripe-Kunden aktiv istaddressLine1stringschreibgeschützt von Stripe synchronisiert: Erste Zeile der Adresse des AbrechnungskontaktsaddressLine2stringschreibgeschützt von Stripe synchronisiert: Zweite Zeile der Adresse des Abrechnungskontaktscitystringschreibgeschützt von Stripe synchronisiert: Stadt des Abrechnungskontaktscountrystringschreibgeschützt von Stripe synchronisiert: Land des AbrechnungskontaktscreatedAtstringcreatedByUserIdstringdefaultPaymentCardNumberLastFourDigitsstringdefaultPaymentMethodstringdefaultPaymentMethodCardBrandstringemailstringE-Mail-Adresse des AbrechnungskontaktsidstringimportedFromLegacyCustomerIdintegerVeraltet: wird nur benötigt, solange der Import aus der Legacy-API noch aktiv ist ID des Legacy-Kunden, aus dem dieser importiert wurdenamestringName des AbrechnungskontaktspostalCodestringreadonly von Stripe synchronisiert: Postleitzahl des Abrechnungskontaktsstatestringreadonly von Stripe synchronisiert: Bundesland des AbrechnungskontaktsstripeCustomerIdstringStripe-Kundenkennung zu Abrechnungszwecken. Könnte optional werden, wenn wir andere Zahlungsanbieter hinzufügenupdatedAtstringBeispiel
- cURL
- Python
- Node.js
- Go
curl -X PUT "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
import requests
response = requests.put(
f"https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/workspace-service/v1/workspaces/${workspaceId}/billing-contacts/${billingContactId}`,
{
method: "PUT",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{})
req, _ := http.NewRequest("PUT", "https://app.neuroflash.com/api/workspace-service/v1/workspaces/"+workspaceID+"/billing-contacts/"+billingContactID+"", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Antwort:
{
"activeDiscount": "string",
"addressLine1": "123 Main St",
"addressLine2": "123 Main St",
"city": "Berlin",
"country": "DE",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"defaultPaymentCardNumberLastFourDigits": "1234",
"defaultPaymentMethod": "acss_debit",
"defaultPaymentMethodCardBrand": "amex",
"email": "max.mustermann@neuroflash.com",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"importedFromLegacyCustomerId": 12345,
"name": "Max Mustermann",
"postalCode": "12345",
"state": "Schleswig-Holstein",
"stripeCustomerId": "cus_12345abcdef",
"updatedAt": "2025-01-14T16:20:59Z"
}