Skip to main content

Types and enums

Prefer importing types with import type { … } so they erase at compile time and don’t affect your runtime bundle.
The package exports typed models and constant-based enums to keep your integration compile-time safe.

Importing types

Importing enums

Configuration types

  • CreateGoPayClientConfig
  • GoPayClientOptions
  • GoPayClientConfigInput
  • GoPayClientConfigNormalized

Core payment request types

  • CreatePaymentRequest
  • CreateRecurrenceRequest
  • CaptureAuthorizationPartialRequest
  • RefundPaymentRequest

Core payment response types

  • PaymentResponse
  • PaymentOperationResponse
  • RefundHistoryItem
  • CardDetailsResponse

Statement types

  • AccountStatementRequest
  • AccountStatementResponse

Payment methods types

  • PaymentInstrumentsResponse
  • PaymentInstrumentsAllResponse
  • PaymentMethodGroups

Error types

  • GoPayFieldError
  • GoPayErrorBody
  • GoPayErrorResponse
  • GoPayApiError (class)
  • GoPayConfigError (class)

Token and transport abstractions

  • TokenCache (interface)
  • OAuthToken
  • OAuthTokenResponse
  • HttpTransport
  • HttpTransportRequest
  • HttpMethod
  • ContentType

Main enums and constants

  • Currency
  • Language
  • TokenScope
  • PaymentInstrument
  • PaymentMethodGroup
  • PaymentStatus
  • PaymentSubStatusValues
  • RefundState
  • RecurrenceCycle
  • RecurrenceState
  • PreauthorizationState
  • StatementFormat
  • BankSwiftCode
  • ErrorScope
  • ErrorCodeValues

Practical typing pattern