Partner OpenAPI
A signed external API for partners to provision and manage accounts
Overview
An external API that lets partner systems create and manage accounts on the platform. I built the gateway skeleton, its authentication and signing, the account-provisioning APIs, and the credential service behind it.
Key Highlights
AppId and tenant authorisation; HMAC-SHA256 request signing with constant-time verification and a 5-minute window
Batch account provisioning (up to 20 per request, processed concurrently) that orchestrates 4 downstream services per account
Compensating rollback when a provisioning step fails, with per-item success/failure results
App-credential gRPC service: AppId/secret/data-key issuance, enable/disable, one active app per tenant
Swagger-documented, with shared tracing and logging middleware
Key Implementations
Multi-step provisioning
Each account: create user → create wallets → set up credit → register with a downstream provider. A failure triggers a compensating delete, and the batch returns a result per item.
Why: Partners need to know exactly which accounts succeeded so they can retry only the failures.
Technical Decisions
| Technical Decisions | Chosen | Alternative | Reason |
|---|---|---|---|
| Request signing | HMAC-SHA256 over AppId + timestamp + nonce, constant-time compare, ±5 min window | The older MD5 scheme used by internal clients | An external API needed a stronger, standard construction and a server-enforced time window. |