403; an unknown id returns 404. Once an authorized customer or account has been resolved, a child resource that does not exist within that parent returns 404.
Required headers
Include these four headers on every request:string
required
Your API key.
string
required
Unix epoch seconds as a string. Requests more than 300 seconds off server time are rejected.
string
required
A unique value per request (e.g. a UUID). A replayed nonce is rejected for 300 seconds.
string
required
Hex-encoded HMAC-SHA256 of the signature string (below), keyed with your API secret.
Signature string
Concatenate the following components exactly, with no separators:Signature string
string
Uppercase method:
GET, POST, PATCH, PUT.string
The request path including the leading slash and, if present,
? plus the raw query string, e.g. /customers/cus_x7k2m9p4q1w8e5r3t6y0u2i4/accounts?page=1&size=10.string
The exact raw request body string you transmit. For GET and other no-body requests this is the empty string
"".Building a signed request
sign and send a POST
worked signature example
The server rebuilds the same signature string and compares. A signature mismatch, a timestamp more than 300 seconds off, or a replayed nonce all return
401.