Skip to main content
Every request to the Rampnow API is authenticated with your API key and an HMAC-SHA256 signature made with your API secret.
Your partner account comes with an API key and secret already created. You can find them in the API Hub of the Partner Dashboard, and regenerate them there if you need to.

Environments

Keys are environment-scoped: use a sandbox key against the sandbox hosts (*.sandbox.rampnow.io), for both the API and the widget, and a production key against the production hosts. A sandbox key will not work on production hosts, or vice versa.

Request headers

Send these headers on every request, over HTTPS:

Sign a request

1

Generate the timestamp

Take the current Unix time in seconds, as a string. Use the same string in the header and in the message.
2

Build the message

Concatenate, with no separators:
  1. The timestamp
  2. The HTTP method in uppercase (GET, POST)
  3. The full request path, starting with /api/partner/v1, plus the query string exactly as you send it (for example /api/partner/v1/ext/ramp_order/blocked_currencies?country=DE)
  4. For POST, PUT and PATCH: the request body, byte for byte as you send it. For GET, nothing.
3

Sign it

Compute HMAC-SHA256 of the message with your API secret as the key, hex-encode the result and send it in X-RAMPNOW-SIGN.
Your timestamp must be no more than 1 minute old when the request reaches Rampnow. Keep your server clock synchronized with NTP.

Test vector

Use these fixed inputs to check your signing code before you call the API. If your code produces the same signature, it builds the message correctly. Message to sign (timestamp + method + path + body, no separators):
Expected X-RAMPNOW-SIGN:
The body is signed byte for byte. A space or a different key order gives a different signature, so always sign the exact string you send.

Code examples

Each example requests a quote. To check your code against the test vector, replace the secret with test-secret-key, the timestamp with 1772080882 and the body with the test vector body: the signature must match.

Troubleshooting

Every authentication failure returns HTTP 401 with code 100002 and message not_authorized_err, without a displayError. The response doesn’t say which check failed, so work through this table: Uppercase and lowercase hex signatures are both accepted.

Quick reference