Skip to main content

C2A-05 Subscriptions

Post-purchase lifecycle: list a customer's subscriptions and run two-phase cancel and reactivate flows. Provisioning and renewal happen automatically — they don't have direct C2A endpoints, they are driven by Checkout + PSP webhooks.

Concepts

  • Provider-agnostic — the same controller drives In-house, App Store, Play Store, PayPal, Third-party, and Postpaid subscriptions via ISubscriptionProviderFactory.
  • Two-phase cancelcancel/request resolves the cancellation context (allowed methods, possible retention offer, list of reasons). cancel/confirm finalizes. Supports retention flows and grace periods.
  • Source flag — controller stamps Source = C2A on every request so analytics and audit trails distinguish C2A actions from portal (P2A) actions.

Base Route

/api/c2a/subscription

Standard C2A auth + headers.

Endpoints

#MethodPathPurpose
C2A-05-01GET/api/c2a/subscription/{customerUrn}List Customer Subscriptions
C2A-05-02POST/api/c2a/subscription/cancel/requestRequest Cancel
C2A-05-03POST/api/c2a/subscription/cancel/confirmConfirm Cancel
C2A-05-04POST/api/c2a/subscription/reactivateReactivate

State Reference

EnSubscriptionState values observed in list:

StateMeaning
TrialIn trial period.
ActivePaid and current.
PastDueRenewal failed; in dunning.
CanceledCancellation finalized; endDate is the access-until date when cancelationMethod = EndOfPeriod.
ReactivatedWas canceled, now reactivated within the same period.
ExpiredPeriod ended without renewal.

Error Statuses

messageCodeMeaning
SUCCESSOperation completed.
SUBSCRIPTION_NOT_FOUNDorderIdentifier unknown for this tenant.
SUBSCRIPTION_NOT_CANCELABLEState / channel does not allow cancellation right now.
SUBSCRIPTION_NOT_REACTIVATABLEReactivation window passed or channel does not support it.

Source

  • Controller: Azotte.Api.Gateway.Controllers.C2A.C2A_05_SubscriptionController
  • Service: Azotte.Subscription.Services.ISubscriptionService
  • DTOs: Azotte.Subscription.Dto/*
  • Providers: Azotte.Subscription.Providers.* (InHouse, AppStore, PlayStore, PayPal, Thirdparty, Postpaid)
  • Postman: documents/PostmanSamples/C2A API.postman_collection.json