{"components":{"schemas":{"AccountlyProblem":{"additionalProperties":true,"properties":{"detail":{"type":"string"},"instance":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"AnalyticsDailyResponse":{"properties":{"mode":{"type":"string"},"points":{"items":{},"type":"array"},"rollup":{"type":"string"}},"type":"object"},"BalanceResponse":{"properties":{"balance":{"type":["string","null"]},"currency":{"type":"string"},"killbillAccountId":{"type":["string","null"]}},"type":"object"},"CreatePlanRequestBody":{"properties":{"badgeLabel":{"maxLength":60,"minLength":0,"type":["string","null"]},"billingPeriod":{"pattern":"MONTHLY|ANNUAL","type":["string","null"]},"catalogPlanName":{"maxLength":100,"minLength":1,"type":["string","null"]},"ctaLabel":{"maxLength":60,"minLength":0,"type":["string","null"]},"description":{"maxLength":500,"minLength":0,"type":["string","null"]},"displayOrder":{"format":"int32","type":["integer","null"]},"highlighted":{"type":["boolean","null"]},"isDefault":{"type":["boolean","null"]},"level":{"format":"int32","type":["integer","null"]},"marketFeatures":{"items":{"type":"string"},"type":["array","null"]},"monthlyFee":{"type":["number","null"]},"name":{"minLength":1,"type":"string"},"priceLabel":{"type":["string","null"]},"pricingModel":{"minLength":1,"pattern":"FlatRate|PerUsage","type":"string"},"pricingPlanId":{"type":["string","null"]},"published":{"type":["boolean","null"]},"trialDays":{"format":"int32","minimum":0,"type":["integer","null"]}},"required":["name","pricingModel"],"type":"object"},"CreateSetupSessionRequestBody":{"properties":{"cancelUrl":{"minLength":1,"type":"string"},"successUrl":{"minLength":1,"type":"string"},"uiMode":{"type":["string","null"]}},"required":["cancelUrl","successUrl"],"type":"object"},"DeclareUsageVariableRequestBody":{"properties":{"aggregation":{"pattern":"SUM|LATEST","type":"string"},"defaultQuantity":{"type":["number","null"]},"description":{"type":["string","null"]},"eventType":{"maxLength":128,"minLength":0,"type":"string"},"unit":{"maxLength":64,"minLength":0,"type":"string"}},"required":["eventType","unit"],"type":"object"},"IntroOfferResponse":{"properties":{"durationMonths":{"format":"int32","type":"integer"},"percentOff":{"format":"int32","type":"integer"}},"type":"object"},"InvoiceResponse":{"properties":{"amount":{"type":["string","null"]},"balance":{"type":["string","null"]},"currency":{"type":["string","null"]},"invoiceDate":{"type":["string","null"]},"invoiceId":{"type":"string"},"invoiceNumber":{"type":["string","null"]},"status":{"type":["string","null"]},"targetDate":{"type":["string","null"]}},"type":"object"},"JsonNode":{"properties":{"array":{"type":"boolean"},"bigDecimal":{"type":"boolean"},"bigInteger":{"type":"boolean"},"binary":{"type":"boolean"},"boolean":{"type":"boolean"},"container":{"type":"boolean"},"double":{"type":"boolean"},"embeddedValue":{"type":"boolean"},"empty":{"type":"boolean"},"float":{"type":"boolean"},"floatingPointNumber":{"type":"boolean"},"int":{"type":"boolean"},"integralNumber":{"type":"boolean"},"long":{"type":"boolean"},"missingNode":{"type":"boolean"},"nodeType":{"enum":["ARRAY","BINARY","BOOLEAN","MISSING","NULL","NUMBER","OBJECT","POJO","STRING"],"type":"string"},"null":{"type":"boolean"},"number":{"type":"boolean"},"object":{"type":"boolean"},"pojo":{"type":"boolean"},"short":{"type":"boolean"},"string":{"type":"boolean"},"textual":{"deprecated":true,"type":"boolean"},"valueNode":{"type":"boolean"}},"type":"object"},"MerchantSubscribeRequestBody":{"properties":{"planId":{"minLength":1,"type":"string"}},"required":["planId"],"type":"object"},"PaymentActionResponse":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"paymentId":{"type":"string"},"status":{"type":"string"}},"type":"object"},"PaymentAuthenticationResponse":{"properties":{"clientSecret":{"type":["string","null"]},"payment":{"$ref":"#/components/schemas/PaymentActionResponse"},"provider":{"type":"string"},"publishableKey":{"type":["string","null"]}},"type":"object"},"PaymentMethodResponse":{"properties":{"brand":{"type":["string","null"]},"expMonth":{"format":"int32","type":["integer","null"]},"expYear":{"format":"int32","type":["integer","null"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"last4":{"type":["string","null"]}},"type":"object"},"PaymentResponse":{"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"invoiceIds":{"items":{"type":"string"},"type":"array"},"occurredAt":{"type":["string","null"]},"paymentId":{"type":"string"},"status":{"type":["string","null"]}},"type":"object"},"PlanQuotaResponse":{"properties":{"eventType":{"type":"string"},"expression":{"type":["string","null"]},"hardLimit":{"format":"int64","type":"integer"},"overagePolicy":{"type":"string"},"period":{"type":"string"},"quotaId":{"type":"string"},"tiers":{"items":{"$ref":"#/components/schemas/QuotaTierResponse"},"type":"array"},"unitPrice":{"type":"string"},"version":{"format":"int64","type":"integer"}},"type":"object"},"PlanResponse":{"properties":{"applicationId":{"type":"string"},"applicationName":{"type":"string"},"badgeLabel":{"type":["string","null"]},"billingPeriod":{"type":"string"},"catalogPlanName":{"type":"string"},"createdAt":{"type":"string"},"ctaLabel":{"type":["string","null"]},"description":{"type":["string","null"]},"displayOrder":{"format":"int32","type":"integer"},"featureBullets":{"items":{"type":"string"},"type":"array"},"highlighted":{"type":"boolean"},"isDefault":{"type":"boolean"},"killbillPlanName":{"type":["string","null"]},"killbillPriceList":{"type":["string","null"]},"killbillProductName":{"type":["string","null"]},"level":{"format":"int32","type":"integer"},"marketFeatures":{"items":{"type":"string"},"type":"array"},"monthlyFee":{"type":"string"},"name":{"type":"string"},"planId":{"type":"string"},"priceLabel":{"type":["string","null"]},"pricingModel":{"type":"string"},"pricingPlanId":{"type":["string","null"]},"published":{"type":"boolean"},"quotas":{"items":{"$ref":"#/components/schemas/PlanQuotaResponse"},"type":"array"},"tierId":{"type":"string"},"trialDays":{"format":"int32","type":"integer"},"version":{"format":"int64","type":"integer"}},"type":"object"},"PricingLookupPlanResponse":{"properties":{"availableFrom":{"type":["string","null"]},"availableUntil":{"type":["string","null"]},"countries":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"introOffer":{"oneOf":[{"$ref":"#/components/schemas/IntroOfferResponse"},{"type":"null"}]},"isDefault":{"type":"boolean"},"name":{"type":"string"},"planId":{"type":"string"}},"type":"object"},"PricingLookupResponse":{"properties":{"country":{"type":["string","null"]},"matchedBy":{"type":"string"},"plan":{"$ref":"#/components/schemas/PricingLookupPlanResponse"},"tiers":{"items":{"$ref":"#/components/schemas/PricingTierResponse"},"type":"array"}},"type":"object"},"PricingPlanResponse":{"properties":{"applicationId":{"type":"string"},"availability":{"type":"string"},"availableFrom":{"type":["string","null"]},"availableUntil":{"type":["string","null"]},"countries":{"items":{"type":"string"},"type":"array"},"createdAt":{"type":"string"},"description":{"type":["string","null"]},"displayOrder":{"format":"int32","type":"integer"},"id":{"type":"string"},"introOffer":{"oneOf":[{"$ref":"#/components/schemas/IntroOfferResponse"},{"type":"null"}]},"isDefault":{"type":"boolean"},"name":{"type":"string"},"planId":{"type":"string"},"subscriptionCount":{"format":"int64","type":"integer"},"tiers":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array"},"version":{"format":"int64","type":"integer"}},"type":"object"},"PricingTierResponse":{"properties":{"billingPeriod":{"type":"string"},"introOffer":{"oneOf":[{"$ref":"#/components/schemas/TierIntroOfferResponse"},{"type":"null"}]},"isDefault":{"type":"boolean"},"level":{"format":"int32","type":"integer"},"monthlyFee":{"type":"string"},"name":{"type":"string"},"pricingModel":{"type":"string"},"published":{"type":"boolean"},"quotas":{"items":{"$ref":"#/components/schemas/PlanQuotaResponse"},"type":"array"},"tierId":{"type":"string"},"trialDays":{"format":"int32","type":"integer"}},"type":"object"},"ProvisionSubscriberRequestBody":{"properties":{"billingAddress":{"type":["string","null"]},"billingCity":{"type":["string","null"]},"billingCountry":{"type":["string","null"]},"billingPostalCode":{"type":["string","null"]},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"externalRef":{"minLength":1,"type":"string"},"taxId":{"type":["string","null"]}},"required":["externalRef"],"type":"object"},"ProvisionSubscriberResponse":{"properties":{"killbillAccountId":{"type":["string","null"]},"subscriberId":{"type":"string"}},"type":"object"},"PublicApplicationDto":{"properties":{"currency":{"type":"string"},"name":{"type":"string"},"widgetAppearance":{"$ref":"#/components/schemas/PublicWidgetAppearanceDto"}},"type":"object"},"PublicWidgetAppearanceDto":{"properties":{"accentColor":{"type":"string"},"buttonStyle":{"type":"string"},"cornerStyle":{"type":"string"},"fontFamily":{"type":"string"},"highlightStyle":{"type":"string"}},"type":"object"},"PublicCatalogResponse":{"properties":{"application":{"$ref":"#/components/schemas/PublicApplicationDto"},"plans":{"items":{"$ref":"#/components/schemas/PublicPlanDto"},"type":"array"},"pricingPlan":{"oneOf":[{"$ref":"#/components/schemas/PublicPricingPlanDto"},{"type":"null"}]}},"type":"object"},"PublicIncludedUsageDto":{"properties":{"aggregation":{"type":"string"},"eventType":{"type":"string"},"limit":{"format":"int64","type":"integer"},"overage":{"$ref":"#/components/schemas/PublicOverageDto"},"period":{"type":"string"},"unit":{"type":["string","null"]}},"type":"object"},"PublicIntroOfferDto":{"properties":{"durationMonths":{"format":"int32","type":"integer"},"percentOff":{"format":"int32","type":"integer"}},"type":"object"},"PublicOverageDto":{"properties":{"kind":{"type":"string"},"startingAt":{"type":["string","null"]},"unitPrice":{"type":["string","null"]}},"type":"object"},"PublicPlanDto":{"properties":{"amount":{"type":"string"},"badge":{"type":["string","null"]},"billingPeriod":{"type":"string"},"catalogPlanName":{"type":"string"},"ctaLabel":{"type":["string","null"]},"description":{"type":["string","null"]},"displayOrder":{"format":"int32","type":"integer"},"featureBullets":{"items":{"type":"string"},"type":"array"},"highlighted":{"type":"boolean"},"id":{"type":"string"},"includedUsage":{"items":{"$ref":"#/components/schemas/PublicIncludedUsageDto"},"type":"array"},"introAmount":{"type":["string","null"]},"marketFeatures":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"priceLabel":{"type":["string","null"]},"pricingModel":{"type":"string"},"tierId":{"type":"string"},"trialDays":{"format":"int32","type":"integer"}},"type":"object"},"PublicPricingPlanDto":{"properties":{"introOffer":{"oneOf":[{"$ref":"#/components/schemas/PublicIntroOfferDto"},{"type":"null"}]},"name":{"type":"string"}},"type":"object"},"QuotaTierResponse":{"properties":{"unitPrice":{"type":"string"},"upTo":{"format":"int64","type":["integer","null"]}},"type":"object"},"SetupSessionResponse":{"properties":{"clientSecret":{"type":["string","null"]},"provider":{"type":"string"},"redirectUrl":{"type":["string","null"]},"sessionId":{"type":"string"}},"type":"object"},"SubscriberEntitlementDto":{"properties":{"computedAt":{"format":"date-time","type":["string","null"]},"planId":{"type":["string","null"]},"quotaEnvelopeJson":{"type":"string"},"status":{"type":"string"},"subscriberAccountId":{"type":"string"},"subscriptionId":{"type":["string","null"]}},"type":"object"},"SubscriberPageResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SubscriberSummaryResponse"},"type":"array"},"page":{"format":"int32","type":"integer"},"size":{"format":"int32","type":"integer"},"total":{"format":"int64","type":"integer"}},"type":"object"},"SubscriberSessionResponse":{"properties":{"expiresAt":{"type":"string"},"token":{"type":"string"}},"type":"object"},"SubscriberSummaryResponse":{"properties":{"billingAddress":{"type":["string","null"]},"billingCity":{"type":["string","null"]},"billingCountry":{"type":["string","null"]},"billingPostalCode":{"type":["string","null"]},"createdAt":{"type":"string"},"displayName":{"type":"string"},"email":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"killbillAccountId":{"type":["string","null"]},"legalHold":{"type":"boolean"},"legalHoldReason":{"type":["string","null"]},"subscriberId":{"type":"string"},"taxId":{"type":["string","null"]}},"type":"object"},"SubscriptionResponse":{"properties":{"canceledAt":{"type":["string","null"]},"killbillBundleId":{"type":["string","null"]},"killbillSubscriptionId":{"type":["string","null"]},"planId":{"type":"string"},"planName":{"type":"string"},"status":{"type":"string"},"subscribedAt":{"type":"string"},"subscriptionId":{"type":"string"}},"type":"object"},"TierIntroOfferResponse":{"properties":{"durationMonths":{"format":"int32","type":"integer"},"monthlyFee":{"type":"string"},"percentOff":{"format":"int32","type":"integer"}},"type":"object"},"UpdateSubscriberRequestBody":{"properties":{"billingAddress":{"maxLength":500,"minLength":0,"type":["string","null"]},"billingCity":{"maxLength":100,"minLength":0,"type":["string","null"]},"billingCountry":{"pattern":"|[A-Za-z]{2}","type":["string","null"]},"billingPostalCode":{"maxLength":32,"minLength":0,"type":["string","null"]},"displayName":{"maxLength":200,"minLength":0,"type":["string","null"]},"email":{"maxLength":320,"minLength":0,"type":["string","null"]},"taxId":{"maxLength":64,"minLength":0,"type":["string","null"]}},"type":"object"},"UsageIngestBatchItem":{"properties":{"correlationId":{"type":["string","null"]},"eventType":{"maxLength":128,"minLength":1,"type":"string"},"idempotencyKey":{"maxLength":256,"minLength":1,"type":"string"},"occurredAt":{"format":"date-time","type":["string","null"]},"planId":{"type":["string","null"]},"properties":{"oneOf":[{"$ref":"#/components/schemas/JsonNode"},{"type":"null"}]},"quantity":{"type":["number","null"]},"source":{"minLength":1,"type":"string"},"subscriptionId":{"type":["string","null"]},"unit":{"type":["string","null"]}},"required":["eventType","idempotencyKey","source"],"type":"object"},"UsageIngestBatchRequestBody":{"properties":{"events":{"items":{"$ref":"#/components/schemas/UsageIngestBatchItem"},"maxItems":500,"minItems":1,"type":"array"},"subscriberAccountId":{"minLength":1,"type":"string"}},"required":["subscriberAccountId"],"type":"object"},"UsageIngestBatchResponse":{"properties":{"ingested":{"format":"int32","type":"integer"},"rejected":{"format":"int32","type":"integer"},"replayed":{"format":"int32","type":"integer"},"results":{"items":{"$ref":"#/components/schemas/UsageIngestBatchResult"},"type":"array"}},"type":"object"},"UsageIngestBatchResult":{"properties":{"error":{"type":["string","null"]},"eventId":{"type":["string","null"]},"idempotencyKey":{"type":"string"},"index":{"format":"int32","type":"integer"},"status":{"type":"string"}},"type":"object"},"UsageIngestRequestBody":{"properties":{"correlationId":{"type":["string","null"]},"eventType":{"maxLength":128,"minLength":1,"type":"string"},"idempotencyKey":{"maxLength":256,"minLength":1,"type":["string","null"]},"occurredAt":{"format":"date-time","type":["string","null"]},"planId":{"type":["string","null"]},"properties":{"oneOf":[{"$ref":"#/components/schemas/JsonNode"},{"type":"null"}]},"quantity":{"type":["number","null"]},"source":{"minLength":1,"type":"string"},"subscriberAccountId":{"minLength":1,"type":"string"},"subscriptionId":{"type":["string","null"]},"unit":{"type":["string","null"]}},"required":["eventType","source","subscriberAccountId"],"type":"object"},"UsageIngestResponse":{"properties":{"applicationId":{"type":"string"},"eventId":{"type":"string"},"eventType":{"type":"string"},"occurredAt":{"format":"date-time","type":"string"},"quantity":{"type":"string"},"replayed":{"type":"boolean"},"source":{"type":"string"},"subscriberAccountId":{"type":"string"}},"type":"object"},"UsageVariableResponseDto":{"properties":{"aggregation":{"type":"string"},"applicationId":{"type":"string"},"defaultQuantity":{"type":"string"},"description":{"type":["string","null"]},"eventType":{"type":"string"},"id":{"type":"string"},"unit":{"type":"string"}},"type":"object"}},"securitySchemes":{"applicationKey":{"description":"Secret ak_test_… or ak_live_… application key; read/write/usage scopes are enforced per operation.","scheme":"bearer","type":"http"}}},"info":{"description":"Application-scoped billing API. Keep application keys on your server. API routes remain v1; this contract is a pre-release SDK surface.","title":"Accountly Server API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/api/v1/applications/{applicationId}/analytics/daily":{"get":{"operationId":"retrieveDailyUsage","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"subscriber","required":false,"schema":{"type":"string"}},{"in":"query","name":"eventType","required":false,"schema":{"type":"string"}},{"in":"query","name":"aggregate","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsDailyResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Daily Usage","tags":["Usage"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/metrics":{"get":{"operationId":"listMetrics","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UsageVariableResponseDto"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Metrics","tags":["Metrics"],"x-accountly-key-scope":"read"},"post":{"operationId":"createMetric","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclareUsageVariableRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Create Metric","tags":["Metrics"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/pricing":{"get":{"operationId":"lookupPricing","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"query","name":"country","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingLookupResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Lookup Pricing","tags":["PricingPlans"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/pricing-plans":{"get":{"operationId":"listPricingPlans","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingPlanResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Pricing Plans","tags":["PricingPlans"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/pricing-plans/{pricingPlanId}":{"get":{"operationId":"retrievePricingPlan","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"pricingPlanId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingPlanResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Pricing Plan","tags":["PricingPlans"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers":{"get":{"operationId":"listCustomers","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":0,"format":"int32","type":"integer"}},{"in":"query","name":"size","required":false,"schema":{"default":50,"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberPageResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Customers","tags":["Customers"],"x-accountly-key-scope":"read"},"post":{"operationId":"upsertCustomer","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionSubscriberRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionSubscriberResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Upsert Customer","tags":["Customers"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}":{"get":{"operationId":"retrieveCustomer","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberSummaryResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Customer","tags":["Customers"],"x-accountly-key-scope":"read"},"patch":{"operationId":"updateCustomer","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriberRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberSummaryResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Update Customer","tags":["Customers"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/balance":{"get":{"operationId":"retrieveBalance","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Balance","tags":["Customers"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/entitlement":{"get":{"operationId":"retrieveEntitlement","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberEntitlementDto"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Entitlement","tags":["Entitlements"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/invoices":{"get":{"operationId":"listInvoices","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvoiceResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Invoices","tags":["Invoices"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/invoices/{invoiceId}/html":{"get":{"operationId":"retrieveInvoiceHtml","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"invoiceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Retrieve Invoice Html","tags":["Invoices"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-actions":{"get":{"operationId":"listPaymentActions","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentActionResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Payment Actions","tags":["PaymentRecovery"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods":{"get":{"operationId":"listPaymentMethods","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentMethodResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Payment Methods","tags":["PaymentMethods"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods/{paymentMethodId}":{"delete":{"operationId":"deletePaymentMethod","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"paymentMethodId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Delete Payment Method","tags":["PaymentMethods"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods/{paymentMethodId}/default":{"put":{"operationId":"setDefaultPaymentMethod","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"paymentMethodId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Set Default Payment Method","tags":["PaymentMethods"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-setup-session":{"post":{"operationId":"createPaymentSetupSession","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSetupSessionRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSessionResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Create Payment Setup Session","tags":["PaymentMethods"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments":{"get":{"operationId":"listPayments","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Payments","tags":["Payments"],"x-accountly-key-scope":"read"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments/{paymentId}/authentication":{"post":{"operationId":"authenticatePayment","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"paymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAuthenticationResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Authenticate Payment","tags":["PaymentRecovery"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments/{paymentId}/refresh":{"post":{"operationId":"refreshPayment","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"paymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentActionResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Refresh Payment","tags":["PaymentRecovery"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/sessions":{"post":{"operationId":"createCustomerSession","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberSessionResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Create Customer Session","tags":["CustomerSessions"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions":{"get":{"operationId":"listSubscriptions","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Subscriptions","tags":["Subscriptions"],"x-accountly-key-scope":"read"},"post":{"operationId":"createSubscription","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantSubscribeRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Create Subscription","tags":["Subscriptions"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions/{subscriptionId}":{"delete":{"operationId":"cancelSubscription","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Cancel Subscription","tags":["Subscriptions"],"x-accountly-key-scope":"write"},"patch":{"operationId":"changeSubscription","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriberId","required":true,"schema":{"type":"string"}},{"in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantSubscribeRequestBody"}}},"required":true},"responses":{"204":{"description":"No content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Change Subscription","tags":["Subscriptions"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/tiers":{"get":{"operationId":"listTiers","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"List Tiers","tags":["Tiers"],"x-accountly-key-scope":"read"},"post":{"operationId":"createTier","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequestBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Create Tier","tags":["Tiers"],"x-accountly-key-scope":"write"}},"/api/v1/applications/{applicationId}/usage-events":{"post":{"operationId":"recordUsage","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"in":"header","name":"X-Correlation-Id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageIngestRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageIngestResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Record Usage","tags":["Usage"],"x-accountly-key-scope":"usage"}},"/api/v1/applications/{applicationId}/usage-events/batch":{"post":{"operationId":"recordUsageBatch","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"header","name":"X-Correlation-Id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageIngestBatchRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageIngestBatchResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[{"applicationKey":[]}],"summary":"Record Usage Batch","tags":["Usage"],"x-accountly-key-scope":"usage"}},"/api/v1/public/applications/{applicationId}/catalog":{"get":{"operationId":"retrieveCatalog","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string"}},{"in":"query","name":"country","required":false,"schema":{"type":"string"}},{"description":"Previously returned ETag. A matching catalog returns 304 without a body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCatalogResponse"}}},"description":"OK","headers":{"Cache-Control":{"description":"Public cache lifetime.","schema":{"type":"string"}},"ETag":{"description":"Catalog content version.","schema":{"type":"string"}}}},"304":{"description":"Not modified; use the cached catalog."},"404":{"description":"Application unavailable or no public catalog."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AccountlyProblem"}}},"description":"Request failed. Some infrastructure/authentication errors have an empty or non-JSON body."}},"security":[],"summary":"Retrieve Catalog","tags":["Catalog"]}}},"servers":[{"description":"Set the base URL to your Accountly API deployment.","url":"/"}]}