billing
GET
https://hermeticor.com /v1/billing/plans Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/billing/plans" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"name": "string",
"limits": {
"sends_email": 0,
"sends_sms": 0,
"sends_whatsapp": 0,
"sends_push": 0,
"sends_postcard": 0,
"ai_tokens": 0,
"seats": 0
}
}
],
"nextCursor": "string"
}Schema
itemsItemsItem101[]requiredShow child parameters
idstringrequirednamestringrequiredlimitsobjectrequiredShow child parameters
sends_emailintegerrequiredsends_smsintegerrequiredsends_whatsappintegerrequiredsends_pushintegerrequiredsends_postcardintegerrequiredai_tokensintegerrequiredseatsintegerrequirednextCursorstringrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectGET
https://hermeticor.com /v1/billing Code samples
cURL
curl -X GET "https://hermeticor.com/v1/billing" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"plan": {
"id": "string",
"name": "string",
"limits": {
"sends_email": 0,
"sends_sms": 0,
"sends_whatsapp": 0,
"sends_push": 0,
"sends_postcard": 0,
"ai_tokens": 0,
"seats": 0
}
},
"status": "string",
"period": "string",
"currentPeriodEnd": "2024-01-01T00:00:00Z",
"limits": {
"sends_email": 0,
"sends_sms": 0,
"sends_whatsapp": 0,
"sends_push": 0,
"sends_postcard": 0,
"ai_tokens": 0,
"seats": 0
},
"usage": [
{
"metric": "sends_email",
"used": 0,
"limit": 0,
"softLimit": 0
}
],
"managedByProvider": true
}Schema
planobjectrequiredShow child parameters
idstringrequirednamestringrequiredlimitsobjectrequiredShow child parameters
sends_emailintegerrequiredsends_smsintegerrequiredsends_whatsappintegerrequiredsends_pushintegerrequiredsends_postcardintegerrequiredai_tokensintegerrequiredseatsintegerrequiredstatusstringrequiredperiodstringrequiredcurrentPeriodEndstringrequiredlimitsobjectrequiredShow child parameters
sends_emailintegerrequiredsends_smsintegerrequiredsends_whatsappintegerrequiredsends_pushintegerrequiredsends_postcardintegerrequiredai_tokensintegerrequiredseatsintegerrequiredusageUsageItem[]requiredShow child parameters
metricstringrequiredusedintegerrequiredlimitintegerrequiredsoftLimitintegerrequiredmanagedByProviderbooleanrequiredGET
https://hermeticor.com /v1/billing/usage Per-period usage series (sends by channel, AI tokens), newest first
Parameters
monthsintegerquerylimitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/billing/usage" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"period": "string",
"sends_email": 0,
"sends_sms": 0,
"sends_whatsapp": 0,
"sends_push": 0,
"sends_postcard": 0,
"ai_tokens": 0
}
],
"nextCursor": "string"
}Schema
itemsItemsItem102[]requiredShow child parameters
periodstringrequiredsends_emailintegerrequiredsends_smsintegerrequiredsends_whatsappintegerrequiredsends_pushintegerrequiredsends_postcardintegerrequiredai_tokensintegerrequirednextCursorstringrequiredGET
https://hermeticor.com /v1/billing/usage/{period} Parameters
periodstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/billing/usage/{period}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"period": "string",
"sends_email": 0,
"sends_sms": 0,
"sends_whatsapp": 0,
"sends_push": 0,
"sends_postcard": 0,
"ai_tokens": 0
}Schema
periodstringrequiredsends_emailintegerrequiredsends_smsintegerrequiredsends_whatsappintegerrequiredsends_pushintegerrequiredsends_postcardintegerrequiredai_tokensintegerrequiredGET
https://hermeticor.com /v1/billing/invoices Invoices from the billing provider (empty when none is configured)
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/billing/invoices" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"number": "string",
"status": "string",
"currency": "string",
"amountDueMinor": 0,
"amountPaidMinor": 0,
"createdAt": "2024-01-01T00:00:00Z",
"hostedUrl": "string",
"pdfUrl": "string"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequirednumberstringrequiredstatusstringrequiredcurrencystringrequiredamountDueMinorintegerrequiredamountPaidMinorintegerrequiredcreatedAtstringrequiredhostedUrlstringrequiredpdfUrlstringrequirednextCursorstringrequiredPUT
https://hermeticor.com /v1/billing/plan Assign a plan directly. Self-hosted only: with a billing provider configured, plans change through checkout/webhooks.
Request body
application/json
planIdstringrequiredlimitOverridesobject{
"planId": "string",
"limitOverrides": {}
}Code samples
cURL
curl -X PUT "https://hermeticor.com/v1/billing/plan" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"planId":"string","limitOverrides":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /v1/billing/checkout Request body
application/json
planIdstringrequiredsuccessUrlstringrequiredcancelUrlstringrequired{
"planId": "string",
"successUrl": "string",
"cancelUrl": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/billing/checkout" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"planId":"string","successUrl":"string","cancelUrl":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"url": "string"
}Schema
urlstringrequiredPOST
https://hermeticor.com /v1/billing/portal Provider-hosted portal: invoices, payment method, plan changes
Request body
application/json
returnUrlstringrequired{
"returnUrl": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/billing/portal" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"returnUrl":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /webhooks/billing/stripe Code samples
cURL
curl -X POST "https://hermeticor.com/webhooks/billing/stripe"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"received": true
}Schema
receivedbooleanrequiredUpdated