Bearer authentication
Every API request must include your client secret as a Bearer token:401 Unauthorized:
Request signing
Signing proves the request body wasn’t tampered with in transit and that it originated from you. It is optional to start, but strongly recommended — and required for production go-live.Signing is sticky. The first time Float receives a correctly signed request from your integration, signing becomes mandatory for all subsequent mutating requests (
POST /api/checkouts, POST /api/refunds). Unsigned requests after that point are rejected with 400 Bad Request. Enable signing in sandbox first and roll it out deliberately.How to sign
Compute an HMAC-SHA512 digest of the exact raw JSON request body, keyed with your signing key, and Base64-encode it. Send it in theX-Signature header.
Verifying Float’s callbacks
Float signs its callbacks to yournotify_url with the same signing key and algorithm. Always verify before trusting the payload — see Callbacks → Verifying the signature.
Credential handling checklist
- Store secrets in your secret manager or environment variables, never in source control.
- Use separate credentials for sandbox and production.
- Verify callback signatures with a constant-time comparison (
Rack::Utils.secure_compare,crypto.timingSafeEqual,hash_equals). - Rotate immediately on suspected exposure via your Float account manager.