Skip to content

Integration Guide

Learn how to integrate Nivatio payments into your application.

Integration Options


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

  1. Never expose API keys in client-side code
  2. Validate webhook signatures (when available)
  3. Use HTTPS for all webhook endpoints
  4. Implement idempotency in webhook handlers
  5. Store transaction hashes to prevent duplicates
  6. 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