Skip to main content
For complete implementation guides, code examples, and troubleshooting, see the Authentication Guide in Getting Started.

Overview

The HopNow API uses HMAC-SHA256 signatures to authenticate all requests. Every API request must include four authentication headers. Client API requests use HMAC headers only. Do not use Authorization: Bearer for these endpoints. The API playground can store X-API-Key, but X-Timestamp, X-Nonce, and X-Signature are request-specific and must be generated for each request.

Required Headers

Signature Format

Use the secret returned when the key is created as the HMAC-SHA256 signing key. The api_key value goes in X-API-Key. The signature is created by hashing the following payload:
Components:
  • METHOD: Uppercase HTTP method (GET, POST, PATCH, DELETE)
  • PATH_AND_QUERY: The URL path exactly as sent to HopNow, starting with /, followed by ? and the query string when the request has query parameters. Do not include the scheme, host, port, or fragment.
  • TIMESTAMP: Unix timestamp as string
  • NONCE: Unique 32-character hex string (prevents replay attacks)
  • BODY: Exact request body string sent over the wire (empty string for GET/DELETE)
For https://api.hopnow.io/v1/customers/cus_123/accounts?size=1, sign /v1/customers/cus_123/accounts?size=1.

Quick Example

Security Requirements

  • Timestamp validation: Requests older than 5 minutes are rejected
  • Nonce uniqueness: Each nonce can only be used once within the 5-minute window
  • HTTPS only: All requests must use HTTPS
  • Keep secrets secure: Never expose your API secret in client-side code or logs