Migrating from V1 to V2

Migration steps

  1. Generate an Ed25519 key pair — see Get set up: keys & onboarding
  2. Send your public key to Onramper support
  3. Test V2 signing in staging
    • Widget: https://buy.onramper.dev
    • API: https://api-stg.onramper.com
    • Use your test API key (pk_test_...) and verify signatures are accepted
  4. Deploy V2 to production
  5. Notify Onramper when ready — V1 will then be disabled for your account

Key differences from V1

V1V2
AlgorithmHMAC-SHA256 with shared secretEd25519 with your private key
Signature locationsignature query param / body fieldsigV2 param (widget) or x-onramper-signature header (API)
Content signedSensitive params only, unencoded8-line canonical string, URL-encoded query
Replay protectionNoneNonce + timestamp, 15-min window
⚠️

Encoding changed: V1 signed unencoded values; V2 signs the URL-encoded canonical query. Don't reuse V1 string-building code.