Documentation Index

Fetch the complete documentation index at: https://help.frisbii.com/llms.txt

Use this file to discover all available pages before exploring further.

Custom Self Service

Prev Next

The Frisbii Media self-service portal (Snippets) covers most customer-facing subscription management needs out of the box. If you need a fully custom UI — for example to match a specific design system, or to integrate subscription management into an existing account area — you can build it yourself using the Frisbii Media Customer API.

All Customer API calls are authenticated by the customer's session token (X-plenigo-customer-session header), not by your company API token.

Customer API base URL (stage): https://customer-api.frisbii-media-stage.com/api/v1.0/
Customer API base URL (production): https://customer-api.frisbii-media.com/api/v1.0/


List subscriptions

Show the customer a list of their active and past subscriptions:

// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/getSubscriptions
$response = json_decode($client->request('GET',
    'https://customer-api.frisbii-media.com/api/v1.0/subscriptions',
    ['headers' => ['X-plenigo-customer-session' => $session]]
)->getBody()->getContents(), true);
$subscriptions = $response['items'] ?? [];
foreach ($subscriptions as $subscription) {
    echo "{$subscription['title']} — Status: {$subscription['status']}";
    echo " — Next renewal: {$subscription['nextBookingDate']}";
    echo " — Subscription ID: {$subscription['subscriptionId']}\n";
}

Show subscription detail

Display full details for a single subscription, including payment method, address, and cancellation status:

// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/getSubscription
$subscriptionId = $_GET['id'] ?? null;
$subscription = json_decode($client->request('GET',
    "https://customer-api.frisbii-media.com/api/v1.0/subscriptions/{$subscriptionId}",
    ['headers' => ['X-plenigo-customer-session' => $session]]
)->getBody()->getContents(), true);
echo "Title: {$subscription['title']}\n";
echo "Status: {$subscription['status']}\n";
echo "Cancellation date: " . ($subscription['cancellationDate'] ?? 'not cancelled') . "\n";

Get cancellation reasons

Before showing a cancellation form, retrieve the configured cancellation reasons from Frisbii Media. These are defined in the merchant backend and should be presented as a dropdown or radio group:

// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/getCancellationReasons
$reasons = json_decode($client->request('GET',
    'https://customer-api.frisbii-media.com/api/v1.0/subscriptions/cancellationReasons',
    ['headers' => ['X-plenigo-customer-session' => $session]]
)->getBody()->getContents(), true)['items'] ?? [];
foreach ($reasons as $reason) {
    echo "<option value=\"{$reason['reasonId']}\">{$reason['title']}</option>\n";
}

Cancel a subscription

After the customer selects a cancellation date and reason, submit the cancellation:

// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/cancelSubscription
// Get available cancellation dates first
// @see Cancel a Subscription guide: https://docs.frisbii-media.com/04-subscriptions/04-cancel-subscription
$cancelledSubscription = json_decode($client->request('PUT',
    "https://customer-api.frisbii-media.com/api/v1.0/subscriptions/{$subscriptionId}/cancel",
    [
        'headers' => ['X-plenigo-customer-session' => $session],
        'json'    => [
            'cancellationDate'   => $_POST['cancellationDate'],   // from the dates list
            'cancellationReason' => $_POST['cancellationReason'], // from the reasons list
        ],
    ]
)->getBody()->getContents(), true);
echo "Subscription cancelled. End date: {$cancelledSubscription['cancellationDate']}";

Undo a cancellation

// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/undoCancelSubscription
$subscription = json_decode($client->request('PUT',
    "https://customer-api.frisbii-media.com/api/v1.0/subscriptions/{$subscriptionId}/cancel/undo",
    [
        'headers' => ['X-plenigo-customer-session' => $session],
        'json'    => [],
    ]
)->getBody()->getContents(), true);

Check access

Check whether the customer currently has access to a specific product:

// @see https://customer-api.frisbii-media.com/#tag/Access-Rights/operation/checkAccessOfCustomer
$response = json_decode($client->request('GET',
    'https://customer-api.frisbii-media.com/api/v1.0/accessRights/hasAccess',
    ['headers' => ['X-plenigo-customer-session' => $session]]
)->getBody()->getContents(), true);
$hasAccess = $response['accessGranted'] ?? false;

When to use Snippets vs. custom implementation

Snippets (built-in portal)

Custom implementation

Development effort

Minimal — embed with one JS call

Significant — build all UI yourself

Design control

Limited (custom CSS only)

Full

Maintenance

Frisbii Media maintains it

You maintain it

Best for

Most projects

Strict brand requirements or deep CMS integration


API reference

Full Customer API documentation: