Statira API
Build payments
that settle perfectly.
Use Statira's REST API to create hosted payment sessions, accept cards, bank transfers and USSD, and confirm every transaction from your server.
Keep secret keys on your server
Every gateway request requires the public and secret keys created in your Statira Business dashboard. Send them using X-Public-Key and X-Secret-Key. Never expose the secret key in browser or mobile code.
Test first, then go live
https://api.dev.paywithstatira.comUse TEST-mode API keyshttps://api.paywithstatira.comUse LIVE-mode API keysAmounts are integers in the currency's smallest unit. For NGN, 250000 represents ₦2,500.00.
Create a hosted checkout session
Create an intent from your server. Use a unique Idempotency-Key for each order so network retries cannot create duplicate payments.
/api/v1/gateway/payments/intentscurl --request POST \
--url https://api.paywithstatira.com/api/v1/gateway/payments/intents \
--header 'Content-Type: application/json' \
--header 'X-Public-Key: pk_live_your_key' \
--header 'X-Secret-Key: sk_live_your_key' \
--header 'Idempotency-Key: order_84392' \
--data '{
"merchantReference": "order_84392",
"amountMinor": 250000,
"currencyCode": "NGN",
"customerEmail": "customer@example.com",
"customerName": "Ada Okafor",
"description": "Order #84392",
"callbackUrl": "https://yourapp.com/payments/complete"
}'The response includes reference, hostedCheckoutUrl, status and expiresAt. Redirect your customer to hostedCheckoutUrl.
Confirm before delivering value
Always verify a transaction from your backend using its Statira reference. Do not rely only on the customer's browser redirect.
/api/v1/gateway/payments/verify/{reference}curl --request GET \
--url https://api.paywithstatira.com/api/v1/gateway/payments/verify/STP_ABC123 \
--header 'X-Public-Key: pk_live_your_key' \
--header 'X-Secret-Key: sk_live_your_key'Receive payment updates
Add an HTTPS webhook endpoint to an API key in Statira Business. Statira delivers payment.updated when a transaction changes. Return a successful 2xx response promptly and process heavier work asynchronously.
payment.updated{
"event": "payment.updated",
"data": {
"reference": "STP_ABC123",
"status": "SUCCESSFUL",
"amountMinor": 250000,
"currencyCode": "NGN"
}
}- Verify the webhook signature using the endpoint secret shown in your dashboard.
- Make processing idempotent using the payment reference.
- Fetch the transaction from the verify endpoint before fulfilling an order.
Core gateway endpoints
/api/v1/gateway/payments/intentsCreate a payment intent and hosted checkout session.
/api/v1/gateway/payments/verify/{reference}Retrieve the latest verified transaction state.
Gateway permissions required: payment.create and payment.verify. Assign permissions to each key in Statira Business.
Handle errors predictably
Log the response's correlation identifier when contacting support. Retry temporary failures with exponential backoff and reuse the same idempotency key.
Developer support
Need help with an integration?
Tell us what you're building and include the request correlation ID where available.
support@zijela.com