VoidhashDocs
DevelopersHelp centerGuidesAPI reference
Dashboard
Guides
Launch
Go-live checklist
Make your first App Store purchase
Make your first Google Play purchase
Troubleshoot
Troubleshooting
Recover from incidents
SDK error codes
Purchase error codes
API error codes
FAQ
Recipes
Win back subscribers
Handle plan changes
Unlock the app after a web purchase
Link accounts across platforms
Handle refunds
Register devices for push
Migrate
Migrate to Voidhash
Migrate from RevenueCat
Migrate from Adapty
Migrate from Superwall
Run in observer mode
Privacy and hosting
Delete personal data
Self-hosting
Operate a self-hosted server

API error codes

What the Voidhash API, event capture and webhook verification helpers answer when they fail, and what to do.

Server-side errors carry a lower-case code, such as product_not_found, that the server libraries expose unchanged: Node.js through getVoidhashApiError, PHP as ApiException::getErrorCode(), Go as APIError.Code and Rust as Error::Api { code, .. }. Codes in UPPER_SNAKE_CASE come from the client SDKs; see SDK error codes.

Management API

Every error has a type that matches the HTTP status and a specific code. Errors shows the body, the types and the codes any operation can return; Authentication lists why a credential is refused; each operation's page in the API reference lists the codes it adds in its Errors table. Payment source codes, such as payment_source_disabled, are under Retries and corrections.

typeWhat to do
invalid_requestFix the request; param names the field. Don't retry unchanged.
unauthenticatedFix the credential.
permission_deniedGive the key the access it needs. See Access levels.
not_foundCheck the ID, and that the key can use its project.
conflictRead the current state, then decide.
rate_limitedRetry after the delay.
internalRetry safe requests with backoff. Contact support with the Request-Id header.
unavailableRetry later.

SDK API

The endpoints the client SDKs call answer with a tagged error body instead. You see these only when you call the SDK API directly.

StatusTagMeaning
400Api/SdkValidationErrorThe request is invalid, such as a missing or malformed x-distinct-id.
401Api/AuthenticationErrorThe publishable key was rejected.
404Api/SdkPersonNotFoundErrorVoidhash doesn't know the target person.
409Api/SdkPersonAlreadyIdentifiedErrorThe anonymous ID already belongs to another identified person.
422Api/SdkTransactionRejectedErrorThe store transaction can never be accepted as sent: the store isn't set up for this app, the ID is unknown, or the environment doesn't match. Don't retry.
422Api/SdkPromotionalOfferUnavailableErrorVoidhash won't sign this App Store promotional offer. Don't fall back to the regular price.
424Api/PaymentSourceEndpointErrorA payment source's endpoint failed or is missing.
429Api/SdkRateLimitedErrorToo many requests. Retry after Retry-After.
500Api/SdkServiceErrorServer failure. Retry with backoff.

Event capture

/i/v1/capture and /i/v1/batch answer errors as { "error", "code" }. See Retries for what to resend.

StatuscodeWhat to do
400invalid_requestFix the request. One invalid event rejects the whole batch.
401unauthorizedCheck the key and where you send it.
413payload_too_largeSplit the batch: at most 5 MB per body and about 250 KB per event.
429rate_limitedRetry after retry_after_ms, with the same event UUIDs.
500internal_errorRetry with backoff.
503dependency_unavailableRetry with backoff.

Webhook verification

The library helpers that verify webhook signatures fail with a reason. Answer 400 for all of them.

ReasonLibrariesMeaning
missing_headerNode.js, PHP, GoA signing header is missing, empty or sent more than once.
timestamp_out_of_toleranceNode.js, GoThe timestamp is malformed or more than 300 seconds from your clock. PHP reports this as invalid_signature.
invalid_signature (Rust: InvalidSignature)AllThe signature doesn't match: wrong secret, or a modified or re-serialized body.
invalid_payload (Rust: InvalidPayload)AllThe signature matches but the body isn't valid JSON.

Next steps

  • API overview
  • SDK error codes
  • Troubleshooting

Something wrong or missing on this page? Tell us by email or on Discord.

PreviousPurchase error codesNextFAQ

On this page

Management APISDK APIEvent captureWebhook verificationNext steps