All products

Build a customer credit wallet with AI

Add prepaid balances to a commerce app using an append-only ledger. Track credits, holds, spending and refunds by currency with stable references for repeat payment events.

Build a customer credit wallet with AI when customers need to spend prepaid credit or retain a refund for a later purchase. The ledger-wallet skill guides a design in which each movement has a durable reference and each currency has its own balance. Corrections add evidence to the ledger instead of erasing an older entry.

A payment provider may deliver a successful top-up notification more than once. The wallet should recognise the same reference and credit it once. A mixed payment adds another case: hold the wallet portion while a card payment is pending, then settle or release it according to the confirmed outcome.

What it does

  • Record credits and debits in an append-only history.
  • Keep a separate balance for each supported currency.
  • Handle repeated top-up notifications without duplicate credit.
  • Reserve wallet funds for a mixed payment.
  • Trace a refund or adjustment to its original transaction.

Install and use

  1. Install the skill in a coding agent with an authenticated commerce app, a transactional database and a Stripe test account for the top-up flow. Keep payment credentials and webhook verification on the server.
  2. Ask, “Build a test wallet in two currencies. Demonstrate that repeated confirmation of one top-up never credits the account twice.”
  3. Reconcile the ledger with test payments, cancellations and refunds before enabling any live financial operation.

FAQ

Source

Made by Timerise. Original skill: ledger-wallet, published on GitHub under the MIT licence.

View on GitHub