PayNow

Test Environment

A separate PayNow environment, running the same code as production, for developers testing integrations away from real stores.

The test environment runs the same release as production, so everything works the way it does on your live store. Its data is completely separate - none of your live stores, products, customers or orders are in it, and nothing you do there reaches production.

ServiceTest environmentProduction
Dashboardhttps://dashboard.canary.pn-builds.xyzhttps://dashboard.paynow.gg
APIhttps://api.canary.pn-builds.xyzhttps://api.paynow.gg
Checkouthttps://checkout.canary.pn-builds.xyzhttps://checkout.paynow.gg

Point your integration at the test environment's API base URL instead of production. Everything else, including paths and authentication, is the same.

Using the TypeScript SDK

The TypeScript SDK talks to production by default. Pass baseUrl when you create a client to send its requests to the test environment instead:

TypeScript
import { createManagementClient, createStorefrontClient } from "@paynow-gg/typescript-sdk";

const baseUrl = "https://api.canary.pn-builds.xyz";

const management = createManagementClient({
  baseUrl,
  apiKey: process.env.PAYNOW_API_KEY!,
  storeId: "411486491630370816",
});

const storefront = createStorefrontClient({
  baseUrl,
  storeId: "411486491630370816",
});

The API key and store ID must come from the test environment's dashboard. Keys and stores from production don't exist there.

Read the base URL from an environment variable so the same code can switch between environments without changes:

TypeScript
const management = createManagementClient({
  baseUrl: process.env.PAYNOW_API_BASE_URL, // unset in production
  apiKey: process.env.PAYNOW_API_KEY!,
  storeId: process.env.PAYNOW_STORE_ID!,
});

Leaving baseUrl unset falls back to https://api.paynow.gg.

Using PayNow.js

PayNow.js opens the production checkout by default. Pass baseURL to checkout.open to open the test environment's checkout instead:

TypeScript
import PayNowJS from "@paynow-gg/paynow.js";

PayNowJS.checkout.open({
  token: "checkout token",
  baseURL: "https://checkout.canary.pn-builds.xyz",
});

The checkout token must come from the test environment's API. A token from production won't open there, and a test token won't open on production's checkout. Leave off the trailing slash, as PayNow.js adds its own.

What it's for

Developers testing integrations they don't want running against real stores. API clients, headless storefronts, webhook handlers and the like. It isn't a place to run or rehearse a real store. No real payments can be processed here.

Getting started

Because the data is separate, you start from scratch. Set up a store in the test environment just as you would on production, following Creating a Store and Your First Product. Recreate whatever you want to test there.

Paying in the test environment

Payments run in Stripe test mode. No real money moves and real cards are declined, so checkout only accepts Stripe's test card:

FieldValue
Card number4242 4242 4242 4242
ExpiryAny date in the future
CVCAny three digits
Name, ZIPAnything

Orders paid this way behave like real orders inside the test environment. They show in Content → Orders, count towards analytics, and can be refunded, but they never reach your live store, your balance or your payouts.

Nothing moves to production

The test environment has its own database, messaging, search and analytics. Nothing flows from it into production, and there is no way to export or transfer anything across: products you create, settings you change and orders you place in the test environment cannot be moved into your live store.

Set it up again for real. Once your integration works in the test environment, point it at production and recreate the store, products and keys it needs there. Nothing is promoted across.