All Simiz API errors follow a consistent format. This page documents every error code and how to resolve them.

Error response format

{
  "error": {
    "code": "insufficient_balance",
    "message": "Customer has insufficient balance",
    "type": "payment_error",
    "http_status": 400,
    "request_id": "req_abc123"
  }
}
FieldDescription
codeMachine-readable error code
messageHuman-readable description
typeError category
http_statusHTTP status code
request_idUnique request ID for debugging

Authentication errors

CodeHTTPDescriptionSolution
invalid_api_key401The API key is invalid or doesn’t existCheck you’re using the correct key (test vs live)
expired_api_key401The API key has expiredRegenerate a key from your Dashboard
insufficient_permissions403The key doesn’t have the required permissionsCheck key permissions or contact support

Payment errors

CodeHTTPDescriptionSolution
insufficient_balance400Customer’s wallet balance is too lowInform customer to top up their wallet
invalid_phone400Phone number is invalid or doesn’t match the providerValidate the format (e.g., 237XXXXXXXXX)
transaction_limit400Transaction exceeds daily/monthly limitSplit the payment or wait for limit reset
payment_expired400Payment confirmation timeout (15 min)Create a new payment
payment_cancelled400Customer cancelled the paymentOffer the customer to retry
duplicate_transaction409A transaction with this reference already existsUse a unique idempotency key

Validation errors

CodeHTTPDescriptionSolution
invalid_amount400Amount is outside allowed rangeEnsure amount is between 100 and 5,000,000
invalid_currency400Currency is not supportedUse XAF or XOF
missing_required_field400A required field is missingCheck all required fields are included
invalid_email400Email format is invalidValidate email format

Provider errors

CodeHTTPDescriptionSolution
provider_unavailable503Mobile Money provider is downRetry after a few minutes
provider_timeout504Provider didn’t respond in timeRetry the transaction
pin_error400Customer entered the wrong PINCustomer should retry with correct PIN
account_inactive400Customer’s mobile wallet is inactiveCustomer should contact their operator
service_suspended403Provider’s service is temporarily suspendedContact support

Rate limiting errors

CodeHTTPDescriptionSolution
rate_limit_exceeded429API rate limit exceededWait and retry with exponential backoff
too_many_requests429Too many requests in a short periodImplement backoff, see Rate Limiting

Internal errors

CodeHTTPDescriptionSolution
internal_error500An internal server error occurredRetry the request. Contact support if persistent
service_unavailable503Simiz is temporarily unavailableRetry after a few minutes

HTTP status codes reference

CodeNameDescription
200OKRequest succeeded
201CreatedResource created successfully
400Bad RequestInvalid parameters
401UnauthorizedAuthentication required
403ForbiddenInsufficient permissions
404Not FoundResource not found
409ConflictDuplicate entry
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error — retry
503Service UnavailableTemporarily down
504Gateway TimeoutProvider timeout

Error handling example

# Create a payment and handle errors based on HTTP status code
response=$(curl -s -w "\n%{http_code}" -X POST https://api.simiz.io/v1/transactions \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "currency": "XAF",
    "payment_method": "ORANGE_MONEY",
    "payer": { "phone": "237690000001", "name": "John Doe" },
    "description": "Order #12345"
  }')

http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | head -1)

case $http_code in
  201) echo "Payment created: $body" ;;
  400) echo "Validation error: $body" ;;
  401) echo "Invalid API key" ;;
  429) echo "Rate limited — retry later" ;;
  5*)  echo "Server error — retry" ;;
esac
Include the request_id when contacting support — it helps us debug your issue faster.