A one-time payment with Stripe Checkout in test mode.
Version 1 · Stripe Checkout, test modeDesigned, not builtModule 7 of 15
DesignUI ComponentsSections
UI Components Live gallery
What the Payment service ships for apps to use, as the package packages/ui-payment.
Each built component is shown live, from its package, in each of its states. Pick a state to see it; every state has its own stand-in for the service's API, with made-up data (CORE-V1-E0-19).
Components call only the Payment API, and only to read: creating an order is an app's server's job, so no browser code can set a price.
They ship as the package packages/ui-payment and show any order an app describes.
In version 1 a test-mode banner is always shown next to any Pay button.
Amounts are formatted from minor units with the order's currency, never computed in the browser.
Every request has a loading state that keeps the layout still, and a failure state with a plain-language message and a retry.
Keyboard reachable, visible focus, labelled controls, status changes announced to screen readers, WCAG AA contrast, usable at 320 pixels wide, in light and dark mode.
PaymentSummary
Component
What is being bought, the price, the test-mode banner and the Pay button.
Inputs
descriptionstring
What the person pays for.
amount, currencynumber, string
The price in minor units.
onPay() => Promise<string>
Called on Pay; the app's server creates the order and returns the checkout address to go to.
States
Ready
Working: the button disabled while the app creates the order
Cancelled: 'Payment cancelled — you haven't been charged'
Failed: the message and Pay again
Calls
None directly: the app's onPay calls its server, which calls POST /orders.
●LiveFrom the package, synthetic data
Unlock your downloads
DocFlow results for invoice-nw-0187.pdf$5.00
!
Test modeNo real payment is taken. Use the test card 4242 4242 4242 4242, any future date and any CVC.
TestModeBanner
Component
'Test mode — use card 4242 4242 4242 4242, any future date, any CVC'.
Inputs
States
Shown
Calls
None.
●LiveFrom the package, synthetic data
!
Test modeNo real payment is taken. Use the test card 4242 4242 4242 4242, any future date and any CVC.
OrderStatus
Component
Follows an order until it is paid, expired or failed, for a success page.
Inputs
orderIdstring
The order.
timeoutSecondsnumber, optional
How long to keep checking. Default 30.
onSettled(order) => void
Called when the order is no longer pending, or on timeout.
States
Confirming: 'Confirming payment…'
Paid
Expired
Failed
Timed out: still pending after the limit
Calls
GET /orders/{orderId} every 2 seconds
●LiveFrom the package, synthetic data
Confirming payment…
OrderList
Component
The person's orders with date, description, amount and status, for an account page.
Inputs
pageSizenumber, optional
Default 20.
States
Loading
Empty: 'No payments yet.'
Loaded, with Load more
Failed: Retry
Calls
GET /orders
●LiveFrom the package, synthetic data
Pages provided by Stripe in version 1
These are Stripe's pages, not 01scale components.
Stripe Checkout
Where the person enters a card and pays. Stripe's page, at checkout.stripe.com: card details never reach 01scale.