Reference
Every resource on PlugipayClient, grouped by namespace, with a one-line description per method. Click through to each resource page in the API docs for full parameter and response details — the SDK matches that surface exactly.
The conventions:
- Single-resource methods return the resource directly.
list methods return { data, cursor, hasMore } — see Pagination.
- Every method can throw
PlugipayError — see Errors.
- Mutating methods get an automatic
Idempotency-Key.
Top-level exports
import {
PlugipayClient,
verifyWebhook,
PlugipayError,
// plus resource types: Customer, CheckoutSession, Invoice, Subscription,
// Refund, Payout, Plan, Template, WebhookEvent, ...
} from '@forjio/plugipay-node';
Client construction
new PlugipayClient({
keyId: string;
secret: string;
baseUrl?: string; // default: 'https://plugipay.com'
onBehalfOf?: string; // platform-admin only
timeoutMs?: number; // default: 30000
});
Two top-level instance methods:
| Method |
Purpose |
client.forMerchant(accountId) |
Returns a new client scoped to a specific acc_... merchant. Platform-admin use. |
client.request(args) |
Low-level escape hatch. Sign and send an arbitrary request. |
See Authentication for details.
customers
API: Customers.
| Method |
Description |
customers.create(input) |
Create a new customer. |
customers.get(id) |
Fetch one customer by ID. |
customers.list(params?) |
Paginated list, filterable by email. |
customers.update(id, patch) |
Update name, email, or phone. |
plans
API: Plans.
| Method |
Description |
plans.create(input) |
Create a recurring billing plan. |
plans.get(id) |
Fetch one plan. |
plans.list(params?) |
Paginated list, filterable by active and order. |
plans.update(id, patch) |
Update name, description, active flag, or metadata. |
plans.archive(id) |
Soft-archive the plan (existing subscriptions continue). |
checkoutSessions
API: Checkout sessions.
| Method |
Description |
checkoutSessions.create(input) |
Create a hosted checkout session. Returns hostedUrl. |
checkoutSessions.get(id) |
Fetch one checkout session. |
checkoutSessions.list(params?) |
Paginated list, filterable by status and customerId. |
checkoutSessions.cancel(id) |
Cancel an open session. |
checkoutSessions.confirm(id) |
Manually confirm (used for manual-method adapters). |
invoices
API: Invoices.
| Method |
Description |
invoices.create(input) |
Draft a new invoice for a customer. |
invoices.get(id) |
Fetch one invoice. |
invoices.list(params?) |
Paginated list, filterable by status and customerId. |
invoices.finalize(id) |
Lock a draft invoice; ready to pay. |
invoices.pay(id) |
Trigger a payment attempt. |
invoices.void(id) |
Void an invoice. |
invoices.sendEmail(id, to?) |
Email the invoice to the customer or a specific address. |
subscriptions
API: Subscriptions.
| Method |
Description |
subscriptions.create(input) |
Subscribe a customer to a plan. |
subscriptions.get(id) |
Fetch one subscription. |
subscriptions.list(params?) |
Paginated list, filterable by status, customerId, planId. |
subscriptions.cancel(id, at?) |
Cancel 'now' or at 'period_end' (default). |
subscriptions.pause(id, resumeAt?) |
Pause; optionally schedule auto-resume. |
subscriptions.resume(id) |
Resume a paused subscription. |
portalSessions
API: Portal sessions.
| Method |
Description |
portalSessions.create(input) |
Mint a one-time URL for the customer billing portal. |
receipts
API: Receipts.
| Method |
Description |
receipts.list(params?) |
Paginated list, filterable by sourceType, customerId, issuedAfter, issuedBefore. |
receipts.get(id) |
Fetch one receipt (full document). |
refunds
API: Refunds.
| Method |
Description |
refunds.create(input) |
Refund a checkout session or invoice. |
refunds.get(id) |
Fetch one refund. |
refunds.list(params?) |
Paginated list, filterable by status, sourceId. |
payouts
API: Payouts.
| Method |
Description |
payouts.create(input) |
Request a payout to your bank account. |
payouts.get(id) |
Fetch one payout. |
payouts.list(params?) |
Paginated list, filterable by status. |
payouts.cancel(id) |
Cancel a pending payout. |
payouts.markInTransit(id, reference?) |
Manual-adapter only: mark as in-transit. |
payouts.markPaid(id, reference?) |
Manual-adapter only: mark as paid. |
payouts.markFailed(id, failureReason) |
Manual-adapter only: mark as failed. |
payouts.balance() |
Get your available payout balance. |
payouts.getBankAccount() |
Get the configured payout bank account. |
payouts.updateBankAccount(input) |
Update the payout bank account. |
ledger
API: Ledger.
| Method |
Description |
ledger.list(params?) |
Paginated list of ledger entries, filterable by order, txId, code, sourceType, sourceId. |
ledger.balances() |
Get aggregated balances per account code. |
reports
API: Reports.
| Method |
Description |
reports.pnl(params) |
Profit-and-loss report for a date range. |
reports.cashFlow(params) |
Cash-flow report for a date range. |
The CSV ledger export is not auto-exposed (it streams binary data). Use client.request() if you need it.
webhookEndpoints
API: Webhook endpoints.
| Method |
Description |
webhookEndpoints.list() |
All endpoints in this workspace. |
webhookEndpoints.create(input) |
Register a new endpoint. Returns the signing secret once. |
webhookEndpoints.delete(id) |
Delete an endpoint. |
To verify inbound events, use the top-level verifyWebhook helper — see Webhooks.
events
API: Events.
| Method |
Description |
events.list(params?) |
Paginated list of events, filterable by type, occurredAfter, occurredBefore, order. |
events.get(id) |
Fetch one event record. |
Use this for replay / debugging — the live delivery path is webhooks.
adapters
API: Adapters.
| Method |
Description |
adapters.list() |
All payment-provider adapters configured for this workspace. |
adapters.updateXendit(config) |
Update the Xendit adapter config. |
adapters.updatePaypal(config) |
Update the PayPal adapter config. |
adapters.updateMidtrans(config) |
Update the Midtrans adapter config. |
adapters.updateManual(config) |
Update the manual-payment adapter config. |
adapters.managedOnboardingState() |
Inspect managed-onboarding state. |
adapters.startManagedOnboarding(input?) |
Kick off managed onboarding (default kind: xendit). |
adapters.simulateManagedOnboarding(input?) |
Test-mode only: simulate verified/failed outcome. |
apiKeys
API: API keys.
| Method |
Description |
apiKeys.list() |
All API keys in this workspace. |
apiKeys.create(input) |
Mint a new key. Returns the secret once. |
apiKeys.revoke(id) |
Revoke a key by ID. |
billing
API: Billing (your own subscription to Plugipay).
| Method |
Description |
billing.listTiers() |
Available billing tiers. |
billing.listPlans() |
Available billing plans. |
billing.refreshTiers() |
Force a tier cache refresh. |
onboarding
API: Onboarding.
| Method |
Description |
onboarding.provisionManaged(input) |
Provision a managed workspace by email + brand name. |
checkoutSettings
API: Checkout settings.
| Method |
Description |
checkoutSettings.get() |
Get the workspace-wide checkout settings (brand logo, color, default template, terms/privacy URLs). |
checkoutSettings.update(patch) |
Update those settings. |
templates
API: Templates.
| Method |
Description |
templates.list(params?) |
List templates, filterable by kind (checkout / receipt / invoice). |
templates.get(id) |
Fetch one template. |
templates.create(input) |
Create a template (kind + name + document). |
templates.update(id, patch) |
Update a template's name or document. |
templates.makeDefault(id) |
Mark a template as the default for its kind. |
templates.duplicate(id, name?) |
Duplicate a template, optionally with a new name. |
templates.preview(input) |
Render a sample HTML preview for a kind + document. |
templates.delete(id) |
Delete a template. |
uploads
API: Uploads.
| Method |
Description |
uploads.image(input) |
Upload an image by base64. Returns the hosted URL. |
workspaces
API: Workspaces.
| Method |
Description |
workspaces.list() |
All workspaces the current key can access. |
workspaces.create(input) |
Create a new workspace. |
workspaces.update(id, patch) |
Update brand name or business email. |
workspaces.delete(id) |
Delete a workspace. |
account
API: Account (the merchant's own profile, sessions, and linked accounts).
| Method |
Description |
account.get() |
Fetch the current account profile. |
account.update(patch) |
Update profile fields (e.g. name). |
account.listSessions() |
Browser sessions for the account. |
account.revokeSession(id) |
Revoke one browser session. |
account.revokeAllSessions() |
Revoke every session (except the current). |
account.listLinked() |
Linked third-party accounts (Google, etc.). |
account.unlink(provider) |
Unlink one provider. |
account.changeEmail(input) |
Initiate an email change (requires password). |
account.changePassword(input) |
Change password (requires the current one). |
account.listMembers() |
Workspace members. |
adminPortal
Plugipay-internal operator surface. You almost certainly don't need this — only Plugipay employees and dedicated platform-partner staff use it.
| Method |
Description |
adminPortal.me() |
Identity of the calling admin. |
adminPortal.listBillingAccounts() |
All billing accounts. |
adminPortal.updateBillingAccount(accountId, patch) |
Update a billing account. |
adminPortal.listPartners() |
All registered platform partners. |
adminPortal.createPartner(input) |
Create a new platform partner. |
adminPortal.updatePartner(id, patch) |
Update a platform partner. |
adminPortal.deletePartner(id) |
Delete a platform partner. |
admin
API: Platform admin (plugipay:platform:admin scope; issued to Storlaunch, Fulkruma, Ripllo).
| Method |
Description |
admin.provisionWorkspace(input) |
Provision a Plugipay workspace under a partner with a stamped discount rate. |
admin.getWorkspace(accountId) |
Fetch a partner-owned workspace by acc_.... |
admin.partnerUsage(params) |
Monthly usage rollup for unified partner billing. |
Low-level: request
For endpoints the SDK doesn't wrap (CSV exports, brand-new endpoints, debug calls), the low-level request() method is the escape hatch:
const result = await client.request<{ url: string }>({
method: 'POST',
path: '/api/v1/some/new-endpoint',
body: { foo: 'bar' },
idempotencyKey: 'my-key-123', // optional; SDK auto-generates for mutating calls if omitted
onBehalfOf: 'acc_01H...', // optional override
});
request() signs the call, parses the envelope, and either returns data or throws PlugipayError. If you find yourself reaching for it frequently, file a GitHub issue — that's a signal we should add a typed wrapper.
Source of truth
The SDK source is at sdk/node/src/ in the Plugipay repo. client.ts carries the canonical method list; types.ts carries the resource shapes. If you're hunting for a specific field or a method's exact parameter type, the source is faster than any doc page.
Next