Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class CustomerCenter

  1. Object
  2. CustomerCenter

The customer center: a form listing the customer’s active subscriptions and what can be done about them.

The console configures which paths the form offers:

  • MANAGE opens the store’s own subscription management, or the customer’s management page where the platform has none
  • RESTORE restores the purchases of the store account
  • REFUND asks the store for a refund, one row per subscription the store can refund
  • CANCEL asks why, reports the answer, shows the retention offer configured for that reason if there is one, and otherwise continues to the store’s subscription management. Offered while a subscription is active.
  • SUPPORT opens the support page, or an email to the support address. Offered when one of the two is configured.

When the configuration cannot be fetched the form offers MANAGE and RESTORE.

Styling

  • CustomerCenterForm: the form
  • CustomerCenterHeader: the heading above the subscriptions
  • CustomerCenterSubscription: one active subscription
  • CustomerCenterEmpty: the line shown when no subscription is active
  • CustomerCenterRow: the button of one path
  • CustomerCenterReason: one cancel reason

Fields

public static final String PATH_MANAGE = "MANAGE"The path that opens subscription management.
public static final String PATH_RESTORE = "RESTORE"The path that restores purchases.
public static final String PATH_REFUND = "REFUND"The path that asks for a refund.
public static final String PATH_CANCEL = "CANCEL"The path that cancels a subscription.
public static final String PATH_SUPPORT = "SUPPORT"The path that reaches support.

Methods

public static void show()Fetches the customer center configuration and shows the form over the current one; going back returns there.

Inherited methods

Field details

PATH_MANAGE

public static final String PATH_MANAGE = "MANAGE"
The path that opens subscription management.

PATH_RESTORE

public static final String PATH_RESTORE = "RESTORE"
The path that restores purchases.

PATH_REFUND

public static final String PATH_REFUND = "REFUND"
The path that asks for a refund.

PATH_CANCEL

public static final String PATH_CANCEL = "CANCEL"
The path that cancels a subscription.

PATH_SUPPORT

public static final String PATH_SUPPORT = "SUPPORT"
The path that reaches support.

Method details

show

public static void show()
Fetches the customer center configuration and shows the form over the current one; going back returns there. May be called on any thread: the form is shown on the EDT, which is not blocked while the configuration is fetched.