stripe-decline-codes 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,302 @@
1
+ # stripe-decline-codes
2
+
3
+ > Complete database of Stripe decline codes with descriptions and localized messages
4
+
5
+ [![npm version](https://badge.fury.io/js/stripe-decline-codes.svg)](https://www.npmjs.com/package/stripe-decline-codes)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ A lightweight, zero-dependency TypeScript library providing human-readable descriptions and localized user messages for all Stripe payment decline codes.
9
+
10
+ ## Features
11
+
12
+ - ๐ŸŽฏ **Complete Coverage** - All 44 Stripe decline codes included
13
+ - ๐ŸŒ **Localization** - Built-in English and Japanese translations
14
+ - ๐Ÿ“˜ **TypeScript Support** - Full type definitions included
15
+ - ๐Ÿชถ **Zero Dependencies** - Lightweight and fast
16
+ - ๐Ÿ”„ **Up-to-date** - Based on Stripe API documentation (2024-12-18)
17
+ - โœ… **Well Tested** - Comprehensive test coverage
18
+ - ๐ŸŽจ **Message Formatting** - Customizable message templates with variable substitution
19
+
20
+ ## About This Project
21
+
22
+ This library is a complete TypeScript rewrite and continuation of the original [`stripe-utils`](https://github.com/megumiteam/stripe-utils) package. The project has been:
23
+
24
+ - **Renamed** from `stripe-utils` to `stripe-decline-codes` to better reflect its focused scope
25
+ - **Rewritten** entirely in modern TypeScript with full type safety
26
+ - **Modernized** with current tooling (Vite, Biome, Vitest)
27
+ - **Focused** exclusively on Stripe decline code handling (subscription utilities removed)
28
+ - **Updated** with the latest Stripe decline codes (2024-12-18)
29
+
30
+ Credit to the original [stripe-utils project](https://github.com/megumiteam/stripe-utils) for the initial implementation.
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ npm install stripe-decline-codes
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### Basic Usage
41
+
42
+ ```typescript
43
+ import { getDeclineDescription } from 'stripe-decline-codes';
44
+
45
+ const result = getDeclineDescription('insufficient_funds');
46
+
47
+ console.log(result.code.description);
48
+ // => "The card has insufficient funds to complete the purchase."
49
+
50
+ console.log(result.code.nextUserAction);
51
+ // => "Please try again using an alternative payment method."
52
+
53
+ console.log(result.docVersion);
54
+ // => "2024-12-18"
55
+ ```
56
+
57
+ ### Localized Messages
58
+
59
+ Get user-facing messages in different languages:
60
+
61
+ ```typescript
62
+ import { getDeclineMessage } from 'stripe-decline-codes';
63
+
64
+ // English (default)
65
+ const enMessage = getDeclineMessage('insufficient_funds');
66
+ console.log(enMessage);
67
+ // => "Please try again using an alternative payment method."
68
+
69
+ // Japanese
70
+ const jaMessage = getDeclineMessage('insufficient_funds', 'ja');
71
+ console.log(jaMessage);
72
+ // => "ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"
73
+ ```
74
+
75
+ ### Validate Decline Codes
76
+
77
+ ```typescript
78
+ import { isValidDeclineCode } from 'stripe-decline-codes';
79
+
80
+ isValidDeclineCode('insufficient_funds'); // => true
81
+ isValidDeclineCode('invalid_code'); // => false
82
+ ```
83
+
84
+ ### Get All Decline Codes
85
+
86
+ ```typescript
87
+ import { getAllDeclineCodes } from 'stripe-decline-codes';
88
+
89
+ const codes = getAllDeclineCodes();
90
+ console.log(codes.length); // => 44
91
+ console.log(codes);
92
+ // => ['approve_with_id', 'call_issuer', 'card_not_supported', ...]
93
+ ```
94
+
95
+ ### With Stripe SDK
96
+
97
+ Perfect for error handling in your Stripe integration:
98
+
99
+ ```typescript
100
+ import Stripe from 'stripe';
101
+ import { getDeclineMessage } from 'stripe-decline-codes';
102
+
103
+ const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
104
+
105
+ try {
106
+ const charge = await stripe.charges.create({
107
+ amount: 2000,
108
+ currency: 'usd',
109
+ source: 'tok_chargeDeclined',
110
+ });
111
+ } catch (error) {
112
+ if (error.type === 'StripeCardError') {
113
+ const declineCode = error.decline_code;
114
+ const userMessage = getDeclineMessage(declineCode, 'en');
115
+ console.log(userMessage);
116
+ // Display this message to your user
117
+ }
118
+ }
119
+ ```
120
+
121
+ ## API Reference
122
+
123
+ ### Core Functions
124
+
125
+ #### `getDeclineDescription(declineCode?: string): DeclineCodeResult`
126
+
127
+ Returns detailed information about a decline code.
128
+
129
+ **Returns:**
130
+ ```typescript
131
+ {
132
+ docVersion: string;
133
+ code: {
134
+ description: string;
135
+ nextSteps: string;
136
+ nextUserAction: string;
137
+ translations?: {
138
+ ja?: {
139
+ description: string;
140
+ nextUserAction: string;
141
+ };
142
+ };
143
+ } | {};
144
+ }
145
+ ```
146
+
147
+ #### `getDeclineMessage(declineCode: string, locale?: Locale): string | undefined`
148
+
149
+ Returns a localized user-facing message for a decline code.
150
+
151
+ **Parameters:**
152
+ - `declineCode` - The Stripe decline code
153
+ - `locale` - The locale to use (`'en'` or `'ja'`, default: `'en'`)
154
+
155
+ #### `getAllDeclineCodes(): DeclineCode[]`
156
+
157
+ Returns an array of all supported decline code strings.
158
+
159
+ #### `isValidDeclineCode(code: string): code is DeclineCode`
160
+
161
+ Type guard to check if a string is a valid decline code.
162
+
163
+ #### `getDocVersion(): string`
164
+
165
+ Returns the Stripe API documentation version that this library is based on.
166
+
167
+ ### Message Formatting
168
+
169
+ #### `formatDeclineMessage(declineCode: string, locale?: Locale, variables?: Record<string, string>): string | undefined`
170
+
171
+ Returns a formatted message with optional variable substitution.
172
+
173
+ **Example:**
174
+ ```typescript
175
+ import { formatDeclineMessage } from 'stripe-decline-codes';
176
+
177
+ const message = formatDeclineMessage('insufficient_funds', 'en', {
178
+ merchantName: 'Acme Store',
179
+ supportEmail: 'support@acme.com'
180
+ });
181
+ ```
182
+
183
+ ## Supported Decline Codes
184
+
185
+ This library includes all 44 Stripe decline codes:
186
+
187
+ - `approve_with_id` - Payment cannot be authorized
188
+ - `call_issuer` - Card declined for unknown reason
189
+ - `card_not_supported` - Card doesn't support this purchase type
190
+ - `card_velocity_exceeded` - Balance or credit limit exceeded
191
+ - `currency_not_supported` - Card doesn't support the currency
192
+ - `do_not_honor` - Card declined for unknown reason
193
+ - `do_not_try_again` - Card declined for unknown reason
194
+ - `duplicate_transaction` - Identical transaction submitted recently
195
+ - `expired_card` - Card has expired
196
+ - `fraudulent` - Payment suspected to be fraudulent
197
+ - `generic_decline` - Card declined for unknown reason
198
+ - `incorrect_number` - Card number is incorrect
199
+ - `incorrect_cvc` - CVC number is incorrect
200
+ - `incorrect_pin` - PIN is incorrect
201
+ - `incorrect_zip` - ZIP/postal code is incorrect
202
+ - `insufficient_funds` - Insufficient funds
203
+ - `invalid_account` - Card or account is invalid
204
+ - `invalid_amount` - Payment amount is invalid or too large
205
+ - `invalid_cvc` - CVC number is incorrect
206
+ - `invalid_expiry_year` - Expiration year is invalid
207
+ - `invalid_number` - Card number is incorrect
208
+ - `invalid_pin` - PIN is incorrect
209
+ - `issuer_not_available` - Card issuer could not be reached
210
+ - `lost_card` - Card reported lost
211
+ - `merchant_blacklist` - Payment matches merchant blocklist
212
+ - `new_account_information_available` - Card or account is invalid
213
+ - `no_action_taken` - Card declined for unknown reason
214
+ - `not_permitted` - Payment is not permitted
215
+ - `pickup_card` - Card cannot be used for this payment
216
+ - `pin_try_exceeded` - PIN attempts exceeded
217
+ - `processing_error` - Error processing the card
218
+ - `reenter_transaction` - Payment could not be processed
219
+ - `restricted_card` - Card cannot be used for this payment
220
+ - `revocation_of_all_authorizations` - Card declined
221
+ - `revocation_of_authorization` - Card declined
222
+ - `security_violation` - Card declined
223
+ - `service_not_allowed` - Card declined
224
+ - `stolen_card` - Card reported stolen
225
+ - `stop_payment_order` - Card declined
226
+ - `testmode_decline` - Stripe test card used
227
+ - `transaction_not_allowed` - Card declined
228
+ - `try_again_later` - Card declined, try again later
229
+ - `withdrawal_count_limit_exceeded` - Credit limit exceeded
230
+
231
+ ## TypeScript
232
+
233
+ This library is written in TypeScript and includes full type definitions:
234
+
235
+ ```typescript
236
+ import type {
237
+ DeclineCode,
238
+ DeclineCodeInfo,
239
+ DeclineCodeResult,
240
+ Locale,
241
+ Translation,
242
+ } from 'stripe-decline-codes';
243
+ ```
244
+
245
+ ## Development
246
+
247
+ ```bash
248
+ # Install dependencies
249
+ npm install
250
+
251
+ # Run tests
252
+ npm test
253
+
254
+ # Run tests in watch mode
255
+ npm run test:watch
256
+
257
+ # Build
258
+ npm run build
259
+
260
+ # Lint
261
+ npm run lint
262
+
263
+ # Format code
264
+ npm run format
265
+
266
+ # Type check
267
+ npm run typecheck
268
+ ```
269
+
270
+ ## Publishing
271
+
272
+ This package uses [`np`](https://github.com/sindresorhus/np) for releases:
273
+
274
+ ```bash
275
+ npm run release
276
+ ```
277
+
278
+ ## Contributing
279
+
280
+ Contributions are welcome! Please feel free to submit a Pull Request.
281
+
282
+ ## License
283
+
284
+ MIT ยฉ [Hidetaka Okamoto](https://wp-kyoto.net)
285
+
286
+ ## Related
287
+
288
+ - [Stripe API Documentation](https://docs.stripe.com/declines/codes)
289
+ - [Stripe Node.js Library](https://github.com/stripe/stripe-node)
290
+
291
+ ## Changelog
292
+
293
+ ### 0.1.0
294
+
295
+ - Forked and renewed from [stripe-utils](https://github.com/megumiteam/stripe-utils)
296
+ - Complete rewrite in TypeScript
297
+ - Modern build system with Vite + Biome
298
+ - Added comprehensive type definitions
299
+ - Updated to latest Stripe decline codes (2024-12-18)
300
+ - Zero dependencies
301
+ - Enhanced API with new utility functions
302
+ - Improved documentation
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="2024-12-18",r={approve_with_id:{description:"The payment cannot be authorized.",nextSteps:"The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",nextUserAction:"Please try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ๆ”ฏๆ‰•ใ„ใฏๆ‰ฟ่ชใงใใพใ›ใ‚“ใ€‚",nextUserAction:"ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},call_issuer:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},card_not_supported:{description:"The card does not support this type of purchase.",nextSteps:"The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.",nextUserAction:"Your card issuer may not support this type of purchase, please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ›ใ‚“ใ€‚",nextUserAction:"ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚่ฉณ็ดฐใซใคใ„ใฆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},card_velocity_exceeded:{description:"The customer has exceeded the balance or credit limit available on their card.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},currency_not_supported:{description:"The card does not support the specified currency.",nextSteps:"The customer needs to check with the issuer whether the card can be used for the type of currency specified.",nextUserAction:"Please contact your card issuer to verify this type of currency can be used for this payment.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆŒ‡ๅฎšใ•ใ‚ŒใŸ้€š่ฒจใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ›ใ‚“ใ€‚",nextUserAction:"ใ“ใฎๆ”ฏๆ‰•ใ„ใซใ“ใฎใ‚ฟใ‚คใƒ—ใฎ้€š่ฒจใŒไฝฟ็”จใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ™ใ‚‹ใซใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซ้€ฃ็ตกใ—ใฆใใ ใ•ใ„ใ€‚"}}},do_not_honor:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},do_not_try_again:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},duplicate_transaction:{description:"A transaction with identical amount and credit card information was submitted very recently.",nextSteps:"Check to see if a recent payment already exists.",nextUserAction:"Check to see if a recent payment already exists.",translations:{ja:{description:"ใ”ใๆœ€่ฟ‘ใ€ๅŒไธ€ใฎ้‡‘้กใจใ‚ฏใƒฌใ‚ธใƒƒใƒˆใ‚ซใƒผใƒ‰ๆƒ…ๅ ฑใ‚’ไฝฟ็”จใ—ใŸๅ–ๅผ•ใŒ้€ไฟกใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"ๆœ€่ฟ‘ใฎๆ”ฏๆ‰•ใ„ใŒๆ—ขใซๅญ˜ๅœจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚"}}},expired_card:{description:"The card has expired.",nextSteps:"The customer should use another card.",nextUserAction:"Please use another card.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœŸ้™ๅˆ‡ใ‚Œใงใ™ใ€‚",nextUserAction:"ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚"}}},fraudulent:{description:"The payment has been declined as Stripe suspects it is fraudulent.",nextSteps:"Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ไธๆญฃใจๆ€ใ‚ใ‚Œใ‚‹ใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใฏๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},generic_decline:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},incorrect_number:{description:"The card number is incorrect.",nextSteps:"The customer should try again using the correct card number.",nextUserAction:"Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"ใ‚ซใƒผใƒ‰็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},incorrect_cvc:{description:"The CVC number is incorrect.",nextSteps:"The customer should try again using the correct CVC.",nextUserAction:"Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"CSC็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},incorrect_pin:{description:"The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",nextSteps:"The customer should try again using the correct PIN.",nextUserAction:"Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"PINใ‚ณใƒผใƒ‰ใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},incorrect_zip:{description:"The ZIP/postal code is incorrect.",nextSteps:"The customer should try again using the correct billing ZIP/postal code.",nextUserAction:"Please try again using the correct ZIP/postal code.",translations:{ja:{description:"้ƒตไพฟ็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"ๆญฃใ—ใ„้ƒตไพฟ็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"}}},insufficient_funds:{description:"The card has insufficient funds to complete the purchase.",nextSteps:"The customer should use an alternative payment method.",nextUserAction:"Please try again using an alternative payment method.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฎ่ณผๅ…ฅใซๅฟ…่ฆใช่ณ‡้‡‘ใŒไธ่ถณใ—ใฆใ„ใพใ™ใ€‚",nextUserAction:"ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"}}},invalid_account:{description:"The card, or account the card is connected to, is invalid.",nextSteps:"The customer needs to contact their card issuer to check that the card is working correctly.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},invalid_amount:{description:"The payment amount is invalid, or exceeds the amount that is allowed.",nextSteps:"If the amount appears to be correct, the customer needs to check with their card issuer that they can make purchases of that amount.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ๆ”ฏๆ‰•ใ„้‡‘้กใŒ็„กๅŠนใงใ‚ใ‚‹ใ‹ใ€่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹้‡‘้กใ‚’่ถ…ใˆใฆใ„ใพใ™ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},invalid_cvc:{description:"The CVC number is incorrect.",nextSteps:"The customer should try again using the correct CVC.",nextUserAction:"Please try again using the correct CVC.",translations:{ja:{description:"CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"ๆญฃใ—ใ„CVCใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"}}},invalid_expiry_year:{description:"The expiration year invalid.",nextSteps:"The customer should try again using the correct expiration date.",nextUserAction:"Please try again using the correct expiration date.",translations:{ja:{description:"ๆœ‰ๅŠนๆœŸ้™ใŒ็„กๅŠนใงใ™ใ€‚",nextUserAction:"ๆญฃใ—ใ„ๆœ‰ๅŠนๆœŸ้™ใ‚’ๅ…ฅๅŠ›ใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"}}},invalid_number:{description:"The card number is incorrect.",nextSteps:"The customer should try again using the correct card number.",nextUserAction:"Please try again using the correct card number.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"ๆญฃใ—ใ„ใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"}}},invalid_pin:{description:"The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",nextSteps:"The customer should try again using the correct PIN.",nextUserAction:"Please try again using the correct card PIN.",translations:{ja:{description:"PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",nextUserAction:"ๆญฃใ—ใ„PINใ‚ณใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"}}},issuer_not_available:{description:"The card issuer could not be reached, so the payment could not be authorized.",nextSteps:"The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",nextUserAction:"Please try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใซ้€ฃ็ตกใงใใชใ‹ใฃใŸใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใ‚’ๆ‰ฟ่ชใงใใพใ›ใ‚“ใงใ—ใŸใ€‚",nextUserAction:"ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},lost_card:{description:"The payment has been declined because the card is reported lost.",nextSteps:"The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},merchant_blacklist:{description:"The payment has been declined because it matches a value on the Stripe user's blocklist.",nextSteps:"Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},new_account_information_available:{description:"The card, or account the card is connected to, is invalid.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},no_action_taken:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},not_permitted:{description:"The payment is not permitted.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ๆ”ฏๆ‰•ใ„ใฏ่จฑๅฏใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},pickup_card:{description:"The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},pin_try_exceeded:{description:"The allowable number of PIN tries has been exceeded.",nextSteps:"The customer must use another card or method of payment.",nextUserAction:"Please use another card or method of payment.",translations:{ja:{description:"PIN่ฉฆ่กŒๅ›žๆ•ฐใฎไธŠ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",nextUserAction:"ๅˆฅใฎใ‚ซใƒผใƒ‰ใพใŸใฏใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ใ”ๅˆฉ็”จใใ ใ•ใ„ใ€‚"}}},processing_error:{description:"An error occurred while processing the card.",nextSteps:"The payment should be attempted again. If it still cannot be processed, try again later.",nextUserAction:"Please try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฎๅ‡ฆ็†ไธญใซใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใพใ—ใŸใ€‚",nextUserAction:"ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},reenter_transaction:{description:"The payment could not be processed by the issuer for an unknown reason.",nextSteps:"The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",nextUserAction:"Please try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ๅŽŸๅ› ไธๆ˜ŽใฎใŸใ‚ใ€็™บ่กŒ่€…ใŒๆ”ฏๆ‰•ใ„ใ‚’ๅ‡ฆ็†ใงใใพใ›ใ‚“ใงใ—ใŸใ€‚",nextUserAction:"ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},restricted_card:{description:"The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},revocation_of_all_authorizations:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},revocation_of_authorization:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},security_violation:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},service_not_allowed:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},stolen_card:{description:"The payment has been declined because the card is reported stolen.",nextSteps:"The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},stop_payment_order:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer should contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},testmode_decline:{description:"A Stripe test card number was used.",nextSteps:"A genuine card must be used to make a payment.",nextUserAction:"A genuine card must be used to make a payment.",translations:{ja:{description:"Stripeใƒ†ใ‚นใƒˆใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚",nextUserAction:"ๆ”ฏๆ‰•ใ„ใซใฏๆœฌ็‰ฉใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚"}}},transaction_not_allowed:{description:"The card has been declined for an unknown reason.",nextSteps:"The customer needs to contact their card issuer for more information.",nextUserAction:"Please contact your card issuer for more information.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},try_again_later:{description:"The card has been declined for an unknown reason.",nextSteps:"Ask the customer to attempt the payment again. If subsequent payments are declined, the customer should contact their card issuer for more information.",nextUserAction:"Please try again. If it still cannot be processed, the please contact your card issuer.",translations:{ja:{description:"ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",nextUserAction:"ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}},withdrawal_count_limit_exceeded:{description:"The customer has exceeded the balance or credit limit available on their card.",nextSteps:"The customer should use an alternative payment method.",nextUserAction:"Please use another card or contact your card issuer for more information.",translations:{ja:{description:"ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",nextUserAction:"ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใ‹ใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"}}}};function p(e){if(!e||!a(e))return{docVersion:o,code:{}};const t=r[e];return{docVersion:o,code:t}}function c(e,t="en"){if(!a(e))return;const n=r[e];return t==="en"?n.nextUserAction:n.translations?.[t]?.nextUserAction}function h(){return Object.keys(r)}function a(e){return e in r}function m(){return o}function f(e,t="en",n){const s=c(e,t);if(!s)return;if(!n)return s;let i=s;for(const[d,u]of Object.entries(n)){const l=new RegExp(`\\{\\{${d}\\}\\}`,"g");i=i.replace(l,u)}return i}exports.DECLINE_CODES=r;exports.DOC_VERSION=o;exports.formatDeclineMessage=f;exports.getAllDeclineCodes=h;exports.getDeclineDescription=p;exports.getDeclineMessage=c;exports.getDocVersion=m;exports.isValidDeclineCode=a;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/data/decline-codes.ts","../src/index.ts"],"sourcesContent":["import type { DeclineCode, DeclineCodeInfo } from '../types';\n\n/**\n * Stripe API documentation version for decline codes\n * Last updated: 2024-12\n * Reference: https://docs.stripe.com/declines/codes\n */\nexport const DOC_VERSION = '2024-12-18';\n\n/**\n * Complete database of Stripe decline codes with descriptions and recommended actions\n * Includes English and Japanese translations\n */\nexport const DECLINE_CODES: Record<DeclineCode, DeclineCodeInfo> = {\n approve_with_id: {\n description: 'The payment cannot be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„ใฏๆ‰ฟ่ชใงใใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n call_issuer: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n card_not_supported: {\n description: 'The card does not support this type of purchase.',\n nextSteps:\n 'The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.',\n nextUserAction:\n 'Your card issuer may not support this type of purchase, please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚่ฉณ็ดฐใซใคใ„ใฆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n card_velocity_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n currency_not_supported: {\n description: 'The card does not support the specified currency.',\n nextSteps:\n 'The customer needs to check with the issuer whether the card can be used for the type of currency specified.',\n nextUserAction:\n 'Please contact your card issuer to verify this type of currency can be used for this payment.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆŒ‡ๅฎšใ•ใ‚ŒใŸ้€š่ฒจใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ“ใฎๆ”ฏๆ‰•ใ„ใซใ“ใฎใ‚ฟใ‚คใƒ—ใฎ้€š่ฒจใŒไฝฟ็”จใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ™ใ‚‹ใซใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซ้€ฃ็ตกใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n do_not_honor: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n do_not_try_again: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n duplicate_transaction: {\n description:\n 'A transaction with identical amount and credit card information was submitted very recently.',\n nextSteps: 'Check to see if a recent payment already exists.',\n nextUserAction: 'Check to see if a recent payment already exists.',\n translations: {\n ja: {\n description: 'ใ”ใๆœ€่ฟ‘ใ€ๅŒไธ€ใฎ้‡‘้กใจใ‚ฏใƒฌใ‚ธใƒƒใƒˆใ‚ซใƒผใƒ‰ๆƒ…ๅ ฑใ‚’ไฝฟ็”จใ—ใŸๅ–ๅผ•ใŒ้€ไฟกใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: 'ๆœ€่ฟ‘ใฎๆ”ฏๆ‰•ใ„ใŒๆ—ขใซๅญ˜ๅœจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n expired_card: {\n description: 'The card has expired.',\n nextSteps: 'The customer should use another card.',\n nextUserAction: 'Please use another card.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœŸ้™ๅˆ‡ใ‚Œใงใ™ใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n fraudulent: {\n description: 'The payment has been declined as Stripe suspects it is fraudulent.',\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ไธๆญฃใจๆ€ใ‚ใ‚Œใ‚‹ใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใฏๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n generic_decline: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚ซใƒผใƒ‰็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'CSC็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction:\n 'Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'PINใ‚ณใƒผใƒ‰ใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_zip: {\n description: 'The ZIP/postal code is incorrect.',\n nextSteps: 'The customer should try again using the correct billing ZIP/postal code.',\n nextUserAction: 'Please try again using the correct ZIP/postal code.',\n translations: {\n ja: {\n description: '้ƒตไพฟ็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„้ƒตไพฟ็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n insufficient_funds: {\n description: 'The card has insufficient funds to complete the purchase.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please try again using an alternative payment method.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฎ่ณผๅ…ฅใซๅฟ…่ฆใช่ณ‡้‡‘ใŒไธ่ถณใ—ใฆใ„ใพใ™ใ€‚',\n nextUserAction: 'ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_account: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps:\n 'The customer needs to contact their card issuer to check that the card is working correctly.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_amount: {\n description: 'The payment amount is invalid, or exceeds the amount that is allowed.',\n nextSteps:\n 'If the amount appears to be correct, the customer needs to check with their card issuer that they can make purchases of that amount.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„้‡‘้กใŒ็„กๅŠนใงใ‚ใ‚‹ใ‹ใ€่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹้‡‘้กใ‚’่ถ…ใˆใฆใ„ใพใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction: 'Please try again using the correct CVC.',\n translations: {\n ja: {\n description: 'CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„CVCใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_expiry_year: {\n description: 'The expiration year invalid.',\n nextSteps: 'The customer should try again using the correct expiration date.',\n nextUserAction: 'Please try again using the correct expiration date.',\n translations: {\n ja: {\n description: 'ๆœ‰ๅŠนๆœŸ้™ใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„ๆœ‰ๅŠนๆœŸ้™ใ‚’ๅ…ฅๅŠ›ใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction: 'Please try again using the correct card number.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„ใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction: 'Please try again using the correct card PIN.',\n translations: {\n ja: {\n description: 'PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„PINใ‚ณใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n issuer_not_available: {\n description: 'The card issuer could not be reached, so the payment could not be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใซ้€ฃ็ตกใงใใชใ‹ใฃใŸใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใ‚’ๆ‰ฟ่ชใงใใพใ›ใ‚“ใงใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n lost_card: {\n description: 'The payment has been declined because the card is reported lost.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n merchant_blacklist: {\n description:\n \"The payment has been declined because it matches a value on the Stripe user's blocklist.\",\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n new_account_information_available: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n no_action_taken: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n not_permitted: {\n description: 'The payment is not permitted.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„ใฏ่จฑๅฏใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n pickup_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n pin_try_exceeded: {\n description: 'The allowable number of PIN tries has been exceeded.',\n nextSteps: 'The customer must use another card or method of payment.',\n nextUserAction: 'Please use another card or method of payment.',\n translations: {\n ja: {\n description: 'PIN่ฉฆ่กŒๅ›žๆ•ฐใฎไธŠ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใพใŸใฏใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ใ”ๅˆฉ็”จใใ ใ•ใ„ใ€‚',\n },\n },\n },\n processing_error: {\n description: 'An error occurred while processing the card.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, try again later.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฎๅ‡ฆ็†ไธญใซใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใพใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n reenter_transaction: {\n description: 'The payment could not be processed by the issuer for an unknown reason.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ๅŽŸๅ› ไธๆ˜ŽใฎใŸใ‚ใ€็™บ่กŒ่€…ใŒๆ”ฏๆ‰•ใ„ใ‚’ๅ‡ฆ็†ใงใใพใ›ใ‚“ใงใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n restricted_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n revocation_of_all_authorizations: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n revocation_of_authorization: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n security_violation: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n service_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n stolen_card: {\n description: 'The payment has been declined because the card is reported stolen.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n stop_payment_order: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n testmode_decline: {\n description: 'A Stripe test card number was used.',\n nextSteps: 'A genuine card must be used to make a payment.',\n nextUserAction: 'A genuine card must be used to make a payment.',\n translations: {\n ja: {\n description: 'Stripeใƒ†ใ‚นใƒˆใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚',\n nextUserAction: 'ๆ”ฏๆ‰•ใ„ใซใฏๆœฌ็‰ฉใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚',\n },\n },\n },\n transaction_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n try_again_later: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps:\n 'Ask the customer to attempt the payment again. If subsequent payments are declined, the customer should contact their card issuer for more information.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n withdrawal_count_limit_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please use another card or contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใ‹ใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n};\n","import { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\nimport type { DeclineCode, DeclineCodeResult, Locale } from './types';\n\n/**\n * Get decline code information with description and recommended actions\n *\n * @param declineCode - The Stripe decline code to look up\n * @returns Object containing the decline code information and documentation version\n *\n * @example\n * ```ts\n * const result = getDeclineDescription('insufficient_funds');\n * console.log(result.code.description);\n * // => \"The card has insufficient funds to complete the purchase.\"\n * console.log(result.code.nextUserAction);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function getDeclineDescription(declineCode?: string): DeclineCodeResult {\n if (!declineCode || !isValidDeclineCode(declineCode)) {\n return {\n docVersion: DOC_VERSION,\n code: {},\n };\n }\n\n const code = DECLINE_CODES[declineCode];\n return {\n docVersion: DOC_VERSION,\n code,\n };\n}\n\n/**\n * Get localized decline code message for end users\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @returns User-facing message in the specified locale, or undefined if not found\n *\n * @example\n * ```ts\n * const message = getDeclineMessage('insufficient_funds', 'ja');\n * console.log(message);\n * // => \"ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚\"\n * ```\n */\nexport function getDeclineMessage(declineCode: string, locale: Locale = 'en'): string | undefined {\n if (!isValidDeclineCode(declineCode)) {\n return undefined;\n }\n\n const codeInfo = DECLINE_CODES[declineCode];\n\n if (locale === 'en') {\n return codeInfo.nextUserAction;\n }\n\n return codeInfo.translations?.[locale]?.nextUserAction;\n}\n\n/**\n * Get all available decline codes\n *\n * @returns Array of all supported decline code strings\n *\n * @example\n * ```ts\n * const codes = getAllDeclineCodes();\n * console.log(codes.length); // => 44\n * console.log(codes.includes('insufficient_funds')); // => true\n * ```\n */\nexport function getAllDeclineCodes(): DeclineCode[] {\n return Object.keys(DECLINE_CODES) as DeclineCode[];\n}\n\n/**\n * Check if a decline code is valid\n *\n * @param code - The code to validate\n * @returns True if the code exists in the database\n *\n * @example\n * ```ts\n * isValidDeclineCode('insufficient_funds'); // => true\n * isValidDeclineCode('invalid_code'); // => false\n * ```\n */\nexport function isValidDeclineCode(code: string): code is DeclineCode {\n return code in DECLINE_CODES;\n}\n\n/**\n * Get the documentation version for the decline codes data\n *\n * @returns The Stripe API documentation version string\n *\n * @example\n * ```ts\n * const version = getDocVersion();\n * console.log(version); // => \"2024-12-18\"\n * ```\n */\nexport function getDocVersion(): string {\n return DOC_VERSION;\n}\n\n/**\n * Format a decline message with custom template variables\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @param variables - Optional variables to replace in the message template\n * @returns Formatted user-facing message with variables replaced\n *\n * @example\n * ```ts\n * const message = formatDeclineMessage('insufficient_funds', 'en', {\n * merchantName: 'Acme Store',\n * supportEmail: 'support@acme.com'\n * });\n * console.log(message);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function formatDeclineMessage(\n declineCode: string,\n locale: Locale = 'en',\n variables?: Record<string, string>,\n): string | undefined {\n const baseMessage = getDeclineMessage(declineCode, locale);\n\n if (!baseMessage) {\n return undefined;\n }\n\n if (!variables) {\n return baseMessage;\n }\n\n // Replace variables in the format {{variableName}}\n let formattedMessage = baseMessage;\n for (const [key, value] of Object.entries(variables)) {\n const placeholder = new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, 'g');\n formattedMessage = formattedMessage.replace(placeholder, value);\n }\n\n return formattedMessage;\n}\n\n// Export data for advanced use cases\nexport { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\n// Export types\nexport type {\n DeclineCode,\n DeclineCodeInfo,\n DeclineCodeResult,\n Locale,\n Translation,\n} from './types';\n"],"names":["DOC_VERSION","DECLINE_CODES","getDeclineDescription","declineCode","isValidDeclineCode","code","getDeclineMessage","locale","codeInfo","getAllDeclineCodes","getDocVersion","formatDeclineMessage","variables","baseMessage","formattedMessage","key","value","placeholder"],"mappings":"gFAOO,MAAMA,EAAc,aAMdC,EAAsD,CACjE,gBAAiB,CACf,YAAa,oCACb,UACE,2HACF,eACE,0FACF,aAAc,CACZ,GAAI,CACF,YAAa,eACb,eACE,iDAAA,CACJ,CACF,EAEF,YAAa,CACX,YAAa,oDACb,UAAW,wEACX,eAAgB,wDAChB,aAAc,CACZ,GAAI,CACF,YAAa,qBACb,eAAgB,yBAAA,CAClB,CACF,EAEF,mBAAoB,CAClB,YAAa,mDACb,UACE,qHACF,eACE,gHACF,aAAc,CACZ,GAAI,CACF,YAAa,yBACb,eACE,+DAAA,CACJ,CACF,EAEF,uBAAwB,CACtB,YAAa,iFACb,UAAW,sEACX,eAAgB,wDAChB,aAAc,CACZ,GAAI,CACF,YAAa,4BACb,eAAgB,yBAAA,CAClB,CACF,EAEF,uBAAwB,CACtB,YAAa,oDACb,UACE,+GACF,eACE,gGACF,aAAc,CACZ,GAAI,CACF,YAAa,0BAC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,OAAOA,KAAQJ,CACjB,CAaO,SAASS,GAAwB,CACtC,OAAOV,CACT,CAoBO,SAASW,EACdR,EACAI,EAAiB,KACjBK,EACoB,CACpB,MAAMC,EAAcP,EAAkBH,EAAaI,CAAM,EAEzD,GAAI,CAACM,EACH,OAGF,GAAI,CAACD,EACH,OAAOC,EAIT,IAAIC,EAAmBD,EACvB,SAAW,CAACE,EAAKC,CAAK,IAAK,OAAO,QAAQJ,CAAS,EAAG,CACpD,MAAMK,EAAc,IAAI,OAAO,SAASF,CAAG,SAAU,GAAG,EACxDD,EAAmBA,EAAiB,QAAQG,EAAaD,CAAK,CAChE,CAEA,OAAOF,CACT"}
@@ -0,0 +1,526 @@
1
+ const i = "2024-12-18", r = {
2
+ approve_with_id: {
3
+ description: "The payment cannot be authorized.",
4
+ nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
5
+ nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
6
+ translations: {
7
+ ja: {
8
+ description: "ๆ”ฏๆ‰•ใ„ใฏๆ‰ฟ่ชใงใใพใ›ใ‚“ใ€‚",
9
+ nextUserAction: "ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
10
+ }
11
+ }
12
+ },
13
+ call_issuer: {
14
+ description: "The card has been declined for an unknown reason.",
15
+ nextSteps: "The customer needs to contact their card issuer for more information.",
16
+ nextUserAction: "Please contact your card issuer for more information.",
17
+ translations: {
18
+ ja: {
19
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
20
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
21
+ }
22
+ }
23
+ },
24
+ card_not_supported: {
25
+ description: "The card does not support this type of purchase.",
26
+ nextSteps: "The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.",
27
+ nextUserAction: "Your card issuer may not support this type of purchase, please contact your card issuer for more information.",
28
+ translations: {
29
+ ja: {
30
+ description: "ใ‚ซใƒผใƒ‰ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ›ใ‚“ใ€‚",
31
+ nextUserAction: "ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚่ฉณ็ดฐใซใคใ„ใฆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
32
+ }
33
+ }
34
+ },
35
+ card_velocity_exceeded: {
36
+ description: "The customer has exceeded the balance or credit limit available on their card.",
37
+ nextSteps: "The customer should contact their card issuer for more information.",
38
+ nextUserAction: "Please contact your card issuer for more information.",
39
+ translations: {
40
+ ja: {
41
+ description: "ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",
42
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
43
+ }
44
+ }
45
+ },
46
+ currency_not_supported: {
47
+ description: "The card does not support the specified currency.",
48
+ nextSteps: "The customer needs to check with the issuer whether the card can be used for the type of currency specified.",
49
+ nextUserAction: "Please contact your card issuer to verify this type of currency can be used for this payment.",
50
+ translations: {
51
+ ja: {
52
+ description: "ใ‚ซใƒผใƒ‰ใฏๆŒ‡ๅฎšใ•ใ‚ŒใŸ้€š่ฒจใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ›ใ‚“ใ€‚",
53
+ nextUserAction: "ใ“ใฎๆ”ฏๆ‰•ใ„ใซใ“ใฎใ‚ฟใ‚คใƒ—ใฎ้€š่ฒจใŒไฝฟ็”จใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ™ใ‚‹ใซใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซ้€ฃ็ตกใ—ใฆใใ ใ•ใ„ใ€‚"
54
+ }
55
+ }
56
+ },
57
+ do_not_honor: {
58
+ description: "The card has been declined for an unknown reason.",
59
+ nextSteps: "The customer needs to contact their card issuer for more information.",
60
+ nextUserAction: "Please contact your card issuer for more information.",
61
+ translations: {
62
+ ja: {
63
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
64
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
65
+ }
66
+ }
67
+ },
68
+ do_not_try_again: {
69
+ description: "The card has been declined for an unknown reason.",
70
+ nextSteps: "The customer should contact their card issuer for more information.",
71
+ nextUserAction: "Please contact your card issuer for more information.",
72
+ translations: {
73
+ ja: {
74
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
75
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
76
+ }
77
+ }
78
+ },
79
+ duplicate_transaction: {
80
+ description: "A transaction with identical amount and credit card information was submitted very recently.",
81
+ nextSteps: "Check to see if a recent payment already exists.",
82
+ nextUserAction: "Check to see if a recent payment already exists.",
83
+ translations: {
84
+ ja: {
85
+ description: "ใ”ใๆœ€่ฟ‘ใ€ๅŒไธ€ใฎ้‡‘้กใจใ‚ฏใƒฌใ‚ธใƒƒใƒˆใ‚ซใƒผใƒ‰ๆƒ…ๅ ฑใ‚’ไฝฟ็”จใ—ใŸๅ–ๅผ•ใŒ้€ไฟกใ•ใ‚Œใพใ—ใŸใ€‚",
86
+ nextUserAction: "ๆœ€่ฟ‘ใฎๆ”ฏๆ‰•ใ„ใŒๆ—ขใซๅญ˜ๅœจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚"
87
+ }
88
+ }
89
+ },
90
+ expired_card: {
91
+ description: "The card has expired.",
92
+ nextSteps: "The customer should use another card.",
93
+ nextUserAction: "Please use another card.",
94
+ translations: {
95
+ ja: {
96
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœŸ้™ๅˆ‡ใ‚Œใงใ™ใ€‚",
97
+ nextUserAction: "ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚"
98
+ }
99
+ }
100
+ },
101
+ fraudulent: {
102
+ description: "The payment has been declined as Stripe suspects it is fraudulent.",
103
+ nextSteps: "Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.",
104
+ nextUserAction: "Please contact your card issuer for more information.",
105
+ translations: {
106
+ ja: {
107
+ description: "ไธๆญฃใจๆ€ใ‚ใ‚Œใ‚‹ใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใฏๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
108
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
109
+ }
110
+ }
111
+ },
112
+ generic_decline: {
113
+ description: "The card has been declined for an unknown reason.",
114
+ nextSteps: "The customer needs to contact their card issuer for more information.",
115
+ nextUserAction: "Please contact your card issuer for more information.",
116
+ translations: {
117
+ ja: {
118
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
119
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
120
+ }
121
+ }
122
+ },
123
+ incorrect_number: {
124
+ description: "The card number is incorrect.",
125
+ nextSteps: "The customer should try again using the correct card number.",
126
+ nextUserAction: "Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",
127
+ translations: {
128
+ ja: {
129
+ description: "ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
130
+ nextUserAction: "ใ‚ซใƒผใƒ‰็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
131
+ }
132
+ }
133
+ },
134
+ incorrect_cvc: {
135
+ description: "The CVC number is incorrect.",
136
+ nextSteps: "The customer should try again using the correct CVC.",
137
+ nextUserAction: "Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",
138
+ translations: {
139
+ ja: {
140
+ description: "CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
141
+ nextUserAction: "CSC็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
142
+ }
143
+ }
144
+ },
145
+ incorrect_pin: {
146
+ description: "The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",
147
+ nextSteps: "The customer should try again using the correct PIN.",
148
+ nextUserAction: "Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.",
149
+ translations: {
150
+ ja: {
151
+ description: "PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
152
+ nextUserAction: "PINใ‚ณใƒผใƒ‰ใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
153
+ }
154
+ }
155
+ },
156
+ incorrect_zip: {
157
+ description: "The ZIP/postal code is incorrect.",
158
+ nextSteps: "The customer should try again using the correct billing ZIP/postal code.",
159
+ nextUserAction: "Please try again using the correct ZIP/postal code.",
160
+ translations: {
161
+ ja: {
162
+ description: "้ƒตไพฟ็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
163
+ nextUserAction: "ๆญฃใ—ใ„้ƒตไพฟ็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"
164
+ }
165
+ }
166
+ },
167
+ insufficient_funds: {
168
+ description: "The card has insufficient funds to complete the purchase.",
169
+ nextSteps: "The customer should use an alternative payment method.",
170
+ nextUserAction: "Please try again using an alternative payment method.",
171
+ translations: {
172
+ ja: {
173
+ description: "ใ‚ซใƒผใƒ‰ใฎ่ณผๅ…ฅใซๅฟ…่ฆใช่ณ‡้‡‘ใŒไธ่ถณใ—ใฆใ„ใพใ™ใ€‚",
174
+ nextUserAction: "ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"
175
+ }
176
+ }
177
+ },
178
+ invalid_account: {
179
+ description: "The card, or account the card is connected to, is invalid.",
180
+ nextSteps: "The customer needs to contact their card issuer to check that the card is working correctly.",
181
+ nextUserAction: "Please contact your card issuer for more information.",
182
+ translations: {
183
+ ja: {
184
+ description: "ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚",
185
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
186
+ }
187
+ }
188
+ },
189
+ invalid_amount: {
190
+ description: "The payment amount is invalid, or exceeds the amount that is allowed.",
191
+ nextSteps: "If the amount appears to be correct, the customer needs to check with their card issuer that they can make purchases of that amount.",
192
+ nextUserAction: "Please contact your card issuer for more information.",
193
+ translations: {
194
+ ja: {
195
+ description: "ๆ”ฏๆ‰•ใ„้‡‘้กใŒ็„กๅŠนใงใ‚ใ‚‹ใ‹ใ€่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹้‡‘้กใ‚’่ถ…ใˆใฆใ„ใพใ™ใ€‚",
196
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
197
+ }
198
+ }
199
+ },
200
+ invalid_cvc: {
201
+ description: "The CVC number is incorrect.",
202
+ nextSteps: "The customer should try again using the correct CVC.",
203
+ nextUserAction: "Please try again using the correct CVC.",
204
+ translations: {
205
+ ja: {
206
+ description: "CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
207
+ nextUserAction: "ๆญฃใ—ใ„CVCใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"
208
+ }
209
+ }
210
+ },
211
+ invalid_expiry_year: {
212
+ description: "The expiration year invalid.",
213
+ nextSteps: "The customer should try again using the correct expiration date.",
214
+ nextUserAction: "Please try again using the correct expiration date.",
215
+ translations: {
216
+ ja: {
217
+ description: "ๆœ‰ๅŠนๆœŸ้™ใŒ็„กๅŠนใงใ™ใ€‚",
218
+ nextUserAction: "ๆญฃใ—ใ„ๆœ‰ๅŠนๆœŸ้™ใ‚’ๅ…ฅๅŠ›ใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚"
219
+ }
220
+ }
221
+ },
222
+ invalid_number: {
223
+ description: "The card number is incorrect.",
224
+ nextSteps: "The customer should try again using the correct card number.",
225
+ nextUserAction: "Please try again using the correct card number.",
226
+ translations: {
227
+ ja: {
228
+ description: "ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
229
+ nextUserAction: "ๆญฃใ—ใ„ใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"
230
+ }
231
+ }
232
+ },
233
+ invalid_pin: {
234
+ description: "The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",
235
+ nextSteps: "The customer should try again using the correct PIN.",
236
+ nextUserAction: "Please try again using the correct card PIN.",
237
+ translations: {
238
+ ja: {
239
+ description: "PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
240
+ nextUserAction: "ๆญฃใ—ใ„PINใ‚ณใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚"
241
+ }
242
+ }
243
+ },
244
+ issuer_not_available: {
245
+ description: "The card issuer could not be reached, so the payment could not be authorized.",
246
+ nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
247
+ nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
248
+ translations: {
249
+ ja: {
250
+ description: "ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใซ้€ฃ็ตกใงใใชใ‹ใฃใŸใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใ‚’ๆ‰ฟ่ชใงใใพใ›ใ‚“ใงใ—ใŸใ€‚",
251
+ nextUserAction: "ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
252
+ }
253
+ }
254
+ },
255
+ lost_card: {
256
+ description: "The payment has been declined because the card is reported lost.",
257
+ nextSteps: "The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.",
258
+ nextUserAction: "Please contact your card issuer for more information.",
259
+ translations: {
260
+ ja: {
261
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
262
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
263
+ }
264
+ }
265
+ },
266
+ merchant_blacklist: {
267
+ description: "The payment has been declined because it matches a value on the Stripe user's blocklist.",
268
+ nextSteps: "Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.",
269
+ nextUserAction: "Please contact your card issuer for more information.",
270
+ translations: {
271
+ ja: {
272
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
273
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
274
+ }
275
+ }
276
+ },
277
+ new_account_information_available: {
278
+ description: "The card, or account the card is connected to, is invalid.",
279
+ nextSteps: "The customer needs to contact their card issuer for more information.",
280
+ nextUserAction: "Please contact your card issuer for more information.",
281
+ translations: {
282
+ ja: {
283
+ description: "ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚",
284
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
285
+ }
286
+ }
287
+ },
288
+ no_action_taken: {
289
+ description: "The card has been declined for an unknown reason.",
290
+ nextSteps: "The customer should contact their card issuer for more information.",
291
+ nextUserAction: "Please contact your card issuer for more information.",
292
+ translations: {
293
+ ja: {
294
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
295
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
296
+ }
297
+ }
298
+ },
299
+ not_permitted: {
300
+ description: "The payment is not permitted.",
301
+ nextSteps: "The customer needs to contact their card issuer for more information.",
302
+ nextUserAction: "Please contact your card issuer for more information.",
303
+ translations: {
304
+ ja: {
305
+ description: "ๆ”ฏๆ‰•ใ„ใฏ่จฑๅฏใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚",
306
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
307
+ }
308
+ }
309
+ },
310
+ pickup_card: {
311
+ description: "The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",
312
+ nextSteps: "The customer needs to contact their card issuer for more information.",
313
+ nextUserAction: "Please contact your card issuer for more information.",
314
+ translations: {
315
+ ja: {
316
+ description: "ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚",
317
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
318
+ }
319
+ }
320
+ },
321
+ pin_try_exceeded: {
322
+ description: "The allowable number of PIN tries has been exceeded.",
323
+ nextSteps: "The customer must use another card or method of payment.",
324
+ nextUserAction: "Please use another card or method of payment.",
325
+ translations: {
326
+ ja: {
327
+ description: "PIN่ฉฆ่กŒๅ›žๆ•ฐใฎไธŠ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",
328
+ nextUserAction: "ๅˆฅใฎใ‚ซใƒผใƒ‰ใพใŸใฏใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ใ”ๅˆฉ็”จใใ ใ•ใ„ใ€‚"
329
+ }
330
+ }
331
+ },
332
+ processing_error: {
333
+ description: "An error occurred while processing the card.",
334
+ nextSteps: "The payment should be attempted again. If it still cannot be processed, try again later.",
335
+ nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
336
+ translations: {
337
+ ja: {
338
+ description: "ใ‚ซใƒผใƒ‰ใฎๅ‡ฆ็†ไธญใซใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใพใ—ใŸใ€‚",
339
+ nextUserAction: "ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
340
+ }
341
+ }
342
+ },
343
+ reenter_transaction: {
344
+ description: "The payment could not be processed by the issuer for an unknown reason.",
345
+ nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
346
+ nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
347
+ translations: {
348
+ ja: {
349
+ description: "ๅŽŸๅ› ไธๆ˜ŽใฎใŸใ‚ใ€็™บ่กŒ่€…ใŒๆ”ฏๆ‰•ใ„ใ‚’ๅ‡ฆ็†ใงใใพใ›ใ‚“ใงใ—ใŸใ€‚",
350
+ nextUserAction: "ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
351
+ }
352
+ }
353
+ },
354
+ restricted_card: {
355
+ description: "The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",
356
+ nextSteps: "The customer needs to contact their card issuer for more information.",
357
+ nextUserAction: "Please contact your card issuer for more information.",
358
+ translations: {
359
+ ja: {
360
+ description: "ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚",
361
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
362
+ }
363
+ }
364
+ },
365
+ revocation_of_all_authorizations: {
366
+ description: "The card has been declined for an unknown reason.",
367
+ nextSteps: "The customer should contact their card issuer for more information.",
368
+ nextUserAction: "Please contact your card issuer for more information.",
369
+ translations: {
370
+ ja: {
371
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
372
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
373
+ }
374
+ }
375
+ },
376
+ revocation_of_authorization: {
377
+ description: "The card has been declined for an unknown reason.",
378
+ nextSteps: "The customer should contact their card issuer for more information.",
379
+ nextUserAction: "Please contact your card issuer for more information.",
380
+ translations: {
381
+ ja: {
382
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
383
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
384
+ }
385
+ }
386
+ },
387
+ security_violation: {
388
+ description: "The card has been declined for an unknown reason.",
389
+ nextSteps: "The customer needs to contact their card issuer for more information.",
390
+ nextUserAction: "Please contact your card issuer for more information.",
391
+ translations: {
392
+ ja: {
393
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
394
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
395
+ }
396
+ }
397
+ },
398
+ service_not_allowed: {
399
+ description: "The card has been declined for an unknown reason.",
400
+ nextSteps: "The customer should contact their card issuer for more information.",
401
+ nextUserAction: "Please contact your card issuer for more information.",
402
+ translations: {
403
+ ja: {
404
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
405
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
406
+ }
407
+ }
408
+ },
409
+ stolen_card: {
410
+ description: "The payment has been declined because the card is reported stolen.",
411
+ nextSteps: "The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.",
412
+ nextUserAction: "Please contact your card issuer for more information.",
413
+ translations: {
414
+ ja: {
415
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
416
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
417
+ }
418
+ }
419
+ },
420
+ stop_payment_order: {
421
+ description: "The card has been declined for an unknown reason.",
422
+ nextSteps: "The customer should contact their card issuer for more information.",
423
+ nextUserAction: "Please contact your card issuer for more information.",
424
+ translations: {
425
+ ja: {
426
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
427
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
428
+ }
429
+ }
430
+ },
431
+ testmode_decline: {
432
+ description: "A Stripe test card number was used.",
433
+ nextSteps: "A genuine card must be used to make a payment.",
434
+ nextUserAction: "A genuine card must be used to make a payment.",
435
+ translations: {
436
+ ja: {
437
+ description: "Stripeใƒ†ใ‚นใƒˆใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚",
438
+ nextUserAction: "ๆ”ฏๆ‰•ใ„ใซใฏๆœฌ็‰ฉใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚"
439
+ }
440
+ }
441
+ },
442
+ transaction_not_allowed: {
443
+ description: "The card has been declined for an unknown reason.",
444
+ nextSteps: "The customer needs to contact their card issuer for more information.",
445
+ nextUserAction: "Please contact your card issuer for more information.",
446
+ translations: {
447
+ ja: {
448
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
449
+ nextUserAction: "่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
450
+ }
451
+ }
452
+ },
453
+ try_again_later: {
454
+ description: "The card has been declined for an unknown reason.",
455
+ nextSteps: "Ask the customer to attempt the payment again. If subsequent payments are declined, the customer should contact their card issuer for more information.",
456
+ nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
457
+ translations: {
458
+ ja: {
459
+ description: "ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚",
460
+ nextUserAction: "ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
461
+ }
462
+ }
463
+ },
464
+ withdrawal_count_limit_exceeded: {
465
+ description: "The customer has exceeded the balance or credit limit available on their card.",
466
+ nextSteps: "The customer should use an alternative payment method.",
467
+ nextUserAction: "Please use another card or contact your card issuer for more information.",
468
+ translations: {
469
+ ja: {
470
+ description: "ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚",
471
+ nextUserAction: "ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใ‹ใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚"
472
+ }
473
+ }
474
+ }
475
+ };
476
+ function l(e) {
477
+ if (!e || !a(e))
478
+ return {
479
+ docVersion: i,
480
+ code: {}
481
+ };
482
+ const t = r[e];
483
+ return {
484
+ docVersion: i,
485
+ code: t
486
+ };
487
+ }
488
+ function p(e, t = "en") {
489
+ if (!a(e))
490
+ return;
491
+ const n = r[e];
492
+ return t === "en" ? n.nextUserAction : n.translations?.[t]?.nextUserAction;
493
+ }
494
+ function h() {
495
+ return Object.keys(r);
496
+ }
497
+ function a(e) {
498
+ return e in r;
499
+ }
500
+ function m() {
501
+ return i;
502
+ }
503
+ function f(e, t = "en", n) {
504
+ const o = p(e, t);
505
+ if (!o)
506
+ return;
507
+ if (!n)
508
+ return o;
509
+ let s = o;
510
+ for (const [c, d] of Object.entries(n)) {
511
+ const u = new RegExp(`\\{\\{${c}\\}\\}`, "g");
512
+ s = s.replace(u, d);
513
+ }
514
+ return s;
515
+ }
516
+ export {
517
+ r as DECLINE_CODES,
518
+ i as DOC_VERSION,
519
+ f as formatDeclineMessage,
520
+ h as getAllDeclineCodes,
521
+ l as getDeclineDescription,
522
+ p as getDeclineMessage,
523
+ m as getDocVersion,
524
+ a as isValidDeclineCode
525
+ };
526
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../src/data/decline-codes.ts","../src/index.ts"],"sourcesContent":["import type { DeclineCode, DeclineCodeInfo } from '../types';\n\n/**\n * Stripe API documentation version for decline codes\n * Last updated: 2024-12\n * Reference: https://docs.stripe.com/declines/codes\n */\nexport const DOC_VERSION = '2024-12-18';\n\n/**\n * Complete database of Stripe decline codes with descriptions and recommended actions\n * Includes English and Japanese translations\n */\nexport const DECLINE_CODES: Record<DeclineCode, DeclineCodeInfo> = {\n approve_with_id: {\n description: 'The payment cannot be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„ใฏๆ‰ฟ่ชใงใใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n call_issuer: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n card_not_supported: {\n description: 'The card does not support this type of purchase.',\n nextSteps:\n 'The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.',\n nextUserAction:\n 'Your card issuer may not support this type of purchase, please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใฏใ“ใฎใ‚ฟใ‚คใƒ—ใฎ่ณผๅ…ฅใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚่ฉณ็ดฐใซใคใ„ใฆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n card_velocity_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n currency_not_supported: {\n description: 'The card does not support the specified currency.',\n nextSteps:\n 'The customer needs to check with the issuer whether the card can be used for the type of currency specified.',\n nextUserAction:\n 'Please contact your card issuer to verify this type of currency can be used for this payment.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆŒ‡ๅฎšใ•ใ‚ŒใŸ้€š่ฒจใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ“ใฎๆ”ฏๆ‰•ใ„ใซใ“ใฎใ‚ฟใ‚คใƒ—ใฎ้€š่ฒจใŒไฝฟ็”จใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ™ใ‚‹ใซใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซ้€ฃ็ตกใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n do_not_honor: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n do_not_try_again: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n duplicate_transaction: {\n description:\n 'A transaction with identical amount and credit card information was submitted very recently.',\n nextSteps: 'Check to see if a recent payment already exists.',\n nextUserAction: 'Check to see if a recent payment already exists.',\n translations: {\n ja: {\n description: 'ใ”ใๆœ€่ฟ‘ใ€ๅŒไธ€ใฎ้‡‘้กใจใ‚ฏใƒฌใ‚ธใƒƒใƒˆใ‚ซใƒผใƒ‰ๆƒ…ๅ ฑใ‚’ไฝฟ็”จใ—ใŸๅ–ๅผ•ใŒ้€ไฟกใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: 'ๆœ€่ฟ‘ใฎๆ”ฏๆ‰•ใ„ใŒๆ—ขใซๅญ˜ๅœจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n expired_card: {\n description: 'The card has expired.',\n nextSteps: 'The customer should use another card.',\n nextUserAction: 'Please use another card.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœŸ้™ๅˆ‡ใ‚Œใงใ™ใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n fraudulent: {\n description: 'The payment has been declined as Stripe suspects it is fraudulent.',\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ไธๆญฃใจๆ€ใ‚ใ‚Œใ‚‹ใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใฏๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n generic_decline: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'ใ‚ซใƒผใƒ‰็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'CSC็•ชๅทใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction:\n 'Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction:\n 'PINใ‚ณใƒผใƒ‰ใ‚’็ขบ่ชใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n incorrect_zip: {\n description: 'The ZIP/postal code is incorrect.',\n nextSteps: 'The customer should try again using the correct billing ZIP/postal code.',\n nextUserAction: 'Please try again using the correct ZIP/postal code.',\n translations: {\n ja: {\n description: '้ƒตไพฟ็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„้ƒตไพฟ็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n insufficient_funds: {\n description: 'The card has insufficient funds to complete the purchase.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please try again using an alternative payment method.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฎ่ณผๅ…ฅใซๅฟ…่ฆใช่ณ‡้‡‘ใŒไธ่ถณใ—ใฆใ„ใพใ™ใ€‚',\n nextUserAction: 'ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_account: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps:\n 'The customer needs to contact their card issuer to check that the card is working correctly.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_amount: {\n description: 'The payment amount is invalid, or exceeds the amount that is allowed.',\n nextSteps:\n 'If the amount appears to be correct, the customer needs to check with their card issuer that they can make purchases of that amount.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„้‡‘้กใŒ็„กๅŠนใงใ‚ใ‚‹ใ‹ใ€่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹้‡‘้กใ‚’่ถ…ใˆใฆใ„ใพใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction: 'Please try again using the correct CVC.',\n translations: {\n ja: {\n description: 'CVC็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„CVCใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_expiry_year: {\n description: 'The expiration year invalid.',\n nextSteps: 'The customer should try again using the correct expiration date.',\n nextUserAction: 'Please try again using the correct expiration date.',\n translations: {\n ja: {\n description: 'ๆœ‰ๅŠนๆœŸ้™ใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„ๆœ‰ๅŠนๆœŸ้™ใ‚’ๅ…ฅๅŠ›ใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction: 'Please try again using the correct card number.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็•ชๅทใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„ใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n invalid_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction: 'Please try again using the correct card PIN.',\n translations: {\n ja: {\n description: 'PINใ‚ณใƒผใƒ‰ใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚',\n nextUserAction: 'ๆญฃใ—ใ„PINใ‚ณใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚',\n },\n },\n },\n issuer_not_available: {\n description: 'The card issuer could not be reached, so the payment could not be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰็™บ่กŒ่€…ใซ้€ฃ็ตกใงใใชใ‹ใฃใŸใŸใ‚ใ€ๆ”ฏๆ‰•ใ„ใ‚’ๆ‰ฟ่ชใงใใพใ›ใ‚“ใงใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n lost_card: {\n description: 'The payment has been declined because the card is reported lost.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n merchant_blacklist: {\n description:\n \"The payment has been declined because it matches a value on the Stripe user's blocklist.\",\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n new_account_information_available: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใ€ใพใŸใฏใ‚ซใƒผใƒ‰ใŒๆŽฅ็ถšใ•ใ‚Œใฆใ„ใ‚‹ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใŒ็„กๅŠนใงใ™ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n no_action_taken: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n not_permitted: {\n description: 'The payment is not permitted.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ๆ”ฏๆ‰•ใ„ใฏ่จฑๅฏใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n pickup_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n pin_try_exceeded: {\n description: 'The allowable number of PIN tries has been exceeded.',\n nextSteps: 'The customer must use another card or method of payment.',\n nextUserAction: 'Please use another card or method of payment.',\n translations: {\n ja: {\n description: 'PIN่ฉฆ่กŒๅ›žๆ•ฐใฎไธŠ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใพใŸใฏใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ใ”ๅˆฉ็”จใใ ใ•ใ„ใ€‚',\n },\n },\n },\n processing_error: {\n description: 'An error occurred while processing the card.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, try again later.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฎๅ‡ฆ็†ไธญใซใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใพใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n reenter_transaction: {\n description: 'The payment could not be processed by the issuer for an unknown reason.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ๅŽŸๅ› ไธๆ˜ŽใฎใŸใ‚ใ€็™บ่กŒ่€…ใŒๆ”ฏๆ‰•ใ„ใ‚’ๅ‡ฆ็†ใงใใพใ›ใ‚“ใงใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n restricted_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'ใ‚ซใƒผใƒ‰ใงใ“ใฎๆ”ฏๆ‰•ใ„ใ‚’่กŒใ†ใ“ใจใฏใงใใพใ›ใ‚“๏ผˆ็ด›ๅคฑใพใŸใฏ็›—้›ฃใซใ‚ใฃใŸใจๅ ฑๅ‘Šใ•ใ‚Œใฆใ„ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™๏ผ‰ใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n revocation_of_all_authorizations: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n revocation_of_authorization: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n security_violation: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n service_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n stolen_card: {\n description: 'The payment has been declined because the card is reported stolen.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n stop_payment_order: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n testmode_decline: {\n description: 'A Stripe test card number was used.',\n nextSteps: 'A genuine card must be used to make a payment.',\n nextUserAction: 'A genuine card must be used to make a payment.',\n translations: {\n ja: {\n description: 'Stripeใƒ†ใ‚นใƒˆใ‚ซใƒผใƒ‰็•ชๅทใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚',\n nextUserAction: 'ๆ”ฏๆ‰•ใ„ใซใฏๆœฌ็‰ฉใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚',\n },\n },\n },\n transaction_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction: '่ฉณใ—ใใฏใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n try_again_later: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps:\n 'Ask the customer to attempt the payment again. If subsequent payments are declined, the customer should contact their card issuer for more information.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'ใ‚ซใƒผใƒ‰ใฏๆœช็Ÿฅใฎ็†็”ฑใงๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸใ€‚',\n nextUserAction:\n 'ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใฆใใ ใ•ใ„ใ€‚ใใ‚Œใงใ‚‚ๅ‡ฆ็†ใงใใชใ„ๅ ดๅˆใฏใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n withdrawal_count_limit_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please use another card or contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'ใ“ใฎใ‚ซใƒผใƒ‰ใฎๆฎ‹้ซ˜ใพใŸใฏใ‚ฏใƒฌใ‚ธใƒƒใƒˆๅˆถ้™ใ‚’่ถ…ใˆใพใ—ใŸใ€‚',\n nextUserAction: 'ๅˆฅใฎใ‚ซใƒผใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใ‹ใ€ใ‚ซใƒผใƒ‰็™บ่กŒไผš็คพใซใŠๅ•ใ„ๅˆใ‚ใ›ใใ ใ•ใ„ใ€‚',\n },\n },\n },\n};\n","import { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\nimport type { DeclineCode, DeclineCodeResult, Locale } from './types';\n\n/**\n * Get decline code information with description and recommended actions\n *\n * @param declineCode - The Stripe decline code to look up\n * @returns Object containing the decline code information and documentation version\n *\n * @example\n * ```ts\n * const result = getDeclineDescription('insufficient_funds');\n * console.log(result.code.description);\n * // => \"The card has insufficient funds to complete the purchase.\"\n * console.log(result.code.nextUserAction);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function getDeclineDescription(declineCode?: string): DeclineCodeResult {\n if (!declineCode || !isValidDeclineCode(declineCode)) {\n return {\n docVersion: DOC_VERSION,\n code: {},\n };\n }\n\n const code = DECLINE_CODES[declineCode];\n return {\n docVersion: DOC_VERSION,\n code,\n };\n}\n\n/**\n * Get localized decline code message for end users\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @returns User-facing message in the specified locale, or undefined if not found\n *\n * @example\n * ```ts\n * const message = getDeclineMessage('insufficient_funds', 'ja');\n * console.log(message);\n * // => \"ๅˆฅใฎใŠๆ”ฏๆ‰•ใ„ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚\"\n * ```\n */\nexport function getDeclineMessage(declineCode: string, locale: Locale = 'en'): string | undefined {\n if (!isValidDeclineCode(declineCode)) {\n return undefined;\n }\n\n const codeInfo = DECLINE_CODES[declineCode];\n\n if (locale === 'en') {\n return codeInfo.nextUserAction;\n }\n\n return codeInfo.translations?.[locale]?.nextUserAction;\n}\n\n/**\n * Get all available decline codes\n *\n * @returns Array of all supported decline code strings\n *\n * @example\n * ```ts\n * const codes = getAllDeclineCodes();\n * console.log(codes.length); // => 44\n * console.log(codes.includes('insufficient_funds')); // => true\n * ```\n */\nexport function getAllDeclineCodes(): DeclineCode[] {\n return Object.keys(DECLINE_CODES) as DeclineCode[];\n}\n\n/**\n * Check if a decline code is valid\n *\n * @param code - The code to validate\n * @returns True if the code exists in the database\n *\n * @example\n * ```ts\n * isValidDeclineCode('insufficient_funds'); // => true\n * isValidDeclineCode('invalid_code'); // => false\n * ```\n */\nexport function isValidDeclineCode(code: string): code is DeclineCode {\n return code in DECLINE_CODES;\n}\n\n/**\n * Get the documentation version for the decline codes data\n *\n * @returns The Stripe API documentation version string\n *\n * @example\n * ```ts\n * const version = getDocVersion();\n * console.log(version); // => \"2024-12-18\"\n * ```\n */\nexport function getDocVersion(): string {\n return DOC_VERSION;\n}\n\n/**\n * Format a decline message with custom template variables\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @param variables - Optional variables to replace in the message template\n * @returns Formatted user-facing message with variables replaced\n *\n * @example\n * ```ts\n * const message = formatDeclineMessage('insufficient_funds', 'en', {\n * merchantName: 'Acme Store',\n * supportEmail: 'support@acme.com'\n * });\n * console.log(message);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function formatDeclineMessage(\n declineCode: string,\n locale: Locale = 'en',\n variables?: Record<string, string>,\n): string | undefined {\n const baseMessage = getDeclineMessage(declineCode, locale);\n\n if (!baseMessage) {\n return undefined;\n }\n\n if (!variables) {\n return baseMessage;\n }\n\n // Replace variables in the format {{variableName}}\n let formattedMessage = baseMessage;\n for (const [key, value] of Object.entries(variables)) {\n const placeholder = new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, 'g');\n formattedMessage = formattedMessage.replace(placeholder, value);\n }\n\n return formattedMessage;\n}\n\n// Export data for advanced use cases\nexport { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\n// Export types\nexport type {\n DeclineCode,\n DeclineCodeInfo,\n DeclineCodeResult,\n Locale,\n Translation,\n} from './types';\n"],"names":["DOC_VERSION","DECLINE_CODES","getDeclineDescription","declineCode","isValidDeclineCode","code","getDeclineMessage","locale","codeInfo","getAllDeclineCodes","getDocVersion","formatDeclineMessage","variables","baseMessage","formattedMessage","key","value","placeholder"],"mappings":"AAOO,MAAMA,IAAc,cAMdC,IAAsD;AAAA,EACjE,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,WACE;AAAA,IACF,gBACE;AAAA,IACF,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA,QACb,gBACE;AAAA,MAAA;AAAA,IACJ;AAAA,EACF;AAAA,EAEF,aAAa;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA,QACb,gBAAgB;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAAA,EAEF,oBAAoB;AAAA,IAClB,aAAa;AAAA,IACb,WACE;AAAA,IACF,gBACE;AAAA,IACF,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA,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AA,IACL,YAAYH;AAAA,IACZ,MAAAK;AAAA,EAAA;AAEJ;AAgBO,SAASC,EAAkBH,GAAqBI,IAAiB,MAA0B;AAChG,MAAI,CAACH,EAAmBD,CAAW;AACjC;AAGF,QAAMK,IAAWP,EAAcE,CAAW;AAE1C,SAAII,MAAW,OACNC,EAAS,iBAGXA,EAAS,eAAeD,CAAM,GAAG;AAC1C;AAcO,SAASE,IAAoC;AAClD,SAAO,OAAO,KAAKR,CAAa;AAClC;AAcO,SAASG,EAAmBC,GAAmC;AACpE,SAAOA,KAAQJ;AACjB;AAaO,SAASS,IAAwB;AACtC,SAAOV;AACT;AAoBO,SAASW,EACdR,GACAI,IAAiB,MACjBK,GACoB;AACpB,QAAMC,IAAcP,EAAkBH,GAAaI,CAAM;AAEzD,MAAI,CAACM;AACH;AAGF,MAAI,CAACD;AACH,WAAOC;AAIT,MAAIC,IAAmBD;AACvB,aAAW,CAACE,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAS,GAAG;AACpD,UAAMK,IAAc,IAAI,OAAO,SAASF,CAAG,UAAU,GAAG;AACxD,IAAAD,IAAmBA,EAAiB,QAAQG,GAAaD,CAAK;AAAA,EAChE;AAEA,SAAOF;AACT;"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "stripe-decline-codes",
3
+ "version": "0.1.0",
4
+ "description": "Complete database of Stripe decline codes with descriptions and localized messages",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs.js",
7
+ "module": "./dist/index.es.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.es.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.cjs.js"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsc && vite build",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest",
30
+ "test:coverage": "vitest run --coverage",
31
+ "lint": "biome check .",
32
+ "lint:fix": "biome check --write .",
33
+ "format": "biome format --write .",
34
+ "typecheck": "tsc --noEmit",
35
+ "prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build",
36
+ "release": "np"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/hideokamoto/stripe-decline-codes.git"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/hideokamoto/stripe-decline-codes/issues"
44
+ },
45
+ "keywords": [
46
+ "stripe",
47
+ "decline",
48
+ "decline-codes",
49
+ "payment",
50
+ "error-messages",
51
+ "localization",
52
+ "i18n",
53
+ "typescript"
54
+ ],
55
+ "author": "Hidetaka Okamoto <info@wp-kyoto.net> (https://wp-kyoto.net)",
56
+ "license": "MIT",
57
+ "engines": {
58
+ "node": ">= 18.0.0"
59
+ },
60
+ "overrides": {
61
+ "tmp": "^0.2.5"
62
+ },
63
+ "devDependencies": {
64
+ "@biomejs/biome": "^2.3.6",
65
+ "@types/node": "^24.10.1",
66
+ "np": "^10.2.0",
67
+ "typescript": "^5.9.3",
68
+ "vite": "^7.2.2",
69
+ "vitest": "^4.0.10"
70
+ }
71
+ }