Skip to main content

Basic usage example

Drop the script into your app (e.g. src/main.ts), install gopay-sdk, set the env vars below, then run with tsx / ts-node or compile and run with node.

Script

Run it

  • GOPAY_CLIENT_ID, GOPAY_CLIENT_SECRET, and optionally GOPAY_GATEWAY_URL should match your sandbox account.
  • Execute with your usual TypeScript runner (tsx, ts-node, or compile then node).