GET, POST, PATCH, and DELETE. The API is designed to work alongside CloudEvents for asynchronous service-to-service communication.
JSON Conventions
- Resources are addressable by a UUIDv4
idproperty. - Property names are always in
snake_case. - Commerce does not support empty strings. To unset a string value, use an explicit
nullvalue instead. - Temporal data is encoded in ISO 8601 strings.
Authentication
Commerce V1 supports two authentication mechanisms to secure API access.API Keys
API keys are passed via the HTTP headerx-api-key for standard operations.
Mutual TLS (mTLS)
For service-to-service communication, particularly with extension services and processor integrations, Commerce V1 uses mutual TLS authentication over the event bridge. Both authentication methods must be handled with care and kept secure. Never hardcode the API keys in your source code, but keep them solely on your backend systems.API Use
Cluster-based Deployment
Commerce V1 is provided as a service of the Hellgate Cloud Platform implementing the Composable Payment Architecture (CPA). Each instance is accessible via a cluster-specific URL:Idempotency
To prevent your system from handling requests twice and thus, for example, charging a customer twice, Commerce supports idempotency on requests to the API. The behavior is controlled via the header fieldX-Idempotency-Key.
Pagination
Endpoints that return lists of objects support pagination. Commerce V1 uses page-based pagination with the following query parameters:| Parameter | Type | Description |
|---|---|---|
limit | integer | The maximum amount of objects to be returned on a page. |
page | integer | The requested number of the page to return. |
Response Sample
Request Errors
Commerce uses standard HTTP status codes to indicate client errors on the API level.- Invalid Requests - HTTP 4xx
- Unprocessable Content - HTTP 422
The response payload for processing errors follows a standard format.