# stripe-i18n-declined-codes

> translation files for stripe.com errors in JavaScript

Latest version **1.0.0** (published 2018-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install stripe-i18n-declined-codes
pnpm add stripe-i18n-declined-codes
yarn add stripe-i18n-declined-codes
bun add stripe-i18n-declined-codes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-12-27 |
| First published | 2018-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hannes Maack |
| Maintainers | hmaack |
| Keywords | stripe, i18n, declined, translations |

## Links

- npm: https://www.npmjs.com/package/stripe-i18n-declined-codes
- Repository: https://github.com/tevim/stripe-i18n-declined-codes
- Homepage: https://github.com/tevim/stripe-i18n-declined-codes#readme
- Issues: https://github.com/tevim/stripe-i18n-declined-codes/issues
- npm.io page: https://npm.io/package/stripe-i18n-declined-codes

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-12-27

## README

# stripe-i18n-declined-codes
This npm package contains translations for all stripe.com declined codes that the user can fix. Checkout the stripe readme @ https://stripe.com/docs/declines/codes and the wiki @ https://github.com/stripe/stripe-node/wiki/Error-Handling

## Installation
Install the package with:

```bash
$ yarn add stripe-i18n-declined-codes
```

## Usage Example

```js
import Stripe from 'stripe'
import { EN_TRANSLATIONS } from 'stripe-i18n-declined-codes'

const stripe = new Stripe(STRIPE_SECRET_KEY)
stripe.charges.create({
  amount: 995,
  // ...
}).then(
  function (result) {},
  function (err) {
    if(err.type === 'StripeCardError') {
      return EN_TRANSLATIONS[err.code] || ' ... generic payment error occured'
    }
    // ...
  }
)
```

## Supported Languages
This package supports the following languages as exports:

```js
import { DE_TRANSLATIONS } from 'stripe-i18n-declined-codes'
import { EN_TRANSLATIONS } from 'stripe-i18n-declined-codes'
import { ES_TRANSLATIONS } from 'stripe-i18n-declined-codes'
import { FR_TRANSLATIONS } from 'stripe-i18n-declined-codes'
```

## Development

Run all tests:

```bash
$ yarn install
$ yarn test
```

---
_Source: https://npm.io/package/stripe-i18n-declined-codes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
