Get an API key & authenticate
The developer API authenticates with an API key (Authorization: Bearer <API key>); console and wallet APIs use a JWT access token plus a refresh token.
Create an API key
- 1Log into the merchant dashboard, go to Developers → API Keys.
- 2Click "Create key" and check the scopes this key needs.
- 3The full secret (
rbp_test_...) is shown exactly once — copy it immediately into a secret manager. After that, only the prefix is ever shown again.
The key belongs in your backend's environment variables only — never in frontend code or sent to the browser. If it leaks, revoke it from the dashboard immediately (revocation takes effect instantly).
Sending the key with a request
curl -sS "$BASE/api/Product" \
-H "Authorization: Bearer $API_KEY"Signed-in APIs: JWT + refresh token
ReBate Pay's own platform console (Admin*), merchant console (Merchant*) and consumer wallet (Member*) APIs don't use API keys — you sign in first and get tokens. Use the same flow when your app acts on behalf of a signed-in person.
| Who | Sign in | Refresh | Sign out |
|---|---|---|---|
| Platform admin | POST /api/AdminAuth/Login { name, password } | POST /api/AdminAuth/Refresh | POST /api/AdminAuth/Logout |
| Business or individual seller | POST /api/MerchantAuth/Login { email, password, accountType } | POST /api/MerchantAuth/Refresh | POST /api/MerchantAuth/Logout |
| Consumer wallet | POST /api/MemberAuth/Login { email } sends a sign-in link → POST /api/MemberAuth/Verify { loginToken } | POST /api/MemberAuth/Refresh | POST /api/MemberAuth/Logout |
curl -sS -X POST "$BASE/api/MerchantAuth/Login" -H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"…","accountType":"Business"}'accessTokenis a JWT that expires after 15 minutes (expiresInseconds); send it asAuthorization: Beareron every request.- When it expires the API returns
401 TOKEN_EXPIRED— call the matching*/Refreshwith yourrefreshTokenfor a new pair. Refresh tokens rotate on every refresh and the old one stops working at once; using the same refresh token twice returns401 INVALID_REFRESH_TOKEN, so sign in again. - Signing out revokes the refresh token; old tokens then get
401. GET /api/Auth/Identityreturns who the current token belongs to (userTypeisAdmin,MerchantorMember).- A token of the wrong kind (e.g. a merchant token on
Admin*) gets403 WRONG_TOKEN_TYPE; API keys can't call signed-in APIs and JWTs can't call the developer API. - Treat the refresh token like a password: keep it in secure storage (e.g. the app's secure store), never in URLs or logs.
Common scopes
A key only has the scopes you checked; write implies read. Grant only what you actually need. Full list at API Keys & Security.
| Scope | Grants |
|---|---|
products:read / products:write | Product catalog |
customers:read / customers:write | Customer data |
subscriptions:read / subscriptions:write | Subscriptions |
payments:write | Create/attempt payments (high-risk: moves money) |
refunds:write | Refunds (high-risk: moves money) |
webhooks:write | Register webhook endpoints |
ReBate Pay Docs