Payment instalments plan schedule — Storefront block
Prostorefront-payment-instalments-plan-schedule · for checkout pages
Payment instalments plan schedule
The provider offers pay-in-full or N payments: the chosen plan shows its dated schedule and any extra cost
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/storefront-payment-instalments-plan-scheduleUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontPaymentInstalmentsPlanSchedule from '@/components/trame/blocks/storefront/storefront-payment-instalments-plan-schedule.vue'
const props = {
title: "Payment",
intro: "Choose how to pay for your order.",
total: 25930,
methods: [
{
id: "apple-pay",
label: "Apple Pay",
kind: "wallet"
},
{
id: "paypal-express",
label: "PayPal",
kind: "wallet"
}
],
plans: [
{
id: "x3",
label: "Pay in 3 installments",
count: 3,
amount: 8644,
total: 25930,
extra: 0,
schedule: [
{
date: "Today",
amount: 8646
},
{
date: "November 12",
amount: 8642
}
]
},
{
id: "x10",
label: "Pay in 10 installments",
count: 10,
amount: 2760,
total: 27600,
extra: 1670,
apr: "14.2%",
schedule: [
{
date: "Today",
amount: 2760
},
{
date: "November 12",
amount: 2760
}
]
}
],
action: {
label: "Pay",
action: "place-order"
},
reassurance: "Your card is charged when your order ships. Refunds within 5 business days if you return it.",
options: {
saveCard: true,
simulated: true
}
}
</script>
<template>
<StorefrontPaymentInstalmentsPlanSchedule v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe step’s heading ("Payment") |
| intro | string | Wordsone line above the choice |
| total* | number | Datathe cart total in cents, from the server |
| methods* | Method[] | Datathe methods the merchant has configured: none offered, none shown |
| plans* | Plan[] | Datainstalment plans offered by the provider for this cart |
| action | Action | the call to action: its words and the page action it runs |
| reassurance | string | Wordsthe merchant’s real payment policy, one sentence, near the button ("Charged at shipping.") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Method methods[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | the method’s id |
| label* | string | the method’s name, as shown |
| kind* | 'wallet' | 'card' | 'paypal' | 'transfer' | 'other' | what kind of method it is: wallet, card, paypal, transfer, other |
| note | string | one sentence on how it works; for a transfer, the instructions |
Plan plans[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id* | string | the plan’s id |
| label* | string | "Pay in 3 instalments" |
| count* | number | how many, as the host counted them |
| amount* | number | cents per payment |
| total* | number | cents, all payments together |
| extra | number | cents the plan costs over the cart price; 0 only when the provider says it is free |
| apr | string | the rate as the provider states it |
| schedule | Schedule[] | the instalments, each a date and an amount |
Schedule plans[].schedule[] · 2 props
| Prop | Type | Description |
|---|---|---|
| date* | string | when it is charged, as the shop writes it |
| amount* | number | the instalment in cents |
Action action · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe pay button’s verb ("Pay") |
| action* | string | Actionpays: `{ method, plan, saveCard? }` (plan: `full` or the plan’s id); without act the form posts them to its address |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| saveCard | boolean | offer "save this card" (unchecked by default) |
| simulated | boolean | payments are a demo: say it plainly |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| money | formats a price, given in cents |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
checkout.pay - Reads
payment_methodsfrom your app
A storefront section, for checkout pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
More storefront blocks
- Party details lead plus names: the one who books in a full form, then the others as one compact roster, a row per guest: a larger party where only names (or a meal choice) are needed of the rest.
- Party details per person: a card per guest, the one who books first with every field, the others with theirs, each added or removed in place beside the booking’s summary: a small party whose guests each need a few details.
- Past lookbooks covers grid: past lookbooks as a grid of covers with their season and status: the archive of a brand that has history.
- Payment explainer numbered rows: a trust section of the shop: what we see, what we keep, what cannot leak, as numbered rows.
- Payment methods radio accordion: several unlike methods (card, PayPal, transfer): each a row that opens only its own fields.
- Payment methods wallets then card: the shop takes wallets: express buttons first, a divider, then a card panel that can fold.
- Payment recovery actions list: a page of its own after a declined or failed payment: what happened, then up to three ways forward as stacked rows.
- Payment recovery inline banner: a compact banner above the payment form when recovery happens in place: it takes the focus so the message is read.