{"components":{"schemas":{"AccountlyProblem":{"additionalProperties":true,"properties":{"detail":{"type":"string"},"instance":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"BalanceResponse":{"properties":{"balance":{"type":["string","null"]},"currency":{"type":"string"},"killbillAccountId":{"type":["string","null"]}},"type":"object"},"CreateSetupSessionRequestBody":{"properties":{"cancelUrl":{"minLength":1,"type":"string"},"successUrl":{"minLength":1,"type":"string"},"uiMode":{"type":["string","null"]}},"required":["cancelUrl","successUrl"],"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"},"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"},"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"},"SetupSessionResponse":{"properties":{"clientSecret":{"type":["string","null"]},"provider":{"type":"string"},"redirectUrl":{"type":["string","null"]},"sessionId":{"type":"string"}},"type":"object"},"SubscriberSelfResponse":{"properties":{"currency":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"externalRef":{"type":"string"},"subscriberId":{"type":"string"}},"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"}},"securitySchemes":{"customerSession":{"description":"Short-lived acs_… customer session. Access is confined to the customer encoded in the session.","scheme":"bearer","type":"http"}}},"info":{"description":"Public plan catalog and the signed-in customer’s billing. Obtain a short-lived customer session from your own authenticated server. Never use an application key in a browser.","title":"Accountly Browser API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/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"]}},"/api/v1/subscriber/balance":{"get":{"operationId":"retrieveBalance","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":[{"customerSession":[]}],"summary":"Retrieve Balance","tags":["Customer"]}},"/api/v1/subscriber/invoices":{"get":{"operationId":"listInvoices","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":[{"customerSession":[]}],"summary":"List Invoices","tags":["Invoices"]}},"/api/v1/subscriber/me":{"get":{"operationId":"retrieveCustomer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberSelfResponse"}}},"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":[{"customerSession":[]}],"summary":"Retrieve Customer","tags":["Customer"]}},"/api/v1/subscriber/payment-actions":{"get":{"operationId":"listPaymentActions","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":[{"customerSession":[]}],"summary":"List Payment Actions","tags":["PaymentRecovery"]}},"/api/v1/subscriber/payment-methods":{"get":{"operationId":"listPaymentMethods","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":[{"customerSession":[]}],"summary":"List Payment Methods","tags":["PaymentMethods"]}},"/api/v1/subscriber/payment-methods/{paymentMethodId}":{"delete":{"operationId":"deletePaymentMethod","parameters":[{"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":[{"customerSession":[]}],"summary":"Delete Payment Method","tags":["PaymentMethods"]}},"/api/v1/subscriber/payment-methods/{paymentMethodId}/default":{"put":{"operationId":"setDefaultPaymentMethod","parameters":[{"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":[{"customerSession":[]}],"summary":"Set Default Payment Method","tags":["PaymentMethods"]}},"/api/v1/subscriber/payment-setup-session":{"post":{"operationId":"createPaymentSetupSession","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":[{"customerSession":[]}],"summary":"Create Payment Setup Session","tags":["PaymentMethods"]}},"/api/v1/subscriber/payments":{"get":{"operationId":"listPayments","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":[{"customerSession":[]}],"summary":"List Payments","tags":["Payments"]}},"/api/v1/subscriber/payments/{paymentId}/authentication":{"post":{"operationId":"authenticatePayment","parameters":[{"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":[{"customerSession":[]}],"summary":"Authenticate Payment","tags":["PaymentRecovery"]}},"/api/v1/subscriber/payments/{paymentId}/refresh":{"post":{"operationId":"refreshPayment","parameters":[{"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":[{"customerSession":[]}],"summary":"Refresh Payment","tags":["PaymentRecovery"]}},"/api/v1/subscriber/subscriptions":{"get":{"operationId":"listSubscriptions","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":[{"customerSession":[]}],"summary":"List Subscriptions","tags":["Subscriptions"]},"post":{"operationId":"createSubscription","parameters":[{"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":[{"customerSession":[]}],"summary":"Create Subscription","tags":["Subscriptions"]}},"/api/v1/subscriber/subscriptions/{subscriptionId}":{"delete":{"operationId":"cancelSubscription","parameters":[{"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":[{"customerSession":[]}],"summary":"Cancel Subscription","tags":["Subscriptions"]},"patch":{"operationId":"changeSubscription","parameters":[{"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":[{"customerSession":[]}],"summary":"Change Subscription","tags":["Subscriptions"]}}},"servers":[{"description":"Set the base URL to your Accountly API deployment.","url":"/"}]}