Error response format
All error responses follow this structure:| Field | Type | Description |
|---|---|---|
error | string | A human-readable description of the error |
details | object | Additional context, including an array of validation errors |
HTTP status codes
| Status | Meaning | When it occurs |
|---|---|---|
400 | Bad Request | Invalid request body, missing required fields, or validation failure |
401 | Unauthorized | Missing or invalid authentication credentials |
403 | Forbidden | Valid credentials but insufficient permissions |
404 | Not Found | Requested resource does not exist |
410 | Gone | Checkout session has expired |
500 | Internal Server Error | Unexpected server-side failure |
Error codes
Validation errors
Validation errors
| Code | Description |
|---|---|
invalid_transaction_data | Request body failed schema validation |
no_fields_to_update | Update request contained no valid fields |
Authentication errors
Authentication errors
| Code | Description | |------|-------------| |
authentication_required | No
API key or session token provided | | invalid_api_key | The provided API key
is not valid | | session_expired | The session token has expired |Database errors
Database errors
| Code | Description | |------|-------------| |
failed_to_create_transaction
| Could not create the resource in the database | |
failed_to_update_transaction | Could not update the resource in the database
| | database_operation_failed | General database operation failure |Configuration errors
Configuration errors
| Code | Description | |------|-------------| |
missing_required_env_vars |
Server misconfiguration (contact support) |Notification errors
Notification errors
| Code | Description |
|---|---|
notification_error | Failed to send a notification or webhook |
Handling errors in your integration
Validation errors (400)
Validation errors (400)
Check the Fix the indicated fields and retry the request.
details.validation_errors array for field-level messages:Authentication errors (401, 403)
Authentication errors (401, 403)
Verify that your API key is correct and has not been revoked:
Expired sessions (410)
Expired sessions (410)
Create a new checkout session. Expired sessions cannot be reactivated:
Server errors (500)
Server errors (500)
These indicate an issue on the Maash side. Retry the request with exponential backoff. If the error persists, contact support.
Recommended retry strategy
For transient errors (5xx responses and network timeouts), use exponential backoff:Do not retry
4xx errors. These indicate a problem with your request that
must be fixed before retrying.Next steps
Webhooks
Handle webhook delivery failures and retry policies.
Authentication
Troubleshoot authentication errors with API keys and session tokens.
Testing
Test error handling in sandbox mode before going live.
API Reference
See detailed request and response formats for each endpoint.
