open-index/open-npm huggingface dataset:
npm package: @paylike/countries
Description: List of the countries supported by Paylike
Latest version: 5.0.0

# Countries

Countries supported by Paylike. Sorted alphabetically.

Notice that this has nothing to do with accepting cards. Cards from all over
the world are accepted.

You will need a registered company or citizenship from one of these countries:

- Denmark
- Norway
- Sweden

## Usage

Pin the dependency to the current version branch to ensure future installs of
your application will work. Like so:

```json
"dependencies": {
	"@paylike/countries": "*"
}
```

```js
var countries = require('@paylike/countries');

countries;
/*
[
	{ code: 'DK', currency: 'DKK', name: 'Denmark' },
	{ code: 'NO', currency: 'NOK', name: 'Norway' },
	{ code: 'SE', currency: 'SEK', name: 'Sweden' },
]
*/

countries.find(c => c.code === 'DK');
// { code: 'DK', currency: 'DKK', name: 'Denmark' }

```
npm package: @paylike/currencies
Description: List of the currencies supported by Paylike
Latest version: 4.2.0

# Currencies

List of currencies supported by Paylike for transactions and accounts.

Currencies flagged `deprecated` are no longer supported.

Read more:

- https://paylike.io/account/currency
- https://paylike.io/transactions/currencies

## Account currencies

These are the currencies you can use as a base for your account. Also known as
account, settlement and funding currency.

### Global

- EUR (Euro)
- USD (United States dollar)
- GBP (British pound sterling)

### Nordic

- DKK (Danish krone)
- NOK (Norwegian krone)
- SEK (Swedish krona)

### Other EU

- CHF (Swiss franc)
- HUF (Hungarian forint)
- PLN (Polish złoty)
- RON (Romanian leu)
- CZK (Czech koruna)
- BGN (Bulgarian lev)

## Usage

Within the Paylike ecosystem you should use the `code` to refer to a currency.

```js
var currencies = require('@paylike/currencies')

currencies
/*
	[
		{
			code: 'AED',
			currency: 'United Arab Emirates dirham',
			numeric: '784',
			exponent: 2,
		},
		...
		{
			code: 'DKK',
			currency: 'Danish krone',
			numeric: '208',
			exponent: 2,
			funding: true,
		},
		...
	]
	*/

// lookup by code
currencies.byCode('AED')
// { code: 'AED', currency: 'United Arab Emirates dirham', numeric: '784' }

currencies.byCode()
// Map()

// list supported funding currencies
currencies.filter((x) => x.funding).map((x) => x.currency)
/*
	[
		'Bulgarian lev',
		'Swiss franc',
		'Czech koruna',
		'Danish krone',
		'Euro',
		'Pound sterling',
		'Croatian kuna',
		'Hungarian forint',
		'Norwegian krone',
		'Polish złoty',
		'Romanian leu',
		'Swedish krona',
		'United States dollar',
	]
	*/

// Convert between minor and major respecting the exponent
currencies.toMinor('DKK', 100.0)
// 10000

currencies.toMajor('DKK', 10000)
// 100.00
```
npm package: @paylike/descriptor
Description: A small library exposing descriptor validations
Latest version: 1.0.0

# Descriptor

Everything you need to know about the descriptor property in Paylike

- [Install](#install)
- [Use](#use)
- [What is it?](#what-is-it)
- [How is it validated?](#how-is-it-validated)
- [Where is it used in Paylike?](#where-is-it-used-in-paylike)

## Install

```
npm install --save @paylike/descriptor
```

## Use

```js
var descriptor = require('@paylike/descriptor');

descriptor.isValid('paylike.io'); // true
descriptor.isValid('£'); // false

descriptor.errorMessage
descriptor.maxLength
descriptor.regex
```

```js
var descriptor = require('@paylike/descriptor');

var $input = document.querySelector('input.descriptor');

$input.pattern = descriptor.regex.source;
$input.maxLength = descriptor.maxLength;
```

## What is it?

The descriptor is shown on a credit card bill, a bank statement or in an
online banking account as the text accompanying the charged amount.

## How is it validated?

- It can only have a length of 22 or less
- It can only contain ASCII printable characters (see [charaters](#characters)

	```
	a-z
	A-Z
	0-9
	! # $ % &
	( ) * + ,
	- . / : ;
	< = > ? @
	[ ] ^ _ `
	{ | } ~
	```

## Where is it used in Paylike?

A descriptor is set in the following places:

1. On your merchant account
2. On a transaction for the reservation
3. On each capture of a transaction

The descriptor on the account (1) acts as a default if you do not supply a
descriptor for the transaction (2).

If you omit the descriptor for a capture (3) it will default to that on the
transaction (2).

As such, only the merchant account's descriptor is mandatory.