@meterbox/react 0.1.17 → 0.1.19

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 CHANGED
@@ -144,7 +144,7 @@ works once the customer has a Stripe account and the tenant has enabled
144
144
  ### `<PlanComparison from to onSwitch? />`
145
145
 
146
146
  Side-by-side comparison of two plan records with added / removed feature
147
- deltas. Pair with `<SubscriptionPreview>` for the prorated math.
147
+ deltas. Pair with `<SubscriptionPreview>` for what the change bills, and when.
148
148
 
149
149
  ### `<CheckoutButton planId successUrl cancelUrl customerId customerToken billingInterval? label? onSession? onError? />`
150
150
 
@@ -158,15 +158,18 @@ doesn't offer it surfaces a 400 via `onError` rather than redirecting.
158
158
  ### `<SubscriptionPreview preview? | customerId customerToken planId planVersion? />`
159
159
 
160
160
  Renders the response of `POST /v1/customers/:id/subscription/preview` (admin)
161
- or `POST /v1/customer-portal/:id/subscription/preview` (customer JWT):
162
- prorated charge, the monthly price before and after, effective date.
161
+ or `POST /v1/customer-portal/:id/subscription/preview` (customer JWT): when
162
+ the change takes effect, the monthly price before and after, and what's
163
+ billed for it and when, as the preview's `billing` says: at checkout, or on
164
+ which invoice (the subscription's next, or period-end close's). `onLoad(preview)`
165
+ gets each body it fetches itself.
163
166
 
164
167
  ### `<PlanChangeCard preview? scheduledChange? allowSchedule? | customerId customerToken planId planVersion? fetch? onConfirm? onCancelScheduled? onChanged? />`
165
168
 
166
169
  Composes `<SubscriptionPreview>` with the actions it doesn't have: actually
167
170
  applying or scheduling the change, and cancelling a pending scheduled one.
168
- Change now and Schedule each ask first (which plan, when, and what's due
169
- today when the preview says) and act only on "Yes, change it".
171
+ Change now and Schedule each ask first (which plan, when, and what's billed
172
+ for it and when, as the preview says) and act only on "Yes, change it".
170
173
  Two modes:
171
174
 
172
175
  - **Presentational**: pass `preview` (already fetched) plus
@@ -176,7 +179,11 @@ Two modes:
176
179
  - **Self-fetching**: `customerId` + `customerToken` + `planId`,
177
180
  no `onConfirm`/`onCancelScheduled` supplied: fetches its own preview AND
178
181
  posts confirm/cancel directly to `POST /v1/customer-portal/:id/subscription/change`
179
- and `DELETE /v1/customer-portal/:id/subscription/scheduled`.
182
+ and `DELETE /v1/customer-portal/:id/subscription/scheduled`. A move onto a
183
+ priced plan that needs a payment method first (the preview's
184
+ `billing.checkout`, or the change's 402 `PAYMENT_REQUIRED`) asks to go to
185
+ checkout instead and starts it (`POST /v1/customer-portal/:id/checkout`),
186
+ back to the same page; there's nothing to schedule then.
180
187
 
181
188
  `scheduledChange` (e.g. from `GET /v1/customer-portal/:id/me`'s
182
189
  `scheduled_change` field) renders a banner with its own Cancel action ahead
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meterbox/react",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "Embeddable React components for Meterbox: pricing tables, subscription preview, credit balance and usage charts. Presentational by default, with data fetched by your backend via @meterbox/node.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://meterbox.ai",
@@ -21,7 +21,7 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@meterbox/node": "0.1.4"
24
+ "@meterbox/node": "0.1.5"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": ">=17",
@@ -136,3 +136,5 @@ function CheckoutButton({
136
136
  }
137
137
 
138
138
  module.exports = CheckoutButton;
139
+ // <PlanChangeCard> starts the same checkout for a plan that needs a payment method first.
140
+ module.exports.startCheckout = startCheckout;
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Composes `<SubscriptionPreview>` with the two actions that were missing
5
5
  * from the customer-portal surface: actually applying or scheduling the
6
- * change, each asked to confirm first (which plan, when, and what's due
7
- * today when the preview says). Previewing a plan change was already
6
+ * change, each asked to confirm first (which plan, when, and what's billed
7
+ * for it and when, as the preview says). Previewing a plan change was already
8
8
  * possible; there was no way for a customer to confirm one without the
9
9
  * host app building its own checkout flow (a NEW Stripe Checkout session —
10
10
  * the wrong primitive for modifying an existing subscription in place).
@@ -22,7 +22,11 @@
22
22
  * `planId`, no `onConfirm`/`onCancelScheduled` supplied. The panel
23
23
  * fetches its own preview AND posts the confirm/cancel actions
24
24
  * directly to `/v1/customer-portal/:id/subscription/change` and
25
- * `/v1/customer-portal/:id/subscription/scheduled`.
25
+ * `/v1/customer-portal/:id/subscription/scheduled`. A move onto a priced
26
+ * plan that needs a payment method first (the preview's
27
+ * `billing.checkout`, or the change's 402 PAYMENT_REQUIRED) goes to
28
+ * Stripe Checkout instead (`/v1/customer-portal/:id/checkout`), back to
29
+ * this page after.
26
30
  *
27
31
  * `scheduledChange` (if the customer already has one pending — from
28
32
  * `GET /v1/customer-portal/:id/me`'s `scheduled_change` field, or the
@@ -41,7 +45,9 @@ const React = require("react");
41
45
  const theme = require("./theme");
42
46
  const { useBaseUrl } = require("./config");
43
47
  const SubscriptionPreview = require("./SubscriptionPreview");
48
+ const { startCheckout } = require("./CheckoutButton");
44
49
  const { useI18n } = require("./i18n");
50
+ const { billed } = require("./billed");
45
51
 
46
52
  const styles = {
47
53
  wrap: {
@@ -111,6 +117,7 @@ async function postChange({ baseUrl, customerId, customerToken, planId, effectiv
111
117
  if (!res.ok) {
112
118
  const err = new Error(body.error || `HTTP ${res.status}`);
113
119
  err.status = res.status;
120
+ err.reason = body.reason;
114
121
  throw err;
115
122
  }
116
123
  return body;
@@ -154,6 +161,8 @@ function PlanChangeCard({
154
161
  const [err, setErr] = React.useState(null);
155
162
  const [message, setMessage] = React.useState(null);
156
163
  const [scheduled, setScheduled] = React.useState(scheduledChange || null);
164
+ // The preview <SubscriptionPreview> fetched, when it fetches its own.
165
+ const [loaded, setLoaded] = React.useState(null);
157
166
  // "now" or "period_end" while the customer is asked to confirm it.
158
167
  const [asking, setAsking] = React.useState(null);
159
168
  // Another plan picked while asking: ask again for that one. Reset as it
@@ -164,6 +173,7 @@ function PlanChangeCard({
164
173
  if (askedFor !== planId) {
165
174
  setAskedFor(planId);
166
175
  setAsking(null);
176
+ setLoaded(null);
167
177
  }
168
178
  const { t, date, money } = useI18n();
169
179
 
@@ -177,12 +187,49 @@ function PlanChangeCard({
177
187
  if (asking) keepRef.current?.focus();
178
188
  }, [asking]);
179
189
 
190
+ const bill = billed(preview || loaded);
191
+ const checkoutFirst = bill?.kind === "checkout" || bill?.kind === "checkout-later";
192
+
180
193
  function ask(effective) {
181
194
  setErr(null);
182
195
  setMessage(null);
183
196
  setAsking(effective);
184
197
  }
185
198
 
199
+ // To Stripe Checkout for the plan, back to this page after.
200
+ async function goToCheckout() {
201
+ const here = globalThis.window?.location?.href;
202
+ const session = await startCheckout({
203
+ baseUrl,
204
+ customerId,
205
+ customerToken,
206
+ planId,
207
+ successUrl: here,
208
+ cancelUrl: here,
209
+ fetchImpl: fetcher,
210
+ });
211
+ if (session.url && globalThis.window) globalThis.window.location.href = session.url;
212
+ return { checkout: true };
213
+ }
214
+
215
+ // The customer's own change, through checkout when it needs a payment method first.
216
+ async function selfServeChange(effective) {
217
+ if (checkoutFirst) return goToCheckout();
218
+ try {
219
+ return await postChange({
220
+ baseUrl,
221
+ customerId,
222
+ customerToken,
223
+ planId,
224
+ effective,
225
+ fetchImpl: fetcher,
226
+ });
227
+ } catch (e) {
228
+ if (e.reason === "PAYMENT_REQUIRED") return goToCheckout();
229
+ throw e;
230
+ }
231
+ }
232
+
186
233
  async function confirm(effective) {
187
234
  if (!planId) return;
188
235
  setErr(null);
@@ -192,15 +239,10 @@ function PlanChangeCard({
192
239
  const result = onConfirm
193
240
  ? await onConfirm(effective)
194
241
  : canSelfFetch
195
- ? await postChange({
196
- baseUrl,
197
- customerId,
198
- customerToken,
199
- planId,
200
- effective,
201
- fetchImpl: fetcher,
202
- })
242
+ ? await selfServeChange(effective)
203
243
  : null;
244
+ // On its way to Stripe: nothing to report here.
245
+ if (result?.checkout) return;
204
246
  if (result?.scheduled) {
205
247
  setScheduled(result.scheduled_change);
206
248
  setMessage(t("planChange.scheduledOn", { date: date(result.scheduled_change.apply_at) }));
@@ -241,17 +283,28 @@ function PlanChangeCard({
241
283
 
242
284
  const ready = Boolean(planId) && (Boolean(onConfirm) || canSelfFetch);
243
285
  // A plan change is charged or changes what the customer gets, so it's asked
244
- // before it's made: which plan, when, and what's due today when known.
245
- const targetName = preview?.target?.name || planId;
246
- const dueToday = preview?.amount_due_usd;
286
+ // before it's made: which plan, when, and what's billed for it and when.
287
+ const targetName = (preview || loaded)?.target?.name || planId;
247
288
  let question = null;
248
289
  if (asking === "period_end") {
249
290
  question = t("planChange.confirmSchedule", { plan: targetName });
250
291
  } else if (asking) {
251
- question =
252
- dueToday > 0
253
- ? t("planChange.confirmNowDue", { plan: targetName, amount: money(dueToday) })
254
- : t("planChange.confirmNow", { plan: targetName });
292
+ const vars = {
293
+ plan: targetName,
294
+ amount: bill && money(bill.amount),
295
+ date: bill?.date && date(bill.date),
296
+ };
297
+ if (bill?.kind === "checkout") question = t("planChange.confirmCheckout", vars);
298
+ else if (bill?.kind === "checkout-later") {
299
+ question =
300
+ bill.amount > 0
301
+ ? t("planChange.confirmCheckoutLater", vars)
302
+ : t("planChange.confirmCheckoutOnly", vars);
303
+ } else if (bill?.kind === "invoice") question = t("planChange.confirmNowInvoice", vars);
304
+ else if (bill?.kind === "credit") question = t("planChange.confirmNowCredit", vars);
305
+ else if (bill?.kind === "due" && bill.amount > 0)
306
+ question = t("planChange.confirmNowDue", vars);
307
+ else question = t("planChange.confirmNow", vars);
255
308
  }
256
309
 
257
310
  return React.createElement(
@@ -288,6 +341,7 @@ function PlanChangeCard({
288
341
  planId,
289
342
  planVersion,
290
343
  fetch: fetchImpl,
344
+ onLoad: setLoaded,
291
345
  }),
292
346
  question
293
347
  ? React.createElement(
@@ -308,7 +362,9 @@ function PlanChangeCard({
308
362
  confirm(effective);
309
363
  },
310
364
  },
311
- t("planChange.confirm"),
365
+ checkoutFirst && asking === "now"
366
+ ? t("planChange.toCheckout")
367
+ : t("planChange.confirm"),
312
368
  ),
313
369
  React.createElement(
314
370
  "button",
@@ -335,7 +391,9 @@ function PlanChangeCard({
335
391
  },
336
392
  busy ? t("planChange.working") : t("planChange.now"),
337
393
  ),
394
+ // Paid for at checkout, it applies then: there's nothing to schedule.
338
395
  allowSchedule &&
396
+ !checkoutFirst &&
339
397
  React.createElement(
340
398
  "button",
341
399
  {
@@ -16,13 +16,18 @@
16
16
  * The component calls `POST /v1/customer-portal/:id/subscription/preview`
17
17
  * directly with the customer-scoped JWT (no admin key in the browser).
18
18
  * Loading + error states are surfaced inline. Re-fetches when
19
- * `customerId` or `planId` change.
19
+ * `customerId` or `planId` change; `onLoad(preview)` gets each body.
20
+ *
21
+ * Shows when the change takes effect and what's billed for it, when: at
22
+ * checkout, or on which invoice (the subscription's next, or period-end
23
+ * close's), as the preview's `billing` says.
20
24
  */
21
25
 
22
26
  const React = require("react");
23
27
  const theme = require("./theme");
24
28
  const { useBaseUrl } = require("./config");
25
29
  const { useI18n } = require("./i18n");
30
+ const { billed } = require("./billed");
26
31
 
27
32
  const styles = {
28
33
  panel: {
@@ -88,9 +93,13 @@ function SubscriptionPreview({
88
93
  planId,
89
94
  planVersion,
90
95
  fetch: fetchImpl,
96
+ onLoad,
91
97
  }) {
92
98
  const baseUrl = useBaseUrl(baseUrlProp);
93
99
  const selfFetch = !preview && customerId && customerToken && planId;
100
+ // The latest onLoad, so a new function each render doesn't refetch.
101
+ const onLoadRef = React.useRef(onLoad);
102
+ onLoadRef.current = onLoad;
94
103
  const [fetched, setFetched] = React.useState(null);
95
104
  const [error, setError] = React.useState(null);
96
105
  const [loading, setLoading] = React.useState(false);
@@ -113,6 +122,7 @@ function SubscriptionPreview({
113
122
  if (!cancelled) {
114
123
  setFetched(body);
115
124
  setLoading(false);
125
+ if (typeof onLoadRef.current === "function") onLoadRef.current(body);
116
126
  }
117
127
  })
118
128
  .catch((err) => {
@@ -159,8 +169,13 @@ function SubscriptionPreview({
159
169
  "new_mrr_usd" in data ? data.new_mrr_usd : (data.proration?.new_plan_prorated_usd ?? null);
160
170
  const prevMrr = current ? current.price_monthly_usd : null;
161
171
  const mrrDelta = newMrr != null && prevMrr != null ? newMrr - prevMrr : null;
162
- const amountDue = data.amount_due_usd ?? null;
163
- const period = data.period || null;
172
+ const bill = billed(data);
173
+ let billLabel = null;
174
+ if (bill?.kind === "checkout") billLabel = t("preview.dueAtCheckout");
175
+ else if (bill?.kind === "credit")
176
+ billLabel = t("preview.creditOnInvoice", { date: date(bill.date) });
177
+ else if (bill?.kind === "due") billLabel = t("preview.amountDue");
178
+ else if (bill) billLabel = t("preview.onInvoice", { date: date(bill.date) });
164
179
  return React.createElement(
165
180
  "div",
166
181
  { className: "meterbox-subscription-preview", style: styles.panel },
@@ -178,13 +193,12 @@ function SubscriptionPreview({
178
193
  React.createElement("span", { style: styles.label }, t("preview.to")),
179
194
  React.createElement("span", { style: styles.value }, target.name || target.plan_id),
180
195
  ),
181
- period &&
182
- period.start &&
196
+ data.effective_at &&
183
197
  React.createElement(
184
198
  "div",
185
199
  { style: styles.row },
186
200
  React.createElement("span", { style: styles.label }, t("preview.effective")),
187
- React.createElement("span", { style: styles.value }, date(period.start)),
201
+ React.createElement("span", { style: styles.value }, date(data.effective_at)),
188
202
  ),
189
203
  prevMrr != null &&
190
204
  React.createElement(
@@ -211,12 +225,12 @@ function SubscriptionPreview({
211
225
  ),
212
226
  ),
213
227
  ),
214
- amountDue != null &&
228
+ bill &&
215
229
  React.createElement(
216
230
  "div",
217
231
  { style: styles.total },
218
- React.createElement("span", null, t("preview.dueToday")),
219
- React.createElement("span", null, money(amountDue)),
232
+ React.createElement("span", null, billLabel),
233
+ React.createElement("span", null, money(bill.amount)),
220
234
  ),
221
235
  );
222
236
  }
@@ -97,7 +97,7 @@ function TrialBanner({
97
97
  const remaining = daysRemaining(data.trial_ends_at);
98
98
  const expired = remaining <= 0;
99
99
  const text = expired
100
- ? "Your trial has ended — convert now to keep your plan active."
100
+ ? "Your trial has ended. Upgrade now to keep your plan active."
101
101
  : `Your trial ends in ${remaining} day${remaining === 1 ? "" : "s"}.`;
102
102
 
103
103
  return React.createElement(
package/src/billed.js ADDED
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What a plan-change preview (`POST .../subscription/preview`) says is billed
3
+ * for the change, and when, read the same way by `<SubscriptionPreview>` and
4
+ * `<PlanChangeCard>`. `kind` is:
5
+ * - "checkout": paid at Stripe Checkout, now
6
+ * - "checkout-later": a payment method added at checkout, `amount` billed
7
+ * on `date` (after a trial, or by period-end close)
8
+ * - "invoice": `amount` on the invoice of `date`
9
+ * - "credit": `amount` credited on the invoice of `date`
10
+ * - "due": an older API's amount due, with no when
11
+ * Null when nothing is billed for it.
12
+ */
13
+ function billed(preview) {
14
+ if (!preview) return null;
15
+ const amount = preview.amount_due_usd;
16
+ const b = preview.billing;
17
+ if (!b) return amount == null ? null : { kind: "due", amount };
18
+ if (b.checkout) {
19
+ const now = b.billed_at === preview.effective_at;
20
+ return { kind: now ? "checkout" : "checkout-later", amount, date: b.billed_at };
21
+ }
22
+ if (!b.billed_at) return null;
23
+ if (amount > 0) return { kind: "invoice", amount, date: b.billed_at };
24
+ const total =
25
+ Math.round((preview.line_items || []).reduce((s, l) => s + l.amount_usd, 0) * 100) / 100;
26
+ return total < 0 ? { kind: "credit", amount: -total, date: b.billed_at } : null;
27
+ }
28
+
29
+ module.exports = { billed };
package/src/i18n.js CHANGED
@@ -41,7 +41,7 @@ const en = {
41
41
  "plans.loading": "Loading plans…",
42
42
  "plans.error": "Could not load plans.",
43
43
  "plans.annualNote":
44
- "Cost preview isn't available for annual billing yet — the amount due will be confirmed at checkout.",
44
+ "Cost preview isn't available for annual billing yet. The amount due will be confirmed at checkout.",
45
45
  "plans.noFixedPrice": "{plan} has no fixed price. Get in touch to move to it.",
46
46
 
47
47
  "cancel.button": "Cancel subscription",
@@ -113,7 +113,17 @@ const en = {
113
113
  "planChange.now": "Change now",
114
114
  "planChange.schedule": "Schedule for end of period",
115
115
  "planChange.confirmNow": "Change your plan to {plan} now?",
116
- "planChange.confirmNowDue": "Change your plan to {plan} now? {amount} is charged today.",
116
+ "planChange.confirmNowDue": "Change your plan to {plan} now? {amount} is due.",
117
+ "planChange.confirmNowInvoice":
118
+ "Change your plan to {plan} now? {amount} is added to your {date} invoice.",
119
+ "planChange.confirmNowCredit":
120
+ "Change your plan to {plan} now? {amount} is credited on your {date} invoice.",
121
+ "planChange.confirmCheckout": "Change your plan to {plan}? You'll pay {amount} at checkout.",
122
+ "planChange.confirmCheckoutLater":
123
+ "Change your plan to {plan}? You'll add a payment method at checkout, and {amount} is billed on {date}.",
124
+ "planChange.confirmCheckoutOnly":
125
+ "Change your plan to {plan}? You'll add a payment method at checkout.",
126
+ "planChange.toCheckout": "Yes, go to checkout",
117
127
  "planChange.confirmSchedule": "Change your plan to {plan} at the end of this billing period?",
118
128
  "planChange.confirm": "Yes, change it",
119
129
  "planChange.keep": "Keep my plan",
@@ -126,7 +136,10 @@ const en = {
126
136
  "preview.effective": "Effective",
127
137
  "preview.mrrNow": "Monthly price now",
128
138
  "preview.mrrAfter": "Monthly price after",
129
- "preview.dueToday": "Prorated charge today",
139
+ "preview.amountDue": "Amount due",
140
+ "preview.dueAtCheckout": "Due at checkout",
141
+ "preview.onInvoice": "On your {date} invoice",
142
+ "preview.creditOnInvoice": "Credit on your {date} invoice",
130
143
 
131
144
  "credits.balance": "Credit balance",
132
145
  "credits.balanceLoading": "Loading credit balance…",
@@ -271,7 +284,17 @@ const es = {
271
284
  "planChange.now": "Cambiar ahora",
272
285
  "planChange.schedule": "Programar para el final del período",
273
286
  "planChange.confirmNow": "¿Cambiar tu plan a {plan} ahora?",
274
- "planChange.confirmNowDue": "¿Cambiar tu plan a {plan} ahora? Hoy se cobran {amount}.",
287
+ "planChange.confirmNowDue": "¿Cambiar tu plan a {plan} ahora? Se deben {amount}.",
288
+ "planChange.confirmNowInvoice":
289
+ "¿Cambiar tu plan a {plan} ahora? Se suman {amount} a tu factura del {date}.",
290
+ "planChange.confirmNowCredit":
291
+ "¿Cambiar tu plan a {plan} ahora? Se abonan {amount} en tu factura del {date}.",
292
+ "planChange.confirmCheckout": "¿Cambiar tu plan a {plan}? Pagarás {amount} en la página de pago.",
293
+ "planChange.confirmCheckoutLater":
294
+ "¿Cambiar tu plan a {plan}? Añadirás un método de pago en la página de pago, y se facturan {amount} el {date}.",
295
+ "planChange.confirmCheckoutOnly":
296
+ "¿Cambiar tu plan a {plan}? Añadirás un método de pago en la página de pago.",
297
+ "planChange.toCheckout": "Sí, ir a la página de pago",
275
298
  "planChange.confirmSchedule":
276
299
  "¿Cambiar tu plan a {plan} al final de este período de facturación?",
277
300
  "planChange.confirm": "Sí, cambiarlo",
@@ -285,7 +308,10 @@ const es = {
285
308
  "preview.effective": "Vigente desde",
286
309
  "preview.mrrNow": "Precio mensual actual",
287
310
  "preview.mrrAfter": "Precio mensual después",
288
- "preview.dueToday": "Cargo prorrateado hoy",
311
+ "preview.amountDue": "Importe a pagar",
312
+ "preview.dueAtCheckout": "A pagar en la página de pago",
313
+ "preview.onInvoice": "En tu factura del {date}",
314
+ "preview.creditOnInvoice": "Abono en tu factura del {date}",
289
315
 
290
316
  "credits.balance": "Saldo de créditos",
291
317
  "credits.balanceLoading": "Cargando el saldo de créditos…",
@@ -430,8 +456,18 @@ const fr = {
430
456
  "planChange.now": "Changer maintenant",
431
457
  "planChange.schedule": "Programmer en fin de période",
432
458
  "planChange.confirmNow": "Passer au forfait {plan} maintenant ?",
433
- "planChange.confirmNowDue":
434
- "Passer au forfait {plan} maintenant ? {amount} sera facturé aujourd'hui.",
459
+ "planChange.confirmNowDue": "Passer au forfait {plan} maintenant ? {amount} est dû.",
460
+ "planChange.confirmNowInvoice":
461
+ "Passer au forfait {plan} maintenant ? {amount} s'ajoute à votre facture du {date}.",
462
+ "planChange.confirmNowCredit":
463
+ "Passer au forfait {plan} maintenant ? {amount} est crédité sur votre facture du {date}.",
464
+ "planChange.confirmCheckout":
465
+ "Passer au forfait {plan} ? Vous réglerez {amount} sur la page de paiement.",
466
+ "planChange.confirmCheckoutLater":
467
+ "Passer au forfait {plan} ? Vous ajouterez un moyen de paiement sur la page de paiement, et {amount} est facturé le {date}.",
468
+ "planChange.confirmCheckoutOnly":
469
+ "Passer au forfait {plan} ? Vous ajouterez un moyen de paiement sur la page de paiement.",
470
+ "planChange.toCheckout": "Oui, aller au paiement",
435
471
  "planChange.confirmSchedule":
436
472
  "Passer au forfait {plan} à la fin de cette période de facturation ?",
437
473
  "planChange.confirm": "Oui, changer",
@@ -445,7 +481,10 @@ const fr = {
445
481
  "preview.effective": "Prend effet",
446
482
  "preview.mrrNow": "Prix mensuel actuel",
447
483
  "preview.mrrAfter": "Prix mensuel après",
448
- "preview.dueToday": "Montant au prorata aujourd'hui",
484
+ "preview.amountDue": "Montant dû",
485
+ "preview.dueAtCheckout": "À régler sur la page de paiement",
486
+ "preview.onInvoice": "Sur votre facture du {date}",
487
+ "preview.creditOnInvoice": "Crédit sur votre facture du {date}",
449
488
 
450
489
  "credits.balance": "Solde de crédits",
451
490
  "credits.balanceLoading": "Chargement du solde de crédits…",
@@ -591,7 +630,17 @@ const de = {
591
630
  "planChange.now": "Jetzt wechseln",
592
631
  "planChange.schedule": "Zum Ende des Zeitraums planen",
593
632
  "planChange.confirmNow": "Jetzt zum Tarif {plan} wechseln?",
594
- "planChange.confirmNowDue": "Jetzt zum Tarif {plan} wechseln? Heute werden {amount} berechnet.",
633
+ "planChange.confirmNowDue": "Jetzt zum Tarif {plan} wechseln? Fällig sind {amount}.",
634
+ "planChange.confirmNowInvoice":
635
+ "Jetzt zum Tarif {plan} wechseln? {amount} kommen auf Ihre Rechnung vom {date}.",
636
+ "planChange.confirmNowCredit":
637
+ "Jetzt zum Tarif {plan} wechseln? {amount} werden auf Ihrer Rechnung vom {date} gutgeschrieben.",
638
+ "planChange.confirmCheckout": "Zum Tarif {plan} wechseln? Sie zahlen {amount} an der Kasse.",
639
+ "planChange.confirmCheckoutLater":
640
+ "Zum Tarif {plan} wechseln? Sie hinterlegen an der Kasse eine Zahlungsmethode, und {amount} werden am {date} berechnet.",
641
+ "planChange.confirmCheckoutOnly":
642
+ "Zum Tarif {plan} wechseln? Sie hinterlegen an der Kasse eine Zahlungsmethode.",
643
+ "planChange.toCheckout": "Ja, zur Kasse",
595
644
  "planChange.confirmSchedule": "Zum Ende dieses Abrechnungszeitraums zum Tarif {plan} wechseln?",
596
645
  "planChange.confirm": "Ja, wechseln",
597
646
  "planChange.keep": "Tarif behalten",
@@ -604,7 +653,10 @@ const de = {
604
653
  "preview.effective": "Gültig ab",
605
654
  "preview.mrrNow": "Monatspreis jetzt",
606
655
  "preview.mrrAfter": "Monatspreis danach",
607
- "preview.dueToday": "Anteilige Gebühr heute",
656
+ "preview.amountDue": "Fälliger Betrag",
657
+ "preview.dueAtCheckout": "Fällig an der Kasse",
658
+ "preview.onInvoice": "Auf Ihrer Rechnung vom {date}",
659
+ "preview.creditOnInvoice": "Gutschrift auf Ihrer Rechnung vom {date}",
608
660
 
609
661
  "credits.balance": "Guthaben",
610
662
  "credits.balanceLoading": "Guthaben wird geladen…",