stripe-decline-codes 0.1.0 → 0.2.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.
@@ -3,6 +3,7 @@ const i = "2024-12-18", r = {
3
3
  description: "The payment cannot be authorized.",
4
4
  nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
5
5
  nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
6
+ category: "SOFT_DECLINE",
6
7
  translations: {
7
8
  ja: {
8
9
  description: "支払いは承認できません。",
@@ -14,6 +15,7 @@ const i = "2024-12-18", r = {
14
15
  description: "The card has been declined for an unknown reason.",
15
16
  nextSteps: "The customer needs to contact their card issuer for more information.",
16
17
  nextUserAction: "Please contact your card issuer for more information.",
18
+ category: "SOFT_DECLINE",
17
19
  translations: {
18
20
  ja: {
19
21
  description: "カードは未知の理由で拒否されました。",
@@ -25,6 +27,7 @@ const i = "2024-12-18", r = {
25
27
  description: "The card does not support this type of purchase.",
26
28
  nextSteps: "The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.",
27
29
  nextUserAction: "Your card issuer may not support this type of purchase, please contact your card issuer for more information.",
30
+ category: "HARD_DECLINE",
28
31
  translations: {
29
32
  ja: {
30
33
  description: "カードはこのタイプの購入をサポートしません。",
@@ -36,6 +39,7 @@ const i = "2024-12-18", r = {
36
39
  description: "The customer has exceeded the balance or credit limit available on their card.",
37
40
  nextSteps: "The customer should contact their card issuer for more information.",
38
41
  nextUserAction: "Please contact your card issuer for more information.",
42
+ category: "SOFT_DECLINE",
39
43
  translations: {
40
44
  ja: {
41
45
  description: "このカードの残高またはクレジット制限を超えました。",
@@ -47,6 +51,7 @@ const i = "2024-12-18", r = {
47
51
  description: "The card does not support the specified currency.",
48
52
  nextSteps: "The customer needs to check with the issuer whether the card can be used for the type of currency specified.",
49
53
  nextUserAction: "Please contact your card issuer to verify this type of currency can be used for this payment.",
54
+ category: "HARD_DECLINE",
50
55
  translations: {
51
56
  ja: {
52
57
  description: "カードは指定された通貨をサポートしていません。",
@@ -58,6 +63,7 @@ const i = "2024-12-18", r = {
58
63
  description: "The card has been declined for an unknown reason.",
59
64
  nextSteps: "The customer needs to contact their card issuer for more information.",
60
65
  nextUserAction: "Please contact your card issuer for more information.",
66
+ category: "SOFT_DECLINE",
61
67
  translations: {
62
68
  ja: {
63
69
  description: "カードは未知の理由で拒否されました。",
@@ -69,6 +75,7 @@ const i = "2024-12-18", r = {
69
75
  description: "The card has been declined for an unknown reason.",
70
76
  nextSteps: "The customer should contact their card issuer for more information.",
71
77
  nextUserAction: "Please contact your card issuer for more information.",
78
+ category: "HARD_DECLINE",
72
79
  translations: {
73
80
  ja: {
74
81
  description: "カードは未知の理由で拒否されました。",
@@ -80,6 +87,7 @@ const i = "2024-12-18", r = {
80
87
  description: "A transaction with identical amount and credit card information was submitted very recently.",
81
88
  nextSteps: "Check to see if a recent payment already exists.",
82
89
  nextUserAction: "Check to see if a recent payment already exists.",
90
+ category: "SOFT_DECLINE",
83
91
  translations: {
84
92
  ja: {
85
93
  description: "ごく最近、同一の金額とクレジットカード情報を使用した取引が送信されました。",
@@ -91,6 +99,7 @@ const i = "2024-12-18", r = {
91
99
  description: "The card has expired.",
92
100
  nextSteps: "The customer should use another card.",
93
101
  nextUserAction: "Please use another card.",
102
+ category: "HARD_DECLINE",
94
103
  translations: {
95
104
  ja: {
96
105
  description: "カードは期限切れです。",
@@ -102,6 +111,7 @@ const i = "2024-12-18", r = {
102
111
  description: "The payment has been declined as Stripe suspects it is fraudulent.",
103
112
  nextSteps: "Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.",
104
113
  nextUserAction: "Please contact your card issuer for more information.",
114
+ category: "HARD_DECLINE",
105
115
  translations: {
106
116
  ja: {
107
117
  description: "不正と思われるため、支払いは拒否されました。",
@@ -113,6 +123,7 @@ const i = "2024-12-18", r = {
113
123
  description: "The card has been declined for an unknown reason.",
114
124
  nextSteps: "The customer needs to contact their card issuer for more information.",
115
125
  nextUserAction: "Please contact your card issuer for more information.",
126
+ category: "SOFT_DECLINE",
116
127
  translations: {
117
128
  ja: {
118
129
  description: "カードは未知の理由で拒否されました。",
@@ -124,6 +135,7 @@ const i = "2024-12-18", r = {
124
135
  description: "The card number is incorrect.",
125
136
  nextSteps: "The customer should try again using the correct card number.",
126
137
  nextUserAction: "Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",
138
+ category: "HARD_DECLINE",
127
139
  translations: {
128
140
  ja: {
129
141
  description: "カード番号が正しくありません。",
@@ -135,6 +147,7 @@ const i = "2024-12-18", r = {
135
147
  description: "The CVC number is incorrect.",
136
148
  nextSteps: "The customer should try again using the correct CVC.",
137
149
  nextUserAction: "Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.",
150
+ category: "HARD_DECLINE",
138
151
  translations: {
139
152
  ja: {
140
153
  description: "CVC番号が正しくありません。",
@@ -146,6 +159,7 @@ const i = "2024-12-18", r = {
146
159
  description: "The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",
147
160
  nextSteps: "The customer should try again using the correct PIN.",
148
161
  nextUserAction: "Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.",
162
+ category: "HARD_DECLINE",
149
163
  translations: {
150
164
  ja: {
151
165
  description: "PINコードが正しくありません。",
@@ -157,6 +171,7 @@ const i = "2024-12-18", r = {
157
171
  description: "The ZIP/postal code is incorrect.",
158
172
  nextSteps: "The customer should try again using the correct billing ZIP/postal code.",
159
173
  nextUserAction: "Please try again using the correct ZIP/postal code.",
174
+ category: "HARD_DECLINE",
160
175
  translations: {
161
176
  ja: {
162
177
  description: "郵便番号が正しくありません。",
@@ -168,6 +183,7 @@ const i = "2024-12-18", r = {
168
183
  description: "The card has insufficient funds to complete the purchase.",
169
184
  nextSteps: "The customer should use an alternative payment method.",
170
185
  nextUserAction: "Please try again using an alternative payment method.",
186
+ category: "SOFT_DECLINE",
171
187
  translations: {
172
188
  ja: {
173
189
  description: "カードの購入に必要な資金が不足しています。",
@@ -179,6 +195,7 @@ const i = "2024-12-18", r = {
179
195
  description: "The card, or account the card is connected to, is invalid.",
180
196
  nextSteps: "The customer needs to contact their card issuer to check that the card is working correctly.",
181
197
  nextUserAction: "Please contact your card issuer for more information.",
198
+ category: "HARD_DECLINE",
182
199
  translations: {
183
200
  ja: {
184
201
  description: "カード、またはカードが接続されているアカウントが無効です。",
@@ -190,6 +207,7 @@ const i = "2024-12-18", r = {
190
207
  description: "The payment amount is invalid, or exceeds the amount that is allowed.",
191
208
  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
209
  nextUserAction: "Please contact your card issuer for more information.",
210
+ category: "SOFT_DECLINE",
193
211
  translations: {
194
212
  ja: {
195
213
  description: "支払い金額が無効であるか、許可されている金額を超えています。",
@@ -201,6 +219,7 @@ const i = "2024-12-18", r = {
201
219
  description: "The CVC number is incorrect.",
202
220
  nextSteps: "The customer should try again using the correct CVC.",
203
221
  nextUserAction: "Please try again using the correct CVC.",
222
+ category: "HARD_DECLINE",
204
223
  translations: {
205
224
  ja: {
206
225
  description: "CVC番号が正しくありません。",
@@ -212,6 +231,7 @@ const i = "2024-12-18", r = {
212
231
  description: "The expiration year invalid.",
213
232
  nextSteps: "The customer should try again using the correct expiration date.",
214
233
  nextUserAction: "Please try again using the correct expiration date.",
234
+ category: "HARD_DECLINE",
215
235
  translations: {
216
236
  ja: {
217
237
  description: "有効期限が無効です。",
@@ -223,6 +243,7 @@ const i = "2024-12-18", r = {
223
243
  description: "The card number is incorrect.",
224
244
  nextSteps: "The customer should try again using the correct card number.",
225
245
  nextUserAction: "Please try again using the correct card number.",
246
+ category: "HARD_DECLINE",
226
247
  translations: {
227
248
  ja: {
228
249
  description: "カード番号が正しくありません。",
@@ -234,6 +255,7 @@ const i = "2024-12-18", r = {
234
255
  description: "The PIN entered is incorrect. This decline code only applies to payments made with a card reader.",
235
256
  nextSteps: "The customer should try again using the correct PIN.",
236
257
  nextUserAction: "Please try again using the correct card PIN.",
258
+ category: "HARD_DECLINE",
237
259
  translations: {
238
260
  ja: {
239
261
  description: "PINコードが正しくありません。",
@@ -245,6 +267,7 @@ const i = "2024-12-18", r = {
245
267
  description: "The card issuer could not be reached, so the payment could not be authorized.",
246
268
  nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
247
269
  nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
270
+ category: "SOFT_DECLINE",
248
271
  translations: {
249
272
  ja: {
250
273
  description: "カード発行者に連絡できなかったため、支払いを承認できませんでした。",
@@ -256,6 +279,7 @@ const i = "2024-12-18", r = {
256
279
  description: "The payment has been declined because the card is reported lost.",
257
280
  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
281
  nextUserAction: "Please contact your card issuer for more information.",
282
+ category: "HARD_DECLINE",
259
283
  translations: {
260
284
  ja: {
261
285
  description: "カードは未知の理由で拒否されました。",
@@ -267,6 +291,7 @@ const i = "2024-12-18", r = {
267
291
  description: "The payment has been declined because it matches a value on the Stripe user's blocklist.",
268
292
  nextSteps: "Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.",
269
293
  nextUserAction: "Please contact your card issuer for more information.",
294
+ category: "HARD_DECLINE",
270
295
  translations: {
271
296
  ja: {
272
297
  description: "カードは未知の理由で拒否されました。",
@@ -278,6 +303,7 @@ const i = "2024-12-18", r = {
278
303
  description: "The card, or account the card is connected to, is invalid.",
279
304
  nextSteps: "The customer needs to contact their card issuer for more information.",
280
305
  nextUserAction: "Please contact your card issuer for more information.",
306
+ category: "SOFT_DECLINE",
281
307
  translations: {
282
308
  ja: {
283
309
  description: "カード、またはカードが接続されているアカウントが無効です。",
@@ -289,6 +315,7 @@ const i = "2024-12-18", r = {
289
315
  description: "The card has been declined for an unknown reason.",
290
316
  nextSteps: "The customer should contact their card issuer for more information.",
291
317
  nextUserAction: "Please contact your card issuer for more information.",
318
+ category: "SOFT_DECLINE",
292
319
  translations: {
293
320
  ja: {
294
321
  description: "カードは未知の理由で拒否されました。",
@@ -300,6 +327,7 @@ const i = "2024-12-18", r = {
300
327
  description: "The payment is not permitted.",
301
328
  nextSteps: "The customer needs to contact their card issuer for more information.",
302
329
  nextUserAction: "Please contact your card issuer for more information.",
330
+ category: "HARD_DECLINE",
303
331
  translations: {
304
332
  ja: {
305
333
  description: "支払いは許可されていません。",
@@ -311,6 +339,7 @@ const i = "2024-12-18", r = {
311
339
  description: "The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",
312
340
  nextSteps: "The customer needs to contact their card issuer for more information.",
313
341
  nextUserAction: "Please contact your card issuer for more information.",
342
+ category: "HARD_DECLINE",
314
343
  translations: {
315
344
  ja: {
316
345
  description: "カードでこの支払いを行うことはできません(紛失または盗難にあったと報告されている可能性があります)。",
@@ -322,6 +351,7 @@ const i = "2024-12-18", r = {
322
351
  description: "The allowable number of PIN tries has been exceeded.",
323
352
  nextSteps: "The customer must use another card or method of payment.",
324
353
  nextUserAction: "Please use another card or method of payment.",
354
+ category: "SOFT_DECLINE",
325
355
  translations: {
326
356
  ja: {
327
357
  description: "PIN試行回数の上限を超えました。",
@@ -333,6 +363,7 @@ const i = "2024-12-18", r = {
333
363
  description: "An error occurred while processing the card.",
334
364
  nextSteps: "The payment should be attempted again. If it still cannot be processed, try again later.",
335
365
  nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
366
+ category: "SOFT_DECLINE",
336
367
  translations: {
337
368
  ja: {
338
369
  description: "カードの処理中にエラーが発生しました。",
@@ -344,6 +375,7 @@ const i = "2024-12-18", r = {
344
375
  description: "The payment could not be processed by the issuer for an unknown reason.",
345
376
  nextSteps: "The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.",
346
377
  nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
378
+ category: "SOFT_DECLINE",
347
379
  translations: {
348
380
  ja: {
349
381
  description: "原因不明のため、発行者が支払いを処理できませんでした。",
@@ -355,6 +387,7 @@ const i = "2024-12-18", r = {
355
387
  description: "The card cannot be used to make this payment (it is possible it has been reported lost or stolen).",
356
388
  nextSteps: "The customer needs to contact their card issuer for more information.",
357
389
  nextUserAction: "Please contact your card issuer for more information.",
390
+ category: "HARD_DECLINE",
358
391
  translations: {
359
392
  ja: {
360
393
  description: "カードでこの支払いを行うことはできません(紛失または盗難にあったと報告されている可能性があります)。",
@@ -366,6 +399,7 @@ const i = "2024-12-18", r = {
366
399
  description: "The card has been declined for an unknown reason.",
367
400
  nextSteps: "The customer should contact their card issuer for more information.",
368
401
  nextUserAction: "Please contact your card issuer for more information.",
402
+ category: "HARD_DECLINE",
369
403
  translations: {
370
404
  ja: {
371
405
  description: "カードは未知の理由で拒否されました。",
@@ -377,6 +411,7 @@ const i = "2024-12-18", r = {
377
411
  description: "The card has been declined for an unknown reason.",
378
412
  nextSteps: "The customer should contact their card issuer for more information.",
379
413
  nextUserAction: "Please contact your card issuer for more information.",
414
+ category: "HARD_DECLINE",
380
415
  translations: {
381
416
  ja: {
382
417
  description: "カードは未知の理由で拒否されました。",
@@ -388,6 +423,7 @@ const i = "2024-12-18", r = {
388
423
  description: "The card has been declined for an unknown reason.",
389
424
  nextSteps: "The customer needs to contact their card issuer for more information.",
390
425
  nextUserAction: "Please contact your card issuer for more information.",
426
+ category: "HARD_DECLINE",
391
427
  translations: {
392
428
  ja: {
393
429
  description: "カードは未知の理由で拒否されました。",
@@ -399,6 +435,7 @@ const i = "2024-12-18", r = {
399
435
  description: "The card has been declined for an unknown reason.",
400
436
  nextSteps: "The customer should contact their card issuer for more information.",
401
437
  nextUserAction: "Please contact your card issuer for more information.",
438
+ category: "HARD_DECLINE",
402
439
  translations: {
403
440
  ja: {
404
441
  description: "カードは未知の理由で拒否されました。",
@@ -410,6 +447,7 @@ const i = "2024-12-18", r = {
410
447
  description: "The payment has been declined because the card is reported stolen.",
411
448
  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
449
  nextUserAction: "Please contact your card issuer for more information.",
450
+ category: "HARD_DECLINE",
413
451
  translations: {
414
452
  ja: {
415
453
  description: "カードは未知の理由で拒否されました。",
@@ -421,6 +459,7 @@ const i = "2024-12-18", r = {
421
459
  description: "The card has been declined for an unknown reason.",
422
460
  nextSteps: "The customer should contact their card issuer for more information.",
423
461
  nextUserAction: "Please contact your card issuer for more information.",
462
+ category: "HARD_DECLINE",
424
463
  translations: {
425
464
  ja: {
426
465
  description: "カードは未知の理由で拒否されました。",
@@ -432,6 +471,7 @@ const i = "2024-12-18", r = {
432
471
  description: "A Stripe test card number was used.",
433
472
  nextSteps: "A genuine card must be used to make a payment.",
434
473
  nextUserAction: "A genuine card must be used to make a payment.",
474
+ category: "HARD_DECLINE",
435
475
  translations: {
436
476
  ja: {
437
477
  description: "Stripeテストカード番号を使用しました。",
@@ -443,6 +483,7 @@ const i = "2024-12-18", r = {
443
483
  description: "The card has been declined for an unknown reason.",
444
484
  nextSteps: "The customer needs to contact their card issuer for more information.",
445
485
  nextUserAction: "Please contact your card issuer for more information.",
486
+ category: "HARD_DECLINE",
446
487
  translations: {
447
488
  ja: {
448
489
  description: "カードは未知の理由で拒否されました。",
@@ -454,6 +495,7 @@ const i = "2024-12-18", r = {
454
495
  description: "The card has been declined for an unknown reason.",
455
496
  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
497
  nextUserAction: "Please try again. If it still cannot be processed, the please contact your card issuer.",
498
+ category: "SOFT_DECLINE",
457
499
  translations: {
458
500
  ja: {
459
501
  description: "カードは未知の理由で拒否されました。",
@@ -465,6 +507,7 @@ const i = "2024-12-18", r = {
465
507
  description: "The customer has exceeded the balance or credit limit available on their card.",
466
508
  nextSteps: "The customer should use an alternative payment method.",
467
509
  nextUserAction: "Please use another card or contact your card issuer for more information.",
510
+ category: "SOFT_DECLINE",
468
511
  translations: {
469
512
  ja: {
470
513
  description: "このカードの残高またはクレジット制限を超えました。",
@@ -473,7 +516,7 @@ const i = "2024-12-18", r = {
473
516
  }
474
517
  }
475
518
  };
476
- function l(e) {
519
+ function m(e) {
477
520
  if (!e || !a(e))
478
521
  return {
479
522
  docVersion: i,
@@ -485,42 +528,60 @@ function l(e) {
485
528
  code: t
486
529
  };
487
530
  }
488
- function p(e, t = "en") {
531
+ function c(e, t = "en") {
489
532
  if (!a(e))
490
533
  return;
491
534
  const n = r[e];
492
535
  return t === "en" ? n.nextUserAction : n.translations?.[t]?.nextUserAction;
493
536
  }
494
- function h() {
537
+ function y() {
495
538
  return Object.keys(r);
496
539
  }
497
540
  function a(e) {
498
- return e in r;
541
+ return Object.hasOwn(r, e);
499
542
  }
500
- function m() {
543
+ function f() {
501
544
  return i;
502
545
  }
503
- function f(e, t = "en", n) {
504
- const o = p(e, t);
546
+ function x(e, t = "en", n) {
547
+ const o = c(e, t);
505
548
  if (!o)
506
549
  return;
507
- if (!n)
550
+ if (!n || Object.keys(n).length === 0)
508
551
  return o;
509
552
  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);
553
+ for (const [u, l] of Object.entries(n)) {
554
+ const p = u.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), h = new RegExp(`\\{\\{${p}\\}\\}`, "g");
555
+ s = s.replace(h, l);
513
556
  }
514
557
  return s;
515
558
  }
559
+ function d(e) {
560
+ if (a(e))
561
+ return r[e].category;
562
+ }
563
+ function A(e) {
564
+ return d(e) === "HARD_DECLINE";
565
+ }
566
+ function g(e) {
567
+ return d(e) === "SOFT_DECLINE";
568
+ }
569
+ function _(e, t = "en") {
570
+ if (e.decline_code)
571
+ return c(e.decline_code, t);
572
+ }
516
573
  export {
517
574
  r as DECLINE_CODES,
518
575
  i as DOC_VERSION,
519
- f as formatDeclineMessage,
520
- h as getAllDeclineCodes,
521
- l as getDeclineDescription,
522
- p as getDeclineMessage,
523
- m as getDocVersion,
576
+ x as formatDeclineMessage,
577
+ y as getAllDeclineCodes,
578
+ d as getDeclineCategory,
579
+ m as getDeclineDescription,
580
+ c as getDeclineMessage,
581
+ f as getDocVersion,
582
+ _ as getMessageFromStripeError,
583
+ A as isHardDecline,
584
+ g as isSoftDecline,
524
585
  a as isValidDeclineCode
525
586
  };
526
- //# sourceMappingURL=index.es.js.map
587
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/data/decline-codes.ts","../src/index.ts"],"sourcesContent":["import type { DeclineCode, DeclineCodeInfo } from '../types.js';\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 category: 'SOFT_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'HARD_DECLINE',\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 category: 'SOFT_DECLINE',\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 category: 'SOFT_DECLINE',\n translations: {\n ja: {\n description: 'このカードの残高またはクレジット制限を超えました。',\n nextUserAction: '別のカードを使用するか、カード発行会社にお問い合わせください。',\n },\n },\n },\n};\n","import { DECLINE_CODES, DOC_VERSION } from './data/decline-codes.js';\nimport type {\n DeclineCategory,\n DeclineCode,\n DeclineCodeResult,\n Locale,\n StripeError,\n} from './types.js';\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 Object.hasOwn(DECLINE_CODES, code);\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 || Object.keys(variables).length === 0) {\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 // Escape special regex characters in the key\n const escapedKey = key.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const placeholder = new RegExp(`\\\\{\\\\{${escapedKey}\\\\}\\\\}`, 'g');\n formattedMessage = formattedMessage.replace(placeholder, value);\n }\n\n return formattedMessage;\n}\n\n/**\n * Get the category of a decline code (SOFT_DECLINE or HARD_DECLINE)\n *\n * @param code - The decline code to categorize\n * @returns The category of the decline code, or undefined if invalid\n *\n * @example\n * ```ts\n * getDeclineCategory('insufficient_funds'); // => 'SOFT_DECLINE'\n * getDeclineCategory('fraudulent'); // => 'HARD_DECLINE'\n * ```\n */\nexport function getDeclineCategory(code: string): DeclineCategory | undefined {\n if (!isValidDeclineCode(code)) {\n return undefined;\n }\n\n return DECLINE_CODES[code].category;\n}\n\n/**\n * Check if a decline code is a hard decline (permanent, should not retry)\n *\n * @param code - The decline code to check\n * @returns True if the code is a hard decline\n *\n * @example\n * ```ts\n * isHardDecline('fraudulent'); // => true\n * isHardDecline('insufficient_funds'); // => false\n * ```\n */\nexport function isHardDecline(code: string): boolean {\n return getDeclineCategory(code) === 'HARD_DECLINE';\n}\n\n/**\n * Check if a decline code is a soft decline (temporary, can retry)\n *\n * @param code - The decline code to check\n * @returns True if the code is a soft decline\n *\n * @example\n * ```ts\n * isSoftDecline('insufficient_funds'); // => true\n * isSoftDecline('fraudulent'); // => false\n * ```\n */\nexport function isSoftDecline(code: string): boolean {\n return getDeclineCategory(code) === 'SOFT_DECLINE';\n}\n\n/**\n * Extract localized message from a Stripe error object\n *\n * @param error - The Stripe error object\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 stripeError = {\n * type: 'StripeCardError',\n * decline_code: 'insufficient_funds',\n * message: 'Your card has insufficient funds.'\n * };\n * const message = getMessageFromStripeError(stripeError, 'ja');\n * console.log(message);\n * // => \"別のお支払い方法を使用してもう一度お試しください。\"\n * ```\n */\nexport function getMessageFromStripeError(\n error: StripeError,\n locale: Locale = 'en',\n): string | undefined {\n if (!error.decline_code) {\n return undefined;\n }\n\n return getDeclineMessage(error.decline_code, locale);\n}\n\n// Export data for advanced use cases\nexport { DECLINE_CODES, DOC_VERSION } from './data/decline-codes.js';\n// Export types\nexport type {\n DeclineCategory,\n DeclineCode,\n DeclineCodeInfo,\n DeclineCodeResult,\n Locale,\n StripeError,\n Translation,\n} from './types.js';\n"],"names":["DOC_VERSION","DECLINE_CODES","getDeclineDescription","declineCode","isValidDeclineCode","code","getDeclineMessage","locale","codeInfo","getAllDeclineCodes","getDocVersion","formatDeclineMessage","variables","baseMessage","formattedMessage","key","value","escapedKey","placeholder","getDeclineCategory","isHardDecline","isSoftDecline","getMessageFromStripeError","error"],"mappings":"AAOO,MAAMA,IAAc,cAMdC,IAAsD;AAAA,EACjE,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,WACE;AAAA,IACF,gBACE;AAAA,IACF,UAAU;AAAA,IACV,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,UAAU;AAAA,IACV,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,UAAU;AAAA,IACV,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA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KA,CAAS,EAAE,WAAW;AAClD,WAAOC;AAIT,MAAIC,IAAmBD;AACvB,aAAW,CAACE,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAS,GAAG;AAEpD,UAAMK,IAAaF,EAAI,QAAQ,uBAAuB,MAAM,GACtDG,IAAc,IAAI,OAAO,SAASD,CAAU,UAAU,GAAG;AAC/D,IAAAH,IAAmBA,EAAiB,QAAQI,GAAaF,CAAK;AAAA,EAChE;AAEA,SAAOF;AACT;AAcO,SAASK,EAAmBd,GAA2C;AAC5E,MAAKD,EAAmBC,CAAI;AAI5B,WAAOJ,EAAcI,CAAI,EAAE;AAC7B;AAcO,SAASe,EAAcf,GAAuB;AACnD,SAAOc,EAAmBd,CAAI,MAAM;AACtC;AAcO,SAASgB,EAAchB,GAAuB;AACnD,SAAOc,EAAmBd,CAAI,MAAM;AACtC;AAqBO,SAASiB,EACdC,GACAhB,IAAiB,MACG;AACpB,MAAKgB,EAAM;AAIX,WAAOjB,EAAkBiB,EAAM,cAAchB,CAAM;AACrD;"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Supported locale codes for decline code translations
3
+ */
4
+ export type Locale = 'en' | 'ja';
5
+ /**
6
+ * Decline code categories based on Stripe's classification
7
+ */
8
+ export type DeclineCategory = 'SOFT_DECLINE' | 'HARD_DECLINE';
9
+ /**
10
+ * Translation for a specific locale
11
+ */
12
+ export interface Translation {
13
+ description: string;
14
+ nextUserAction: string;
15
+ }
16
+ /**
17
+ * Decline code information including descriptions and recommended actions
18
+ */
19
+ export interface DeclineCodeInfo {
20
+ /** Technical description of why the payment was declined */
21
+ description: string;
22
+ /** Recommended next steps for merchants */
23
+ nextSteps: string;
24
+ /** User-facing message that can be shown to customers */
25
+ nextUserAction: string;
26
+ /** Category of the decline (soft or hard) */
27
+ category: DeclineCategory;
28
+ /** Translations for different locales */
29
+ translations?: Partial<Record<Locale, Translation>>;
30
+ }
31
+ /**
32
+ * Result containing decline code information and metadata
33
+ */
34
+ export interface DeclineCodeResult {
35
+ /** Stripe API documentation version */
36
+ docVersion: string;
37
+ /** Decline code information, or empty object if code not found */
38
+ code: DeclineCodeInfo | Record<string, never>;
39
+ }
40
+ /**
41
+ * Stripe error object with decline code information
42
+ */
43
+ export interface StripeError {
44
+ type?: string;
45
+ decline_code?: string;
46
+ message?: string;
47
+ [key: string]: unknown;
48
+ }
49
+ /**
50
+ * All supported Stripe decline codes
51
+ */
52
+ export type DeclineCode = 'approve_with_id' | 'call_issuer' | 'card_not_supported' | 'card_velocity_exceeded' | 'currency_not_supported' | 'do_not_honor' | 'do_not_try_again' | 'duplicate_transaction' | 'expired_card' | 'fraudulent' | 'generic_decline' | 'incorrect_number' | 'incorrect_cvc' | 'incorrect_pin' | 'incorrect_zip' | 'insufficient_funds' | 'invalid_account' | 'invalid_amount' | 'invalid_cvc' | 'invalid_expiry_year' | 'invalid_number' | 'invalid_pin' | 'issuer_not_available' | 'lost_card' | 'merchant_blacklist' | 'new_account_information_available' | 'no_action_taken' | 'not_permitted' | 'pickup_card' | 'pin_try_exceeded' | 'processing_error' | 'reenter_transaction' | 'restricted_card' | 'revocation_of_all_authorizations' | 'revocation_of_authorization' | 'security_violation' | 'service_not_allowed' | 'stolen_card' | 'stop_payment_order' | 'testmode_decline' | 'transaction_not_allowed' | 'try_again_later' | 'withdrawal_count_limit_exceeded';
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,cAAc,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IA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