Skip to main content
The customer lifecycle in Paygentic involves creating customer relationships, establishing subscriptions, and tracking usage. This guide covers the programmatic approach to managing customers through the API.

Overview

Paygentic supports two distinct types of consumer accounts, each with different capabilities and use cases:

Managed Consumers

Created via API by merchants for quick onboarding. Customers only access Paygentic in relation to this one merchant. These customers do not have Paygentic users and only use Paygentic through the merchant integration.

Full Consumer Accounts

When the customer interacts with multiple merchants they can choose to keep everything in one account and sign in to Paygentic to manage their usage.
Customers usually start as managed and only transition to a full account when needed. The key point for you is that funds in a managed account are exclusively available to your merchant integration.

Creating customers via API

Prerequisites

  • Valid merchant API key
  • Merchant account ID
  • Customer email and preferable address
API Reference: See the Create Customer API endpoint for complete request and response schemas.
When creating a new customer with consumer data, you’re establishing a managed consumer account:
Idempotency: If a customer already exists for the consumer-merchant pair, the API returns 200 with the existing customer ID instead of creating a duplicate.

Creating subscriptions

Once you have a customer, you can create subscriptions. The plan you choose determines which fees and usage-based prices apply. Customers must pay prepaid fees before the subscription starts. The subscription response includes a payment link where the customer can pay for this charge. The payment link also appears when the subscription has a prefundAmount. Use it to add funds for pay-as-you-go usage (instantly priced billable metrics).
API Reference: See the Create Subscription API endpoint for complete request and response schemas.

Customer portal

The customer portal allows your customers to view their subscription details, usage metrics, invoices, and manage payment sources - all within a secure, hosted interface.
For managed consumers, generate portal links via the subscription endpoint:
API Reference: See the Generate Portal Link API endpoint for complete request and response schemas.
This provides read-only access to subscription data, source management, and usage tracking.

Embedding the portal

You can embed the customer portal directly into your application, providing a seamless experience without redirecting users away.

Setup requirements

Before embedding:
  1. Domain whitelisting: Contact support@paygentic.io to whitelist your domain(s)
  2. CSP configuration: Add platform.paygentic.io to your CSP frame-src directive:

Implementation

Important:
  • Portal URLs are single-use - generate a fresh URL for each session or page reload
  • The sandbox attribute is required for security
The sandbox attribute is required for security:
  • allow-scripts - Portal functionality
  • allow-same-origin - Communication with your site
  • allow-forms - Form submission
  • allow-popups - 3D Secure authentication
Payment checkout: To collect one-off payments or embed a payment form in your application, see Payment Portal.

Next steps