FeaturesCalmony PayUpdated March 15, 2026
Calmony Pay SDK — Full Client Interface
Calmony Pay SDK — Full Client Interface
As of v1.0.63, the CalmonyPay SDK client exposes the complete method interface defined by the Calmony Pay SDK Client Interface specification. This page documents every available namespace and method.
Namespaces at a Glance
| Namespace | Methods |
|---|---|
customers | create, retrieve, update, delete, list |
paymentMethods | create, retrieve, list, attach, detach |
paymentIntents | create, confirm, retrieve, list |
subscriptions | create, update, cancel, retrieve, list |
checkout | sessions.create, sessions.retrieve |
invoices | create, retrieve, update, list, finalize, pay, voidInvoice, downloadPdf |
customers
Manage the customers who pay through Calmony Pay.
// Create a customer
await calmonyPay.customers.create({ ... });
// Retrieve a customer by ID
await calmonyPay.customers.retrieve(customerId);
// Update a customer
await calmonyPay.customers.update(customerId, { ... });
// Delete a customer
await calmonyPay.customers.delete(customerId);
// List all customers
await calmonyPay.customers.list({ ... });
paymentMethods
Store and manage saved card and payment method records.
// Create a payment method
await calmonyPay.paymentMethods.create({ ... });
// Retrieve a payment method
await calmonyPay.paymentMethods.retrieve(paymentMethodId);
// List payment methods for a customer
await calmonyPay.paymentMethods.list({ customer: customerId });
// Attach a payment method to a customer
await calmonyPay.paymentMethods.attach(paymentMethodId, { customer: customerId });
// Detach a payment method from a customer
await calmonyPay.paymentMethods.detach(paymentMethodId);
paymentIntents
Orchestrate one-off card payment flows.
// Create a payment intent
await calmonyPay.paymentIntents.create({ amount, currency, ... });
// Confirm a payment intent
await calmonyPay.paymentIntents.confirm(paymentIntentId, { ... });
// Retrieve a payment intent
await calmonyPay.paymentIntents.retrieve(paymentIntentId);
// List payment intents
await calmonyPay.paymentIntents.list({ ... });
subscriptions
Create and manage recurring billing subscriptions.
// Create a subscription
await calmonyPay.subscriptions.create({ customer: customerId, items: [...], ... });
// Update a subscription
await calmonyPay.subscriptions.update(subscriptionId, { ... });
// Cancel a subscription
await calmonyPay.subscriptions.cancel(subscriptionId);
// Retrieve a subscription
await calmonyPay.subscriptions.retrieve(subscriptionId);
// List subscriptions
await calmonyPay.subscriptions.list({ ... });
checkout
Create hosted checkout sessions for low-integration payment flows.
// Create a checkout session
await calmonyPay.checkout.sessions.create({
successUrl: 'https://example.com/success',
cancelUrl: 'https://example.com/cancel',
lineItems: [...],
mode: 'payment', // or 'subscription'
});
// Retrieve a checkout session
await calmonyPay.checkout.sessions.retrieve(sessionId);
invoices
The invoices namespace has been available since the initial release and is unchanged.
await calmonyPay.invoices.create({ ... });
await calmonyPay.invoices.retrieve(invoiceId);
await calmonyPay.invoices.update(invoiceId, { ... });
await calmonyPay.invoices.list({ ... });
await calmonyPay.invoices.finalize(invoiceId);
await calmonyPay.invoices.pay(invoiceId);
await calmonyPay.invoices.voidInvoice(invoiceId);
await calmonyPay.invoices.downloadPdf(invoiceId);
Affected File
src/lib/calmony-pay/client.ts