Common API Errors
”Invalid Vault API Key”
The Problem: YourX-API-KEY header doesn’t match.
The Fix:
- Your Vault API Key was provided when you first signed up
- If you didn’t save it, contact Ozura support to retrieve it
- Copy the key exactly (no extra spaces)
- Make sure it’s in the
X-API-KEYheader (notX-OZURA-API-KEY)
“Invalid Merchant API Key”
The Problem: YourX-OZURA-API-KEY header doesn’t match.
The Fix:
- Go to Dashboard → Settings → API Keys
- Copy your Merchant API Key exactly
- Paste it in the
X-OZURA-API-KEYheader (notX-API-KEY)
“merchantId is required”
The Fix: Add it to your request body:“successUrl is required”
The Fix: Include all three required URLs:“Session not found”
The Fix:- Sessions expire after 30 minutes – create a new one
- Check you’re using the correct
sessionId - Make sure you’re hitting the right environment (test vs production)
“Session has expired”
The Fix: Create a new session. Sessions expire after 30 minutes for security.”Session already completed”
The Fix: Check your records – the payment went through! If customer needs to pay again, create a new session.CORS Errors
”Access-Control-Allow-Origin” error in browser
The Fix: SetparentOrigin to your exact website URL:
- Include
https://(not justyoursite.com) - No trailing slash
- Exact match required
Popup/Iframe Issues
Popup blocked
The Fix:- Popup must open from a user click (not automatically)
- Ask user to allow popups for your site
- Consider using redirect mode as fallback:
Iframe not loading
The Fix:- Check browser console for CSP errors
- Add Ozura to your CSP config:
- Consider using popup or redirect mode instead
Not receiving postMessage events
The Fix:Cart/Itemization Issues
”Cannot use both amount and items”
The Fix: Choose one:“Mixed taxExempt values in items”
The Fix: All items must have the sametaxExempt value:
“price has X decimal places but Y only allows Z”
The Fix: Match the currency’s decimal precision:| Currency | Allowed Decimals | Valid Example |
|---|---|---|
| USD, EUR, GBP | 2 | 29.99 |
| JPY, KRW, VND | 0 | 2999 (no decimals) |
| KWD, BHD, OMR | 3 | 29.990 |
Related Pages
- Error Handling — HTTP status codes, error response format, and retry patterns
- Handle the Payment Result — Verifying session status and processing outcomes
Still Stuck?
Contact Ozura support with:- Your Merchant ID
- Session ID (if applicable)
- The exact error message
- Steps to reproduce