Api References

Authentication

Authenticate with the DVPay API using API keys.

DVPay API uses API key authentication. All requests must include the following headers:

  • X-App-Id: Your application ID
  • X-Api-Key: Your API key
  • X-Timestamp: Current Unix timestamp

Example Headers

package main

import (
    "fmt"
    "net/http"
    "time"
)

func createAuthenticatedRequest(url string) (*http.Request, error) {
    req, err := http.NewRequest("POST", url, nil)
    if err != nil {
        return nil, err
    }

    req.Header.Set("X-App-Id", "your-app-id")
    req.Header.Set("X-Api-Key", "your-api-key")
    req.Header.Set("X-Timestamp", fmt.Sprintf("%d", time.Now().Unix()))
    req.Header.Set("Content-Type", "application/json")

    return req, nil
}

Security Notes

  • Keep your API keys secure and never commit them to version control
  • Use environment variables to store sensitive credentials
  • Rotate your API keys periodically