aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-07-14 22:06:25 -0700
committerAdam Soltys <[email protected]>2026-07-14 22:06:25 -0700
commit81c3593f1eec7f94dc9cbc22edc3456fa57b95cb (patch)
tree731ca6c880d7a6dc4d29ad4f28d156fb69720b72 /index.ts
parent0d55c0ccceb378a9c1992f6e7d82a6786cdd19b8 (diff)
downloadcoinos-server-81c3593f1eec7f94dc9cbc22edc3456fa57b95cb.tar.gz
coinos-server-81c3593f1eec7f94dc9cbc22edc3456fa57b95cb.zip
preimages: support fiat prices, converted at invoice-creation time
POST /preimages now accepts fiat + optional currency (defaults to the merchant's) as an alternative to a sat price. The fiat amount is stored per entry and converted to sats at the moment a usePreimage invoice is created, so the price tracks the exchange rate instead of freezing at upload time. The invoice also takes on the entry's currency and rate so receipts display the fiat price exactly as the merchant set it. If no rate is available for the entry's currency, the preimage is pushed back onto the queue and creation fails rather than issuing an any-amount invoice. Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'index.ts')
0 files changed, 0 insertions, 0 deletions