API · Webhooks Beta
Testing webhooks
Sandbox environment (upl_test_… key or X-Okruzenje: sandbox) for safe testing without live payments.
1. Register a sandbox URL
POST /v1/webhookovi with an HTTPS URL (e.g. https://primer.rs/uplaceno/webhook). Separate endpoint and secret for sandbox and live.
2. Test delivery
POST /v1/webhookovi/{id}/test sends a sample event with a valid signature and X-Uplaceno-Okruzenje: sandbox. Synchronous, 10 s timeout, no retries. Rate limit 10/min per endpoint.
3. Payment simulation
POST /v1/sandbox/simulacija-uplate runs real sandbox matching and fires webhooks. See Sandbox API.
4. Local receiver
Use an HTTPS tunnel (e.g. ngrok); verify the signature per Signature verification. Log the raw body before JSON parsing.