Documentation Index
Fetch the complete documentation index at: https://docs.zabcik.me/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
UsecreateGoPayClient to initialize the SDK.
Config fields
goid: number | string
Your merchant GoPay account ID. Values are normalized to number.
clientId: string
OAuth2 client identifier from GoPay.
clientSecret: string
OAuth2 client secret from GoPay.
gatewayUrl: string
GoPay API gateway base URL.
Common values:
- Sandbox:
https://gw.sandbox.gopay.com/api - Production:
https://gate.gopay.cz/api
/api.
scope?: TokenScope
OAuth scope for access token requests.
TokenScope.ALL(payment-all) — defaultTokenScope.CREATE_PAYMENT(payment-create)
language?: Language
Default SDK language used in request headers and payment defaults.
Default: Language.EN.
timeoutMs?: number
HTTP timeout for each request in milliseconds.
Default: 30000.
customUserAgent?: string
Custom User-Agent header value.
Default: gopay-sdk-ts/1.0.0.
tokenRefreshMarginSeconds?: number
How early token refresh should happen before actual expiry.
Default: 30.
Second argument: options
Validation behavior
The SDK throwsGoPayConfigError when:
clientIdis missingclientSecretis missinggoidis not numericgatewayUrlis empty or invalidtimeoutMs <= 0tokenRefreshMarginSeconds < 0