Response format
Partner API errors use an error object with code, message, and request_id. Every response also includes X-Request-Id. Request validation errors use the standard FastAPI 422 body, {"detail": [...]}. While the partner platform is disabled, routes return 404 {"detail":"Not Found"}.
Partner error response
{
"error": {
"code": "payment_refused",
"message": "The payment could not be started.",
"request_id": "req_example"
}
}Error codes
| HTTP | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_embed_origin | Widget embed_origin is not an https://host origin. | Fix how the embedding page origin is derived. |
| 400 | idempotency_key_required | A required create/payment request omitted its key. | Send the same Idempotency-Key when retrying the same attempt. |
| 400 | payment_refused | Checkout refused the payment; message explains why. | Show the message to the payer. |
| 400 | sandbox_test_number_required | The sandbox received a non-test number. | Use one of the sandbox numbers. |
| 400 | wrong_mode_for_deployment | A key mode cannot be issued on this deployment. | Create the key on the matching deployment. |
| 401 | api_key_required | A widget request omitted its key. | Provide the publishable key. |
| 401 | invalid_api_key | The key is unknown or revoked. | Check the key and replace it if revoked. |
| 401 | wrong_key_type | The request used the wrong key type. | Use a secret key for server API routes or publishable key for widget routes. |
| 401 | secret_key_in_browser | A secret key arrived with an Origin header. | Move the request to your server and rotate an exposed key. |
| 403 | developer_not_active | Developer access is not approved or is suspended. | Check access status in the organizer dashboard. |
| 403 | origin_not_allowed | A widget call did not come from PrinPoll's embed page. | Use the supplied PrinPoll iframe flow. |
| 403 | domain_not_allowed | The embedding domain is not allowed. | Add the https domain in widget settings. |
| 403 | widget_not_enabled | The developer has disabled the widget. | Enable it in widget settings. |
| 403 | test_key_on_live | A test key was sent to production. | Use the sandbox API. |
| 403 | live_key_on_sandbox | A live key was sent to the sandbox. | Use a test key or production API. |
| 403 | unpublished_by_admin | An admin unpublished this API event. | Contact PrinPoll; only an admin can republish it. |
| 404 | event_not_available | The event is not available to the widget. | Check event ownership, publish state, readiness, and widget settings. |
| 404 | results_not_available | The vote event does not expose public results. | Hide the results view. |
| 404 | not_found | The requested resource or payment is not available to this developer. | Check the ID and refresh the resource. |
| 409 | wrong_event_type | The operation does not match the event type. | Use the vote or ticket operation for that event. |
| 409 | event_offline | The API event is unpublished or otherwise offline. | Bring the event online before accepting payments. |
| 409 | event_not_ready | The event has no approved nominee or ticket type. | Add the required event content first. |
| 409 | premium_ticket_plan_missing | The Premium ticket plan is unavailable. | Contact PrinPoll. |
| 409 | request_in_progress | The same idempotency key is still processing. | Retry after the response's Retry-After interval. |
| 422 | idempotency_key_reused | The same key was reused with a different request body. | Use a new key for a new purchase attempt. |
| 429 | rate_limited | A documented request or payment limit was reached. | Wait for Retry-After before retrying. |
| 503 | momo_unavailable | The mobile-money provider is unavailable. | Retry later with the same idempotency key. |
| 503 | rate_limiter_unavailable | The platform could not check rate limits. | Retry later; the request is not allowed through unmetered. |
| 503 | keys_not_configured | Key authentication or creation is not available. | Contact PrinPoll. |
| 503 | sandbox_misconfigured | The sandbox payment service is not configured safely. | Contact PrinPoll; do not retry against production. |
The widget contract also documents 5xx responses for momo_unavailable, rate_limiter_unavailable, and keys_not_configured. Other server errors may be temporary; use a safe retry strategy.
Validation errors
A 422 response uses {"detail": [...]} for an invalid or missing field or parameter. Check each detail entry and correct the request before retrying. Do not retry an unchanged validation error.
Request IDs
Include request_id from the JSON body or X-Request-Id from the response headers when asking PrinPoll support about a failed request.