RevenueHogdocs
API

Server-to-server endpoints

The per-connection endpoints that receive App Store Server Notifications, Google Play notifications and Stripe webhooks, with verification and responses.

RevenueHog receives real-time store events at per-connection URLs. You do not call these yourself: you paste the URL into App Store Connect, Google Cloud Pub/Sub or Stripe. The {token} in each URL identifies the connection; treat the URL as a secret. It is never logged.

ProviderEndpointSet up in
ApplePOST /api/s2s/apple/{token}Server notifications
Google PlayPOST /api/s2s/google/{token}Google Play
StripePOST /api/s2s/stripe/{token}Stripe

Responses are plain text (text/plain; charset=utf-8). A non-2xx response makes the provider retry.

Apple

POST/api/s2s/apple/{token}URL token + Apple signature

The body is Apple's { "signedPayload": "<JWS>" }. RevenueHog verifies the JWS against Apple's root certificates and checks it matches the app's bundle ID, Apple ID and environment. Nothing is recorded or forwarded unless it verifies. Notifications are de-duplicated by notificationUUID.

StatusBodyMeaning
200OKRecorded
200DuplicateAlready recorded; acknowledged without re-alerting
400Bad RequestNot JSON, no signedPayload, or unreadable environment
401UnauthorizedSignature verification failed
404Not FoundUnknown token (404 so the endpoint reveals nothing)

Recorded events also feed forwarding and push alerts.

Google Play

POST/api/s2s/google/{token}URL token + Pub/Sub OIDC

Pushed by your Pub/Sub subscription. The Authorization header carries Google's OIDC token, checked against the connection's audience and service account before the body is read.

StatusBodyMeaning
200OKRecorded, a test notification, an unknown token, or a message without a package name
200DuplicateAlready recorded
200Bad RequestUndecodable body (acknowledged so Pub/Sub does not retry)
401UnauthorizedOIDC verification failed

Stripe

POST/api/s2s/stripe/{token}URL token + Stripe-Signature

Verified with the connection's webhook signing secret and the Stripe-Signature header. Distinct from RevenueHog's own billing webhook.

StatusBodyMeaning
200OKRecorded
200DuplicateAlready recorded
200IgnoredAn event type RevenueHog does not track
400Bad SignatureSignature check failed
404Not FoundUnknown token
409No webhook secret configuredThe connection runs in poll mode

Last updated on

On this page