Customer portal Link

Request
Request to generate a customer postal page session URL.
Path
POST /customer-portal/link
Example (No Subscription)
The example below only includes the customer_id. When no subscription_id is provided, the customer will be presented with the available packages and can create a new subscription.
{
"customer_id": "cus_abc123...",
}
Example (Subscription)
The example below includes both the customer_id and subscription_id. This allows the customer to manage a specific subscription. If the subscription is inactive, the customer will have the option to reactivate it.
{
"customer_id": "cus_abc123...",
"subscription_id": "sub_abc123...",
}
Example (Advanced settings)
The example below demonstrates how to override the default settings configured in the dashboard. This can be useful when you need to disable specific features for certain customers or subscriptions, or when different products should be displayed for a particular subscription.
{
"customer_id": "cus_abc123...",
"subscription_id": "sub_abc123...",
"settings": {
"show_invoices": true, // allow the user to view the invoices
"show_billing_info": true, // show the user's billing info
"allow_update_billing_info": true, // allow the user to update their billing info
"allow_cancel": true, // allow the user to cancel the subscription
"cancel_type": "AFTER_BILLING_PERIOD", // NOW or AFTER_BILLING_PERIOD
"allow_switch_plan": true, // allow the user to switch to another plan
"products_ids": ["pro_abc123...", "pro_abc123..."], // add multiple products that the user can select. This will be grouped by interval and orders from the smallest amount to largest
"redirect_url": "https://my-portal.site.com", // if the user selects back to site or closes the link then they will be redirected to this page
"page_title": "My SaaS business" // Change the left side page title
}
}
Request Parameters
Fields below appear in the request body examples on this page. Y = always required, C = conditional, N = optional.
Field | Required | Type | Description | Example |
|---|---|---|---|---|
| customer_id | Y | String | The customer the portal link is generated for | cus_abc123... |
| subscription_id | N | String | Manage a specific subscription. If omitted, the customer can select a package to create a new subscription. If the subscription is inactive the user can activate it. | sub_abc123... |
| settings | N | Object | Override the default portal settings. Omit to use your account defaults. | See advanced example |
| settings.show_invoices | N | Boolean | Allow the user to view their invoices | true |
| settings.show_billing_info | N | Boolean | Show the user's billing info | true |
| settings.allow_update_billing_info | N | Boolean | Allow the user to update their billing info | true |
| settings.allow_cancel | N | Boolean | Allow the user to cancel the subscription | true |
| settings.cancel_type | N | ENUM | When a cancellation takes effect: NOW or AFTER_BILLING_PERIOD | AFTER_BILLING_PERIOD |
| settings.allow_switch_plan | N | Boolean | Allow the user to switch to another plan | true |
| settings.products_ids | N | Array | Product ids the user can select from. Grouped by interval and ordered from the smallest amount to the largest. | ["pro_abc123...", "pro_abc123..."] |
| settings.redirect_url | N | String | Where the user is redirected when they select "back to site" or close the link | https://my-portal.site.com |
| settings.page_title | N | String | Override the left-side page title | My SaaS business |
Response Body
{
"status": true,
"result": {
"id": "cpl_HVpCeoNys1f22X7QcuWHY",
"session_id": "ses_G-xkVKoxHgEBrY8suKgR3",
"customer_id": "cus_abc123...",
"subscription_id": "sub_abc123...",
"link_url": "https://pay.kwik.co.za/portal/a0oDxntJxWlA8LjfOR9bgck9C4w....",
"expires_at": "2026-03-13T12:30:00Z"
}
}
Response Parameters
Field | Type | Description | Example |
|---|---|---|---|
| status | Boolean | Indicates if the request was successful | true |
| result.id | String | Unique customer portal link identifier | cpl_HVpCeoNys1f22X7QcuWHY |
| result.session_id | String(32) | Session identifier for the portal link | ses_G-xkVKoxHgEBrY8suKgR3 |
| result.customer_id | String(32) | Associated customer ID | cus_abc123... |
| result.subscription_id | String(32) | Associated subscription ID, when a subscription_id was supplied | sub_abc123... |
| result.link_url | String | URL to redirect the user to the customer portal | https://pay.kwik.co.za/portal/a0oDxntJxWlA8LjfOR9bgck9C4w.... |
| result.expires_at | String | ISO timestamp when the portal link expires | 2026-03-13T12:30:00Z |
Lookups
Retrieve reference data and validation values used across the API including bank names, account types, countries, provinces, client types, and ID types. Essential for populating dropdown lists and validating form inputs.
Payment Methods
Retrieve available payment methods including EFT Debit Orders, DebiCheck, Registered Mandates, Card payments, and Pay-in methods. Essential for determining supported banks and payment options for your customers.