Skip to main content

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.

Payment methods

Use these methods to discover which instruments GoPay exposes for your merchant (goid) and currency before you build checkout UIs or server-side routing.
The SDK exposes two methods for listing enabled payment methods:
  • getPaymentInstruments(goid, currency) - returns methods for a specific currency
  • getPaymentInstrumentsAll(goid) - returns methods across currencies

Per currency

import { Currency, createGoPayClient } from 'gopay-sdk';

const client = createGoPayClient({
  goid: 8123456789,
  clientId: process.env.GOPAY_CLIENT_ID!,
  clientSecret: process.env.GOPAY_CLIENT_SECRET!,
  gatewayUrl: 'https://gw.sandbox.gopay.com/api',
});

const methods = await client.getPaymentInstruments(8123456789, Currency.CZK);

for (const instrument of methods.enabledPaymentInstruments) {
  console.log(instrument.paymentInstrument, instrument.group);
}

All currencies

const methodsAll = await client.getPaymentInstrumentsAll(8123456789);

const list = Array.isArray(methodsAll.enabledPaymentInstruments)
  ? methodsAll.enabledPaymentInstruments
  : Object.values(methodsAll.enabledPaymentInstruments);

for (const item of list) {
  console.log(item.group, item.currencies);
}

Practical use cases

  • Build payment-method chooser UIs tailored to country/currency.
  • Hide unsupported payment instruments before creating payments.
  • Keep customer experience consistent with current merchant capabilities.