Learn about authentication, permissions, error handling, and API key management.
The complete API schema is available as a single bundled file. It includes all endpoints, request and response structures, and field definitions. To integrate programmatically, download the specification in the preferred format, instead of parsing the rendered API reference:
The Solidgate API v2 uses a simplified Bearer token authentication model for outbound API calls. You no longer need to manage request signatures or multiple key sets when calling the API. Incoming webhook deliveries still require HMAC signature verification.
API key
- Format: Key IDs use the prefix
akey_xxx, secrets use the prefixasec_xxx. - Method: Include the key in the
Authorizationheader of every request.
Example header
Authorization: Bearer your_secret_hereKey flexibility
API keys are decoupled from channels.
- Account level: By default, keys exist at the account level with access to all channels.
- Channel-bound: A key that can be restricted to one or many specific channels.
The API follows a strict structural pattern to keep behavior predictable.
Endpoint format
All operations use the POST method.
POST {host}/{version}/{resources}/{action}- Host:
https://api.solidgate.com - Version:
v2 - Resources: Plural form of the domain model, for example,
api-keys,payments. - Action: Operation name, for example,
create,list, orrotate.
Data formatting
- Body: JSON
- Property names:
snake_case - Enum values:
UPPER_CASE
Fine-grained access control follows the principle of least privilege. Keys can be restricted by channel and permission.
Manage keys via Solidgate Hub or API v2. Hub access is available to Merchant Admin and Developer roles. Navigate to the Developers section and then select API v2.
Key rotation with zero downtime
To maintain security without service interruption, use Rotation.
- Initiate
- API: Call
/rotateand set the rotation period in seconds - Hub: Click Rotate for the API key
- API: Call
- Overlap
During this period, both old and new secrets remain valid - Expiry
After the period ends, the old secret is automatically deactivated
API key operations
All operations require an account-level API key marked in Hub as Applies to all channels.
| Host | Domain |
|---|---|
POST /v2/api-keys/create | Create API key |
POST /v2/api-keys/list | List API keys |
POST /v2/api-keys/get | Get API key details |
POST /v2/api-keys/rotate | Rotate API key |
The API uses standard HTTP status codes. All errors return the same JSON envelope, for example:
{"code": "PERMISSION_DENIED", "message": "Permission denied"}Some responses include a context object with structured details. Every response carries a request-id header, share it with support when reporting issues.
| Status | Code | Description |
|---|---|---|
400 | VALIDATION | Malformed JSON or invalid field constraints. context.constraints lists per-field failures. |
401 | UNAUTHENTICATED | Invalid or missing API key. |
403 | PERMISSION_DENIED | Key lacks the required scope, or channel-bound key calling outside its channels. |
404 | NOT_FOUND | Resource or endpoint does not exist. |
422 | domain-specific | Request conflicts with current business or system state (e.g., ENDPOINT_ALREADY_EXISTS). |
429 | RATE_LIMIT | Quota exhausted. Check context.next_try_at. |
500 | INTERNAL | Server-side failure. |
Rate limiting controls the frequency at which requests are made to API endpoints within specific time periods.
It helps protect against service overload while ensuring consistent performance for all clients. Exceeding limits results in a 429 Too many requests error response.
API usage limits
Solidgate returns the 429 error response when necessary to protect legitimate merchant traffic.
Rate limits differ by endpoint based on operational and reliability needs. The Solidgate team continuously monitors system performance and may adjust these limits as needed to maintain optimal service quality.
For endpoint-specific rate limit information, visit the Developers section in the Solidgate Hub, which is updated as changes occur.
Handle rate limits
You can handle rate limiting by monitoring for the 429 Too many requests error response. Effective handling combines retries and overall request flow control.
A widely used approach for handling rate limit error responses is implementing exponential backoff with jitter. This method retries requests using short initial delays that increase after each failure. Introducing randomization, or jitter, helps avoid conflicts caused by multiple clients retrying simultaneously.
While retries are useful, a significant improvement comes from regulating request flow across the entire application. The token bucket is standard practice for this purpose. It allows short bursts of requests while enforcing an average request rate over time, reducing traffic spikes and improving overall stability.
Webhook event security uses a Base64-encoded HMAC-SHA256 signature generated with your webhook endpoint secret. Each notification includes a signature value in the headers.
signature– a Base64-encoded HMAC-SHA256 digest of the raw request body, signed with your webhook endpoint secret.
Unlike v1, webhook deliveries do not include a public key in the headers. Identify the correct webhook endpoint secret using the endpoint that received the webhook.
- Determine which endpoint received the webhook, and look up that endpoint's secret.
- Generate a signature from the raw request body using the
generateSignaturefunction, which must return the Base64-encoded digest. - Compare your generated signature to the
signatureheader value. Reject the request if they do not match.
Use the raw JSON body exactly as received, with no changes. Serializers, URL encoding, or reformatting can change the byte structure and produce a different hash, causing a valid webhook to fail verification.
Every v2 webhook payload includes the following fields.
| Field | Type | Description | Example |
|---|---|---|---|
event_id | string | Unique ID for the event. Use it to deduplicate deliveries. | 3f1c8a52-0b6d-4d3e-9c2a-1e8b7f4a90d1 |
event_type | string | The type of event that occurred. | SUBSCRIPTION_CREATED |
occurred_at | string (date-time) | Date and time when the event occurred. Use it to order events chronologically. | 2026-04-03T16:18:40.000000Z |
data | object | The event payload. Structure depends on event_type. | — |
Unlike v1, this metadata is sent in the payload rather than the headers. signature is the only header v2 sends.
- Prevent replay attacks: Check the
occurred_atfield in the payload. Reject deliveries with a timestamp older than 5 minutes. - Process asynchronously: Return a
200 OKresponse immediately after signature verification, then handle the payload in a background queue. This avoids timeout failures during traffic spikes. - Ensure idempotency: Delivery order is not guaranteed, and the same event may arrive more than once with the same
event_id. Store processed event IDs for at least one week, and skip any duplicate.
Breaking changes can impact existing integrations and require adjustments. These are marked with a breaking changes badge in the changelog and include:
| Category | Change |
|---|---|
| Operation removal | Removing an API operation. |
| Request | Remove or rename a field, make optional fields required, remove oneOf. |
| Response | Remove or rename a field, change HTTP status code, remove oneOf. |
| Type changes | Change request or response data types. |
| HTTP headers | Add required headers or remove existing ones. |
| Enum updates | Remove enum values. |
| Errors | Change existing error codes. |
| Validation rules | Add stricter or new rules. |
| Authentication and authorization | Change requirements. |
Non-breaking changes modifications do not affect existing integrations and ensure backward compatibility:
| Category | Change |
|---|---|
| Request | Add new optional fields, change required fields to optional. |
| Response | Add new optional fields, change optional fields to required. |
| HTTP headers | Add new optional headers, change header case. |
| Field length | Expand maximum length. |
| Identifier format | Change prefixes or formatting. |
| Webhook events | Add new opt-in event types. |
| Webhook schema | Add new fields. |
| Rate limiting | Changes communicated at least one month in advance. |
For help, contact us.