> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/cloudeka-api/cloudeka-backend/billing-history-1.md).

# Billing History

This API is used to get a billing history

```json
{"openapi":"3.1.1","info":{"title":"Cloudeka AI - API Documentation","version":"1.0.0"},"tags":[{"name":"Cloudeka Backend","description":"API endpoints for Cloudeka Backend (base: /core)"}],"servers":[{"url":"https://ai.cloudeka.id/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Type 'Bearer ' followed by your JWT token. Example: \"Bearer eyJhbGciOi...\"","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ai_backend__handler.SuccessRespond":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"message":{"type":"string"}}},"ai_backend__billing.ConcreteBillingHistory":{"type":"object","properties":{"billed":{"type":"number"},"date":{"type":"string"},"services":{"type":"array","items":{"$ref":"#/components/schemas/ai_backend__billing.ConcreteBillingDetail"}}}},"ai_backend__billing.ConcreteBillingDetail":{"type":"object","properties":{"billed":{"type":"number"},"billing_type":{"$ref":"#/components/schemas/ai_backend__constant.BillingType"},"date":{"type":"string"},"discount":{"type":"number"},"discount_value":{"type":"number"},"package_id":{"type":"string"},"price":{"type":"number"},"price_unit":{"$ref":"#/components/schemas/ai_backend__constant.BillingPriceUnit"},"service_id":{"type":"string"},"service_name":{"type":"string"},"service_type":{"$ref":"#/components/schemas/ai_backend__constant.ServiceType"},"service_type_name":{"type":"string"},"size":{"type":"number"},"size_unit":{"type":"string"},"specification":{"type":"string"},"usage":{"type":"string"},"usage_hours":{"type":"number"}}},"ai_backend__constant.BillingType":{"type":"string","enum":["Trial","Fixed","PPU","Monthly","One Time"]},"ai_backend__constant.BillingPriceUnit":{"type":"string","enum":["hour","day","month","one time","coin"]},"ai_backend__constant.ServiceType":{"type":"string","enum":["INSTANCE","OS_CHARGING","ROOT_DISK","STORAGE","OBJECT_STORAGE","SNAPSHOT","DEKA_FLEXI_FLOATING_IP","SLB","DAILY_BACKUP","MANAGE_SERVICE","MANAGE_SERVICE_ADDON","DEKA_AGENT","DEKA_NAT","DEKA_NAT_FIP","VPN_IPSEC","VPN_IPSEC_PHASE","USER_OPENVPN","DEKA_ROCK","DEKA_HARBOR_STARTER_NODE","DEKA_HARBOR_ADDITIONAL_NODE","DEKA_REGISTRY","DEKA_DNS_ZONE","DEKA_DNS_A_RECORD","DEKA_LLM","FLOATING-IP","BACKUP_VM","LICENSE_BACKUP_VM","WAIVER","CDN","CPU","GPU","RAM","VOLUME","floating-ip","FLEXI"]},"ai_backend__requests.BillingDetail":{"type":"object","properties":{"date":{"type":"string"},"project_id":{"type":"string"}}}}},"paths":{"/core/billing/v2/history":{"post":{"description":"This API is used to get a billing history","tags":["Cloudeka Backend","Billing v2"],"summary":"Billing History","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ai_backend__handler.SuccessRespond"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ai_backend__billing.ConcreteBillingHistory"}}}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_backend__requests.BillingDetail"}}},"description":"Billing History Payload","required":true}}}}}
```
