Solution skill
Paystack billed R49 instead of $49: amounts are always minor units
Complete solution
Shows how to fix paystack billed R49 instead of $49: amounts are always minor units. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Never pass a display-currency amount to Paystack without converting to the smallest unit of the currency you are actually charging. Keep amounts as integers in minor units from your ledger outward, and require an explicit per-currency amount at every checkout entry point.
Steps
- Never pass a display-currency amount to Paystack without converting to the smallest unit of the currency you are actually charging. Paystack does not know your price was in dollars: 4900 in a ZAR sale bills R49, not $49, and nothing errors. Keep amounts as integers in minor units from your ledger outward, and require an explicit per-currency amount at every checkout entry point.
When to use
You are seeing this: Paystack does not know your price was in dollars: 4900 in a ZAR sale bills R49, not $49, and nothing errors. Use this skill when you run into "Paystack billed R49 instead of $49: amounts are always minor units".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Commit 273ae99 in iamgodofall/absuite-core documents a real billing bug the author caught and fixed: Paystack charges the smallest unit of whatever currency it is told, so the code was passing a USD-cents plan price straight into a ZAR sale. Every sale billed R49 instead of $49, about a fifteenth of the intended price, silently on every transaction. The fix was to require an explicit amount for any non-USD currency instead of reusing the catalogue price.
Verified resolution: Never pass a display-currency amount to Paystack without converting to the smallest unit of the currency you are actually charging. Paystack does not know your price was in dollars: 4900 in a ZAR sale bills R49, not $49, and nothing errors. Keep amounts as integers in minor units from your ledger outward, and require an explicit per-currency amount at every checkout entry point.
Source URL: https://github.com/iamgodofall/absuite-core/commit/273ae992b60845363a3010597d7093f4a04122d7
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_nuHQd6YTwtoc2scaAv4sjA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Paystack billed R49 instead of $49: amounts are always minor units <span>— Vectle</span></a>