SDK naming conventions
Why Python and Ruby use snake_case while TypeScript, Go, Java, and C# use camelCase — and how that maps to the HTTP API.
The Wajub HTTP API uses snake_case JSON field names (created_at, payment_method, idempotency_key). Official SDKs mirror that wire format on the wire, but each language follows its own idiomatic naming in source code.
By language
| Language | Request/response property style | Example (API → SDK) |
|---|---|---|
| Python | snake_case | created_at → created_at |
| Ruby | snake_case | created_at → created_at |
| PHP | snake_case (array keys) | created_at → created_at |
| Node.js / TypeScript | camelCase | created_at → createdAt |
| Go | camelCase (JSON tags) | created_at → createdAt |
| Java | camelCase (Jackson) | created_at → createdAt |
| C# | camelCase (System.Text.Json) | created_at → createdAt |
This split is intentional, not an oversight:
- Python and Ruby communities expect snake_case for attributes and hash keys. Keeping the same names as the JSON payload avoids mental translation and matches common REST client patterns in those ecosystems.
- TypeScript, Go, Java, and C# communities expect camelCase for object properties. SDKs deserialize API snake_case into camelCase (and serialize back on write) so application code reads naturally in those languages.
What stays the same everywhere
Regardless of property casing in your language:
- HTTP paths and query parameters remain snake_case where the API defines them (
per_page,customer_group). - Header names are canonical (
Authorization,Idempotency-Key,X-Wajub-Version,X-Wajub-Signature,X-Wajub-Timestamp). - Enum-like string values from the API are unchanged (
payment.succeeded,pending,XAF). - Resource IDs use the API prefix (
trx_…,cus_…,po_…).
Practical guidance
Trust the SDK mapping
When reading API reference docs, map snake_case fields to camelCase in TypeScript/Go/Java/C# clients. In Python/Ruby/PHP, use the documented name as-is.
Raw HTTP
If you call the API without an SDK, send and expect snake_case in JSON bodies unless a specific endpoint documents otherwise.
Was this page helpful?