Integration Guide¶
Learn how to integrate Nivatio payments into your application.
Integration Options¶
-
Checkout Page --- Redirect customers to our hosted checkout Checkout Integration
-
:webhook: Webhooks --- Receive real-time payment notifications Webhook Setup
-
SDKs & Libraries --- Use our official SDKs for popular languages SDK Documentation
Integration Flow¶
sequenceDiagram
participant Customer
participant Your App
participant Nivatio API
participant Checkout
participant Webhook
Customer->>Your App: Click "Pay"
Your App->>Nivatio API: POST /v1/orders (with API key)
Nivatio API-->>Your App: Return order + checkoutUrl
Your App->>Customer: Redirect to checkoutUrl
Customer->>Checkout: Complete payment
Checkout->>Nivatio API: Submit transaction
Nivatio API->>Customer: Payment confirmation
Nivatio API->>Webhook: POST payment.succeeded
Webhook->>Your App: Forward event
Your App->>Customer: Fulfill order
Quick Integration Checklist¶
- Create a Project in Dashboard
- Generate API keys with appropriate permissions
- Implement order creation in your backend
- Set up redirect to Nivatio Checkout (or embed)
- Configure webhook URL to receive notifications
- Test the full flow in sandbox environment
- Go live with production credentials
Sandbox vs Production¶
| Feature | Sandbox | Production |
|---|---|---|
| Base URL | https://sandbox.nivat.io |
https://api.nivat.io |
| API Key Prefix | nv_sk_test_ |
nv_sk_live_ |
| Real Payments | No (simulated) | Yes |
| NUSD Token | Test mintable | Real value |
| Webhooks | Enabled | Enabled |
Environment Separation
Always use separate API keys for sandbox and production. Test thoroughly in sandbox before going live.
Security Best Practices¶
- Never expose API keys in client-side code
- Validate webhook signatures (when available)
- Use HTTPS for all webhook endpoints
- Implement idempotency in webhook handlers
- Store transaction hashes to prevent duplicates
- Verify payment on-chain for high-value orders
Need Help?¶
- Check our Guides for common scenarios
- Review API Reference for endpoint details
- Visit FAQ for common questions