Config()

Global Config used by Cash Pay Server These are default values that will be used when an invoice is created.

new Config()

Example
// Use a self-hosted server
CashPay.config.options.endpoint = 'https://cash-pay.self-hosted.com'

// Show totals in Australian dollars
CashPay.config.invoice.userCurrency = 'AUD'

// Newly created invoices will use the globals given above
let invoice == CashPay.Invoice(...)

Members

invoice

Default Invoice Properties Default values and valid properties are shown below in the example
Example
{
  network: 'main'
  outputs: [],
  userCurrency: 'USD',
  webhook: {}
}

options

Instance options for Invoice Default values and valid properties are shown below in the example.
Example
{
  endpoint: 'https://v1.pay.infra.cash',
  listen: typeof window !== 'undefined' // false if not in browser
}