Skip to main content
WEBHOOK

Headers

X-Hedra-Webhook-Id
string
required

Deduplication id: the event's own id (evt_<uuid>), byte-identical across every retry. Signed.

X-Hedra-Webhook-Timestamp
string
required

Unix epoch seconds the delivery was signed at; reject it when more than 5 minutes old. Signed.

X-Hedra-Webhook-Event
string
required

The event this delivery announces. Signed.

Allowed value: "billing.top_off_failed"
X-Hedra-Webhook-Attempt
integer
required

1-based attempt number within the current delivery cycle. Informational and outside the signature; do not branch on it.

Required range: x >= 1
X-Hedra-Webhook-Redelivery
enum<string>
required

true when an operator asked for this event to be sent again — process it even if its id was already recorded. Signed.

Available options:
true,
false
X-Hedra-Webhook-Signature
string
required

Hex-encoded ed25519 signature over the canonical string documented on the Webhooks tag; verify against the key from GET /webhooks/public-key before acting on the request.

Body

application/json

Body of a billing.top_off_failed webhook.

Hedra sends this event when Stripe declines the payment method for an automatic top-up of the API wallet. After a decline, Hedra holds further automatic top-ups until the hold expires, the payment method changes or a top-up is paid, and sends no event for a decline while a hold is in place.

id
string
required

The event's id, the same value as X-Hedra-Webhook-Id.

type
enum<string>
default:billing.top_off_failed
required

Always billing.top_off_failed.

Available options:
billing.top_off_failed
created_at
string<date-time>
required

When the top-up was declined.

reason
enum<string>
required

Why an automatic top-up did not add funds.

Available options:
payment_method_declined
amount_attempted
number
required

The amount the top-up tried to add.

balance
number
required

The API wallet's balance when this event was sent.

currency
string
default:USD
required

ISO-4217 currency code for every amount in this event.

Response

2XX

Acknowledged; any 2xx stops the retry ladder. Other responses are retried per the Webhooks tag.