Query
Parameters
Input parameters for the customer portal query
Return Type
Returns aCustomerPortal object with:
| Field | Type | Description |
|---|---|---|
subscriptions | [CustomerPortalSubscription] | Active subscriptions |
entitlements | [Entitlement] | All effective entitlements |
billingInformation | CustomerPortalBillingInformation | Payment method details |
billingPortalUrl | String | Link to billing provider portal |
canUpgradeSubscription | Boolean | Whether upgrade is available |
promotionalEntitlements | [CustomerPortalPromotionalEntitlement] | Promotional grants |
resource | CustomerResource | Resource details (if applicable) |
Billing Information Fields
| Field | Type | Description |
|---|---|---|
defaultPaymentMethodLast4Digits | String | Last 4 digits of payment method |
defaultPaymentMethodType | PaymentMethodType | CARD, BANK_TRANSFER, etc. |
defaultPaymentExpirationMonth | Int | Card expiration month |
defaultPaymentExpirationYear | Int | Card expiration year |
defaultPaymentMethodId | String | Payment method ID |
Common Use Cases
Self-service portal page
Self-service portal page
Build a complete customer portal showing current plan, usage, and upgrade options.
Usage dashboard
Usage dashboard
Display current feature usage against limits with progress bars.
Billing management
Billing management
Show payment method and link to billing portal for updates.
Upgrade prompts
Upgrade prompts
Check
canUpgradeSubscription and show upgrade CTAs when appropriate.Example: Building a Portal UI
Related Operations
- Get Customer - Get customer details
- Paywall - Get available plans for upgrade
- Preview Subscription - Preview upgrade pricing
