Start a payment
POST /payments starts a Ghana mobile-money prompt through the existing PrinPoll checkout. The request supports vote and ticket purchases; network is mtn, telecel, or airteltigo. Amount is integer pesewas, must match the selected votes/package or ticket total, and the documented checkout range is GHS 1–5,000.
Start a payment
curl --request POST \
'https://api.prinpoll.com/api/partner/v1/payments' \
--header 'Authorization: Bearer sk_live_xxx' \
--header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
--header 'Content-Type: application/json' \
--data '{
"type": "vote",
"event_id": "EVENT_ID",
"nominee_id": "NOMINEE_ID",
"votes": 3,
"amount": 300,
"phone_number": "PAYER_PHONE_NUMBER",
"network": "mtn"
}'Payment statuses
| Status | Meaning |
|---|---|
| pending | Waiting for the payer to approve the mobile-money prompt. |
| success | Paid and recorded; votes counted or tickets issued. |
| failed | The payment was declined or failed. |
| expired | The prompt was not answered in time (5 minutes); if approved later, the payment is still recorded. |
A status response includes reference, message, kind, amount, currency, event_id, channel, a masked phone_number, network, status_url, sandbox, and created_at.
Poll for completion
Use GET /payments/{reference} to check status. Poll every few seconds, stop at success, failed, or expired, and show the response message to the payer. The widget contract advises polling no faster than every 3 seconds.
Check payment status
curl --request GET \
'https://api.prinpoll.com/api/partner/v1/payments/PAYMENT_REFERENCE' \
--header 'Authorization: Bearer sk_live_xxx'List payments
GET /payments lists payments from your API and widget, newest first. Optional event_id and status filters are available; limit and starting_after paginate the results. Phone numbers are masked.