Skip to main content

Billing

Base URL: https://app.neuroflash.com/api/workspace-service

Manage billing contacts and access the Stripe billing portal.

Create stripe checkout sessions

POST/v1/workspaces/{workspaceId}/billing-contacts/{billingContactId}/stripe-checkout-sessions

Response

FieldTypeDescription
_embeddedobject
couponobject
_embeddedobject
pricingPlanobject
activebooleanset to true when this pricingPlan can be configured on existing and new subscriptions
billingIntervalstring
categoryIdstringID of the category this plan belongs to
displayNamestringname used for internal purposes like the admin-ui or hubspot. Should not be displayed to customers
idstringid of the pricing plan
importedFromLegacyIdinteger
isDefaultbooleanIs this the default plan for new customers?
priceInEuronumberhow much the customer needs to pay for this subscription
pricePerCurrencyobjectA map of string keys to float values
stripeBillingPortalEnabledbooleantrue if subscriptions with this pricingPlan can be self-managed in the stripe billing portal
stripePriceIdstringID of the price in stripe
stripeTrackTokenMeterstring
stripeTrackUsagebooleandeprecated
tierinteger
trialDaysintegerhow many trial days are allowed for this plan
pricingPlanCategoryobject
displayNamestring
idstring
translationKeystring
discountPercentagenumber
legacyPricingPlanIdinteger
pricingPlanIdstring
translationKeystring
callbackUrlstringurl to redirect to after successful checkout.
languagestringlanguage in which to open the checkout session. Defaults to the language of the authenticated customer
legacyPricingPlanIdintegerdeprecated id of the pricingPlan for which a subscription should be created
pricingPlanIdstring
statusstring
stripeClientSecretstringclient secret for this checkout session. Only set directly after creation
stripePriceIdstringstripe id of the price from the new subscription that is being checked out
stripeSubscriptionIdstringid of the stripe subscription that is being subscribed to in this checkout

Example

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 '{}'

Response:

{
"_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}

Response

FieldTypeDescription
activeDiscountstringreadonly synced from stripe: true if a discount is active for this stripe customer
addressLine1stringreadonly synced from stripe: First line of the address of the billing contact
addressLine2stringreadonly synced from stripe: Second line of the address of the billing contact
citystringreadonly synced from stripe: City of the billing contact
countrystringreadonly synced from stripe: Country of the billing contact
createdAtstring
createdByUserIdstring
defaultPaymentCardNumberLastFourDigitsstring
defaultPaymentMethodstring
defaultPaymentMethodCardBrandstring
emailstringEmail address of the billing contact
idstring
importedFromLegacyCustomerIdintegerDeprecated: only needed while import from legacy api is still active ID of the legacy customer this was imported from
namestringName of the billing contact
postalCodestringreadonly synced from stripe: Postal code of the billing contact
statestringreadonly synced from stripe: State of the billing contact
stripeCustomerIdstringStripe customer ID for billing purposes. Could become optional if we add other payment providers
updatedAtstring

Example

curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces/{workspace_id}/billing-contacts/{billing_contact_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"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}

Response

FieldTypeDescription
_embeddedobject
couponobject
_embeddedobject
pricingPlanobject
activebooleanset to true when this pricingPlan can be configured on existing and new subscriptions
billingIntervalstring
categoryIdstringID of the category this plan belongs to
displayNamestringname used for internal purposes like the admin-ui or hubspot. Should not be displayed to customers
idstringid of the pricing plan
importedFromLegacyIdinteger
isDefaultbooleanIs this the default plan for new customers?
priceInEuronumberhow much the customer needs to pay for this subscription
pricePerCurrencyobjectA map of string keys to float values
stripeBillingPortalEnabledbooleantrue if subscriptions with this pricingPlan can be self-managed in the stripe billing portal
stripePriceIdstringID of the price in stripe
stripeTrackTokenMeterstring
stripeTrackUsagebooleandeprecated
tierinteger
trialDaysintegerhow many trial days are allowed for this plan
pricingPlanCategoryobject
displayNamestring
idstring
translationKeystring
discountPercentagenumber
legacyPricingPlanIdinteger
pricingPlanIdstring
translationKeystring
callbackUrlstringurl to redirect to after successful checkout.
languagestringlanguage in which to open the checkout session. Defaults to the language of the authenticated customer
legacyPricingPlanIdintegerdeprecated id of the pricingPlan for which a subscription should be created
pricingPlanIdstring
statusstring
stripeClientSecretstringclient secret for this checkout session. Only set directly after creation
stripePriceIdstringstripe id of the price from the new subscription that is being checked out
stripeSubscriptionIdstringid of the stripe subscription that is being subscribed to in this checkout

Example

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"

Response:

{
"_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}

Response

FieldTypeDescription
activeDiscountstringreadonly synced from stripe: true if a discount is active for this stripe customer
addressLine1stringreadonly synced from stripe: First line of the address of the billing contact
addressLine2stringreadonly synced from stripe: Second line of the address of the billing contact
citystringreadonly synced from stripe: City of the billing contact
countrystringreadonly synced from stripe: Country of the billing contact
createdAtstring
createdByUserIdstring
defaultPaymentCardNumberLastFourDigitsstring
defaultPaymentMethodstring
defaultPaymentMethodCardBrandstring
emailstringEmail address of the billing contact
idstring
importedFromLegacyCustomerIdintegerDeprecated: only needed while import from legacy api is still active ID of the legacy customer this was imported from
namestringName of the billing contact
postalCodestringreadonly synced from stripe: Postal code of the billing contact
statestringreadonly synced from stripe: State of the billing contact
stripeCustomerIdstringStripe customer ID for billing purposes. Could become optional if we add other payment providers
updatedAtstring

Example

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 '{}'

Response:

{
"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"
}