Billing

Overview

Payment orchestration against configured billing providers: settings, customers, checkouts, payments, purchases, refunds, subscription cancel, and provider webhooks.

API

{pe} = /projects/{projectId}/environments/{environmentId}.

MethodPathNotes
GET/billing/healthHealth
POST/billing/webhooks/{provider}Webhook; projectId / environmentId query params
GET/PUT/billing{pe}/settingsRequireAuthorization
POST/billing{pe}/customersRequireAuthorization
POST/billing{pe}/checkoutsRequireAuthorization
GET/billing{pe}/payments/{externalId}RequireAuthorization
GET/billing{pe}/purchasesRequireAuthorization
POST/billing{pe}/payments/{externalId}/refundsRequireAuthorization
POST/billing{pe}/subscriptions/{externalId}/cancelRequireAuthorization

Clients

PackageRuntime
@vijihub/billingserver
VijiHub.Billing.NET

Implementation

  1. Enable Billing and configure the provider (secrets, webhook endpoints).
  2. Point the provider’s webhook to /billing/webhooks/{provider}?projectId=…&environmentId=….
  3. Create customers/checkouts from your backend with Bearer auth.
  4. Handle refunds and subscription cancel via the documented paths.

Constraints

  • Management APIs require authorization.
  • Webhook route authenticity depends on provider signature verification in the service — keep webhook URLs secret where applicable.
  • Never expose provider secret keys to browsers.