Prerequisites
Before you begin, make sure you have:- Node.js 16 or later installed
- A PayNow store ID
- For management operations: an API key from your PayNow dashboard
Install the SDK
Using the storefront client
The storefront client is used for customer-facing operations. Here’s how to get started:Create a storefront client
Initialize the client with your store ID:
The storefront client can optionally accept a customer token as the second parameter for authenticated requests.
Using the management client
The management client requires an API key and provides access to administrative operations:Authenticated storefront requests
For operations that require customer authentication, pass a customer token when creating the client:Error handling
The SDK provides typed error handling with theisPayNowError type guard:
Next steps
Installation
Learn about advanced configuration options
API reference
Explore all available endpoints and methods