Money
Every amount is an integer in pesewas. GHS 10.00 is 1000. There are no cedi strings in the API.
Show money in your app by dividing by 100. When a customer types GHS 10.00, multiply by 100 and round to a whole number before you send it.
Do not add or compare amounts with floating-point numbers — you will drift by a pesewa.
Example — create session with pesewas
POST/v1/payments/sessions
Auth: Authorization: Bearer sk_test_ or sk_live_
Request body
{
"msisdn": "233244123456",
"amount_minor": 1000,
"network": "mtn"
}201
{
"goods_minor": 1000,
"amount_minor": 1000
}curl 'https://api.payloqa.com/v1/payments/sessions' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer sk_test_...' \
-H 'Idempotency-Key: pay-create-001' \
-d '{
"msisdn": "233244123456",
"amount_minor": 1000,
"network": "mtn"
}'Helpers (yours to copy)
These snippets are educational. Payloqa does not require an SDK. Put the equivalent in your app.
curl 'https://api.payloqa.com/v1/payments/sessions' \
-X POST \
-H 'Authorization: Bearer sk_test_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 8f3c1a2e-4b9d-4e11-9c0a-2d6f8a1b7c3e' \
-d '{
"msisdn": "233244123456",
"amount_minor": 1000,
"network": "mtn"
}'
# 1000 pesewas = GHS 10.00
# Never send 10.00 or 10 in amount_minor