kit.sync is a thin convenience module that groups together the individual sync() methods already available on other modules, plus one aggregate method that pulls a customer's entire state in one call. Nothing here does anything you couldn't already do by calling the individual modules directly; it exists purely so a full reconciliation reads as one clear call instead of five.| Method | Equivalent to | Description |
|---|---|---|
customer(customerId) | kit.customers.sync() | Re-pull and persist a single customer. |
subscription(subscriptionId, userId?) | kit.subscriptions.sync() | Re-pull and persist a single subscription. |
payment(paymentIntentId, userId?) | kit.payments.sync() | Re-pull and persist a single payment. |
invoice(invoiceId, userId?) | kit.invoices.sync() | Re-pull and persist a single invoice. |
paymentMethods(customerId, userId?) | kit.paymentMethods.sync() | Re-pull and persist a customer's payment methods. |
everythingForCustomer(customerId, userId?) | — | Pulls the customer, all their subscriptions, all their invoices and all their payment methods in one call. See below. |
everythingForCustomer() in detailcustomers.sync(), subscriptions.listByCustomer(), invoices.listByCustomer(), and paymentMethods.sync(). Every subscription and invoice returned is individually persisted via saveSubscription() / saveInvoice() when a storage adapter is configured, so a single call fully reconciles that customer's entire billing state in your own database.payments-by-customer or paymentMethods-only equivalent inside everythingForCustomer() beyond what's listed above; it deliberately covers exactly the four object types StripeKit tracks. For anything else, call the underlying Stripe client directly via kit.raw.sync's individual methods (customer, subscription, payment, invoice, paymentMethods) do anything different from calling the same method directly on their own module; they exist purely for convenience and discoverability.