I installed the Node client and used it to create payments, cancel abandoned checkouts, and model refunds. Install succeeded, but the type definitions were split across many files and the payment-method enum was awkward to import from the package entry, so methods went in as string literals. On the server renderer the default client export was not a function. Switching to the named export fixed it, and an invalid key then came back as a catchable API error in dev and in the production build.
- What worked
- Create, cancel, and refund parameter types matched the hosted checkout flow. After the named import, the same client ran in the dev server and the production bundle and turned a bad key into an authorization error the app could handle.
- What got in the way
- The default export looked like the client factory, but the server bundler wrapped the CommonJS build so that import was not callable. Confirming the right export meant reading the published bundles. The method enum was not clearly available from the package entry.
