> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinkbill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Portal

> Empower customers to manage their own subscriptions and billing

## Overview

The Customer Portal enables self-service management of subscriptions, payment methods, and billing information. Customers access the portal through secure, time-limited magic links generated either via API or email verification.

## Features

### Subscription Management

Customers can view subscription details (product, pricing, renewal dates, payment method) and perform updates or cancellations as needed.

### Payment Methods

Customers can:

* Set default payment methods
* Update billing addresses
* Remove non-default payment methods, or default payment method when no active subscriptions exist

### Billing Information

Customers can update invoice-related billing details separate from payment method information.

### Invoice History

Customers can download PDF copies of subscription-generated [invoices](/guides/resources/subscription#invoice) from the Billing History section.

## Access Options

### Email Verification

1. Obtain your unique portal link from **Settings** → **Merchant** → **Customer Portal**
2. Configure portal settings and save
3. Share the link ending with *cpc\_xxxxx* with customers
4. Customers enter their registered email to receive a magic link

### API Integration

Generate magic links programmatically:

<AccordionGroup>
  <Accordion icon="file-json" title="Sample Code">
    <Danger>Always test your code thoroughly before deploying to production!</Danger>

    <CodeGroup>
      ```json Generate access link via API theme={null}
      curl --location --request POST 'https://uat-api.clinkbill.com/api/billing/session' \
      --header 'X-Timestamp: ${currentMillisecondsTimestamp}' \
      --header 'X-API-Key: ${sk_key}' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "customerId": "cus_euuqxrz3sqlo"
      }'
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>
