2. Get Credentials
Onboarding2. &Get PartnershipCredentials
Get Credentials
ToThis usepage theexplains Partnerhow you get access, what credentials mean, and what still has to be approved before rewards can be issued.
Sandbox vs production
Self-service credentials
If you have a SIR Giving administratorsaccount afterwith access to partner keys, creating your first API key automatically creates a partnershipPartner review.record linked to your user.
Use:
POST /v1/partner/keys
Authorization: Bearer <your user JWT>
Content-Type: application/json
{
"name": "Sandbox Integration",
"environment": "sandbox",
"keyType": "secret"
}
The response includes:
{
"id": "key_...",
"partnerId": "...",
"name": "Sandbox Integration",
"environment": "sandbox",
"publicKey": "pk_test_...",
"secretKey": "sk_test_...",
"hmacSecret": "64-character-hex-string"
}
Store secretKey and hmacSecret immediately. They are not shown again.
WhyProduction approval
Production rewards require approval isbecause requiredSIR
Twotokens reasons:
Before production launch, SIR Giving allocates to you. We need to size the pool to your expected volume and lock in restrictions (vesting, expiration, redemption rules) before you start issuing.
Approval workflow
Partner Inquiry
│
▼
Sales / Business Review ──── (reject)
│ approved
▼
Contract & Compliance signed
│
▼
Admin creates Partner record (status: PENDING_APPROVAL)
│
▼
Admin generates API key pair (POST /api/v1/admin/partners/:id/keys)
│
▼
Admin allocates initial token pool
│
▼
Partner status set to ACTIVE ─── you can now call the API
│
▼
Sandbox testing → Production cutover
What we need from you to start
needs:
| Item | |
|---|---|
| Partner name |
Account and compliance record |
| Contact email | Operational |
| Use case summary |
stakeholderTypeCodeConfirms What
After weapproval, provideSIR backGiving provides or enables:
PartnerProductionIDAPI— Mongo ObjectId, used in admin URLs.credentials.PartnerAslugproduction—tokenshort string used in some responses.pool.One API key pair:Publishable key:pk_test_<64hex>(sandbox)Campaign orrewardpk_live_<64hex>(prod)rules, if needed.SecretProductionkey:webhooksk_test_<64hex>orsk_live_<64hex>
What
The secret key and HMAC secret are returned once, in the response body when theeach key isgenerated. They are never retrievable again.If lost, an admin must rotate the key — your old key will continue to work until revoked, allowing zero-downtime rotation.
API key types — pk vs skfor
|
|
|
|---|---|---|
pk_test_... pk_live_... |
||
sk_test_... sk_live_... |
Backend only |
Users, campaigns, pools, webhooks, dashboard data |
hmacSecret |
Check your partner record
TheAfter creating a key, verify your Partner record:
@RequiresSecretKey()GET /v1/partner/keys/partner-info
Authorization: Bearer <your user JWT>
You marksshould endpointssee (e.g.your actionpartner submission,ID, webhookname, registration,slug, actionstatus, reversal)enabled thatfeatures, rejectand rate limit.
Check your keys
pk_GET /v1/partner/keys
Authorization: Bearer <your user JWT>
This lists keys with 403 Forbidden.
Environments
live keys talk to api.sirgiving.org. test keys talk to devapi.sirgiving.org. The HMAC guardbut does not enforcereturn environmentsecret matchingvalues.
Go-live checklist
Before switching to production:
pk_live_... and sk_live_... key.
Your backend signs requests with the hmacSecret.
X-SIR-Signature.
idempotencyKey Partner
You Your tier is set by an admin based on contract terms:
Headers on every response:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-ResetX-RateLimit-RetryAfterPartner statuses
PENDING_APPROVALACTIVESUSPENDEDPARTNER_SUSPENDEDACTIVEPARTNER_NOT_ACTIVEThe partner.status_changed webhook fires whenever your status transitions.
Key rotation & revocation
Admins can:
POST /api/v1/admin/partners/:id/keys/:keyId/rotateDELETE /api/v1/admin/partners/:id/keys/:keyIdThe api_key.expiring webhook fires before a key reaches its expiresAt.