Skip to content

Paddle Schemas

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

Paddle Schemas

Public Guardian schemas, exported from @tundraconnect/paddle/schemas. Each <Thing>SchemaObject has a matching <Thing>Schema type.

import {
  EventSchemaObject,
  SubscriptionSchemaObject,
  TransactionSchemaObject,
} from '@tundraconnect/paddle/schemas';

declare const body: unknown;
const event = EventSchemaObject.parse(body);
if (event.event_type.startsWith('subscription.')) {
  const subscription = SubscriptionSchemaObject.parse(event.data);
  console.log(subscription.status);
}

Response schemas let unknown fields pass through. Request schemas are strict and reject unknown fields.

Entities

Export Used for
ProductSchemaObject A product.
PriceSchemaObject A price, with billing_cycle null for one-time prices.
DiscountSchemaObject A discount.
CustomerSchemaObject A customer.
AddressSchemaObject A customer address.
TransactionSchemaObject A transaction, with included customer/address/discount.
SubscriptionSchemaObject A subscription.
AdjustmentSchemaObject A refund, credit or chargeback.
CustomerPortalSessionSchemaObject createCustomerPortalSession result.
EventSchemaObject An event-log item, and a webhook body (with notification_id).
DocumentUrlSchemaObject { url } of an invoice or credit-note PDF.

Requests

Export Body of
CreateProductRequestSchemaObject POST /products
UpdateProductRequestSchemaObject PATCH /products/{id}
CreatePriceRequestSchemaObject POST /prices
UpdatePriceRequestSchemaObject PATCH /prices/{id}
CreateDiscountRequestSchemaObject POST /discounts
UpdateDiscountRequestSchemaObject PATCH /discounts/{id}
CreateCustomerRequestSchemaObject POST /customers
UpdateCustomerRequestSchemaObject PATCH /customers/{id}
CreateAddressRequestSchemaObject POST /customers/{id}/addresses
UpdateAddressRequestSchemaObject PATCH /customers/{id}/addresses/{id}
CreateTransactionRequestSchemaObject POST /transactions
UpdateTransactionRequestSchemaObject PATCH /transactions/{id}
TransactionItemRequestSchemaObject One items entry of a transaction.
UpdateSubscriptionRequestSchemaObject PATCH /subscriptions/{id}
CancelSubscriptionRequestSchemaObject POST /subscriptions/{id}/cancel
PauseSubscriptionRequestSchemaObject POST /subscriptions/{id}/pause
ResumeSubscriptionRequestSchemaObject POST /subscriptions/{id}/resume
ChargeSubscriptionRequestSchemaObject POST /subscriptions/{id}/charge
CreateAdjustmentRequestSchemaObject POST /adjustments

Building blocks

Export Shape
MoneySchemaObject { amount: string, currency_code }.
MoneyRequestSchemaObject The same, strict: whole non-negative amounts only.
DurationSchemaObject { interval, frequency }.
DurationRequestSchemaObject The same, strict.
IntervalSchemaObject day, week, month, year.
TimePeriodSchemaObject { starts_at, ends_at }.
CustomDataSchemaObject Any JSON object.
ImportMetaSchemaObject { imported_from, external_id }.
EntityStatusSchemaObject active, archived.
TaxCategorySchemaObject A product tax category.
TrialPeriodSchemaObject A price's trial.
UnitPriceOverrideSchemaObject A per-country price.
PriceQuantitySchemaObject { minimum, maximum }.
DiscountTypeSchemaObject flat, flat_per_seat, percentage.
BillingDetailsSchemaObject Invoice settings for manual collection.
BillingDetailsRequestSchemaObject The same, strict.
TransactionStatusSchemaObject Transaction status.
TransactionTotalsSchemaObject details.totals.
TransactionItemSchemaObject A transaction item.
TransactionPaymentSchemaObject A payment attempt.
SubscriptionStatusSchemaObject Subscription status.
SubscriptionItemSchemaObject A subscription item.
ScheduledChangeSchemaObject A pending cancel, pause or resume.
AdjustmentStatusSchemaObject Adjustment status.
AdjustmentItemSchemaObject An adjustment item.
PaginationSchemaObject meta.pagination on a list.
ErrorResponseSchemaObject Paddle's { error, meta } failure envelope.

Enum value lists are exported too: TRANSACTION_STATUSES, SUBSCRIPTION_STATUSES, PRORATION_BILLING_MODES, TAX_CATEGORIES, TAX_MODES, DISCOUNT_TYPES, ADJUSTMENT_ACTIONS, ADJUSTMENT_STATUSES, COLLECTION_MODES, TRANSACTION_INCLUDES, EFFECTIVE_FROM, ON_RESUME_BEHAVIOURS, PAYMENT_FAILURE_BEHAVIOURS, SCHEDULED_CHANGE_ACTIONS, INTERVALS, ENTITY_STATUSES, CATALOG_TYPES, DISCOUNT_MODES.

Clone this wiki locally