Every request to the Rampnow API is authenticated with your API key and an HMAC-SHA256 signature made with your API secret.
Environments
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:
- The timestamp
- The HTTP method in uppercase (
GET,POST) - 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) - For
POST,PUTandPATCH: the request body, byte for byte as you send it. ForGET, 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.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):
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 withtest-secret-key, the timestamp with 1772080882 and the body with the test vector body: the signature must match.
Troubleshooting
Every authentication failure returns HTTP401 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.