Skip to Content
Paycose Docs
Webhook events

Webhook events

The webhook_event object

One delivery of an event to one of your webhook endpoints, with its delivery status. An event sent to several endpoints has one delivery per endpoint, all naming the same event_id.

Attributes

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • application_country_idstringRequired

    ID of your account's country configuration the delivery belongs to.

  • event_idstringRequired

    ID of the event delivered (evt_…), the id a webhook body carries. Retrieve it with GET /events/{id}.

  • job_idstringRequired

    Identifier of this delivery. It is sent as the Idempotency-Key header on every attempt, so your endpoint can ignore repeats.

  • eventstringRequired

    Type of the event, e.g. invoice.paid.

  • endpoint_idstringRequired

    ID of the webhook endpoint the event is sent to.

  • dataobjectRequired

    The event payload sent to your endpoint: the object the event is about, such as the invoice for an invoice event.

  • statusenumRequired

    Delivery state of the event.

    • pending

      Waiting to be delivered or retried. Failed attempts are retried with growing delays, by default after 5 minutes, 30 minutes, 2 hours and 24 hours.

    • delivered

      Your endpoint answered with a 2xx status.

    • failed

      Delivery gave up: every attempt failed, or the endpoint was disabled or removed.

  • attemptsintegerRequired

    Number of delivery attempts that have failed. 0 when the first attempt succeeded or none has run yet.

  • timestamptimestampRequired

    Unix timestamp in seconds.

  • last_response_codeintegerRequiredNullable

    HTTP status code your endpoint returned on the final failed attempt, set when delivery gives up. null otherwise, or when the endpoint could not be reached.

  • last_errorstringRequiredNullable

    Error from the final failed attempt, set when delivery gives up. null otherwise.

  • failed_attimestampRequiredNullable

    Unix timestamp in seconds.