ManagementSchemas export provides TypeScript type definitions for all request and response schemas in the Management API.
Overview
The Management API schemas are automatically generated from the PayNow OpenAPI specification and provide type safety for administrative operations like managing products, orders, customers, and store configuration.Using Management Schemas
Typing API Responses
UseManagementSchemas to type data returned from Management API methods:
Typing Request Payloads
Type your request payloads for better type safety:Working with Nested Types
Access nested schema types for complex structures:Common Management Schemas
ProductDto
Represents a product in your store.The Flake ID of the product
The Flake ID of the store
The name of the product
The URL-friendly slug of the product
The description of the product
Whether the product is enabled for purchase
The price in the smallest currency unit (e.g., cents)
The currency code (e.g., usd, eur, gbp)
The URL to the product image
ISO 8601 timestamp when the product was created
ISO 8601 timestamp when the product was last updated
CheckoutDto
Represents a completed checkout/order.The Flake ID of the checkout
The Flake ID of the store
The Flake ID of the customer
The checkout status (e.g., completed, pending, canceled)
The subtotal amount in cents
The tax amount in cents
The discount amount in cents
The total amount in cents
The currency code
The line items in the checkout
CustomerDto
Represents a customer in your store.The Flake ID of the customer
The Flake ID of the store
The customer’s email address
ISO 8601 timestamp when the customer was created
ISO 8601 timestamp when the customer was last updated
AffiliateLinkDto
Represents an affiliate marketing link.The Flake ID of the affiliate link
The Flake ID of the store
The wallet ID of the affiliate
Whether the affiliate link is enabled
The type of commission
The commission value (cents for fixed, percentage for percentage)
The type of discount offered to customers
The discount value
PayNowError
The standard error response schema. See Error Handling for details.The HTTP status code (e.g., 400, 404, 500)
The PayNow parseable error code (e.g., bad-request, not-found)
The human-readable error message
A distributed trace ID used for debugging
An array of validation errors (only present for validation failures)
Schema Structure
TheManagementSchemas type is derived from the OpenAPI components:
- Product management:
ProductDto,CreateProductDto,UpdateProductDto - Order management:
CheckoutDto,CreateCheckoutSessionDto - Customer management:
CustomerDto,UpdateCustomerDto - Affiliate links:
AffiliateLinkDto,CreateAffiliateLinkDto - Bans:
BanDto,CreateBanDto - Coupons:
CouponDto,CreateCouponDto - Gift cards:
GiftCardDto,CreateGiftCardDto - Subscriptions:
SubscriptionDto,UpdateSubscriptionDto - Webhooks:
WebhookDto,CreateWebhookDto - Store configuration:
StoreDto,UpdateStoreDto
Type Safety Benefits
Autocomplete in Your IDE
Autocomplete in Your IDE
Access all available schema properties with IntelliSense/autocomplete support.
Compile-Time Validation
Compile-Time Validation
Catch type errors during development before they reach production.
Refactoring Safety
Refactoring Safety
When schemas change, TypeScript will highlight all affected code.
Self-Documenting Code
Self-Documenting Code
Types serve as inline documentation for API request and response structures.
Enum Types
Many schemas include enum types for better type safety:Related Resources
Management Client
Learn about Management API methods
Error Handling
Handle API errors effectively
Storefront Schemas
Type definitions for Storefront API
Webhook Schemas
Type definitions for webhook payloads