Skip to main content

What is a webhook

Webhooks let your system receive real-time event notifications from Yuno through an HTTP POST, instead of polling for updates. After you configure your webhook endpoint, Yuno sends a notification every time a relevant event happens in the payment flow.

Requirements

To use Yuno’s webhooks, build a public REST API endpoint to receive event notifications (POST requests). This endpoint should not require authentication or access restrictions through a header. Despite being public, the endpoint stays secure: Yuno’s event notifications aren’t discoverable by the public and are sent to a unique URL known only to your system.

Webhooks delivery and response requirements

Yuno webhooks expects to receive an HTTP 200 OK status as a response to confirm the webhook was successfully received. The merchant system does not need to include any information in the response’s body. Only the HTTP 200 status is required. If no response is received within the specified time, Yuno will retry sending the event notification up to seven times. Refer to the Receipt Confirmation Process section for details on the notification schedule and confirmation waiting times for each retry.

De-duplication

Because Yuno retries delivery when it doesn’t receive a confirmation, your endpoint can receive the same event more than once. This is expected behavior, not a bug: your integration should be able to identify and skip duplicates.

The identifier

Every event payload includes data.idempotency_key. It stays stable across every retry of the same event, so you can use it to tell a duplicate delivery apart from a genuinely new event.

Coverage

data.idempotency_key is currently included in:
  • payment events
  • refund events
  • chargeback events
  • subscription events
For subscription.* events the key identifies the subscription, not the event: it is the X-Idempotency-Key sent when the subscription was created, and it is repeated identically on every lifecycle event for that subscription. De-duplicate subscription.* events on type_event plus data.idempotency_key — matching on the key alone collapses every event for a subscription into one and silently drops subscription.active, subscription.cancel and the rest.
Support for enrollment events is planned but not yet available. Until then, enrollment payloads do not include data.idempotency_key.

Why you might see the same event twice

Each payload also includes a top-level retry field with the number of delivery attempts made for that event (0 on the first attempt). If your endpoint doesn’t return an HTTP 200 OK in time, Yuno resends the same event (same data.idempotency_key, incremented retry) following the schedule described in Webhooks delivery and response requirements above. Treat any event whose type_event and idempotency key you’ve already processed as a duplicate, regardless of its retry value. Store every data.idempotency_key you’ve successfully processed together with the event’s type_event, and check incoming events against that store before acting on them:
Keep in mind that not every event type carries data.idempotency_key yet (see Coverage above). For event types without it, fall back to your own de-duplication key, such as the combination of resource ID and event type.

Common Webhook Events

Yuno sends event notifications for various activities within the payment ecosystem. Below are the available event categories and their corresponding events.

Payment events

Refund events

Subscription events

Each renewal charge is delivered as a payment.purchase webhook tied to the subscription, with the outcome (success or decline) carried in the status/sub_status fields. $0/trial cycles emit no payment webhook — for plan-based subscriptions they are reported as subscription.cycle_executed instead. There is no subscription.error event: a failed renewal is signaled by subscription.past_due where that status is enabled, and by the payment.purchase webhook everywhere.
Treat the plan-change events as notifications, not as the source of truth. Reconcile against GET /v1/subscriptions/{id}pending_plan_change for a scheduled change and plan_id for an applied one — rather than relying on webhook delivery alone.

Enrollment events

Payout events

Marketplace Split Transfer events

Banking Connectivity webhook events

Banking Connectivity (Banking as a Service) webhook notifications follow the same delivery and retry behavior described above. Yuno sends these events to your configured webhook endpoint when the status of a Banking Connectivity resource changes. For incoming transfer payload structure, see Webhook Notifications (Banking Connectivity). Incoming transfer notifications are sent to your endpoint at {merchant_base_URL}/v1/banking/transfers.

Entity events

Onboarding events

Account events

Transfer events (outgoing)

Transfer events (incoming)