Authentication
The Cashramp GraphQL API is secured with API keys. Generate and manage these keys in the Developer Dashboard: staging.business.useaccrue.com for sandbox keys and business.useaccrue.com for production keys. Each key only works against its own environment.
Key
Prefix
Intended use
Keep it where?
Public key
CSHRMP-PUBK_
Client-side calls that cannot modify account data (e.g., widget embeds).
Safe to expose in front-end code.
Secret key
CSHRMP-SECK_
Server-to-server requests; full account access.
Store securely (env vars, vault). Never commit or share.
Cashramp does not retain your secret key. Copy it once, keep it safe.
Authenticating a Request
The API uses Bearer auth. Send your secret key in the Authorization header:
Authorization: Bearer CSHRMP-SECK_xxxxxxxxxxxxxxxxxxxxxxExample
import Cashramp from "cashramp";
const cashramp = new Cashramp({
env: "production", // or "test" for staging
secretKey: process.env.CSHRMP_SECRET_KEY,
});require "cashramp"
client = Cashramp::Client.initialize(
env: :production, # or :test for staging
secret_key: ENV["CSHRMP_SECRET_KEY"]
)import (
"os"
cashrampsdk "github.com/rockets-hq/cashramp-sdk-go"
)
client, err := cashrampsdk.InitialiseClient(
"live", // or "test" for staging
os.Getenv("CSHRMP_SECRET_KEY"),
)
if err != nil {
panic(err)
}Last updated