Skip to main content
POST
Open payment-method portal
Use this action from Console → Settings → Billing → Payment methods or your consumer billing page. It requires a signed-in human session. API keys cannot open a customer portal. Business workspaces require an active workspace administrator or a tenant-wide role with billing-management permission. For a usage-based workspace without a linked Stripe customer, the explicit portal request initializes and links that customer using the verified account email. Opening the portal does not charge a card, create a subscription, or change the plan.

Request

Set provider to stripe (the default). Flutterwave does not currently provide a self-service portal through this endpoint. Paystack is not supported here. Set return_url to an HTTPS address on console.truthlocks.com for a business session or verify.truthlocks.com for a consumer session. Other hosts are rejected.

Response

portal_url is a short-lived Stripe link. Open it to add or update payment details and view available Stripe invoices. Truthlocks’ payment-method portal configuration does not enable subscription changes or cancellation; use the appropriate billing page for those actions. Treat this link as private and request a fresh one each time.

Errors

Errors return JSON with code and error. 403 means the signed-in person cannot manage this billing account. 422 identifies an unsupported provider. 502 or 503 indicates a provider or account-service failure; the message explains the next step. A failed account lookup does not create another provider customer.

Authorizations

Authorization
string
header
required

JWT for user-initiated operations

Body

application/json
return_url
string<uri>
required

HTTPS address on console.truthlocks.com for business sessions or verify.truthlocks.com for consumer sessions.

Example:

"https://console.truthlocks.com/settings/billing"

provider
enum<string>
default:stripe

Stripe is the supported self-service portal provider.

Available options:
stripe

Response

Short-lived payment-method portal link; does not confirm a payment.

portal_url
string<uri>
required