Saltar al contenido

Lista de eventos de webhook

Descubre todos los eventos de webhook de Easytools y elige los disparadores de automatización perfectos para tu negocio.

Última actualización
9 de junio de 2025

Lista completa de eventos de webhook

Si gestionas tú mismo la automatización, puedes hacerlo mediante programación o con herramientas como Zapier. En los ajustes del producto, añade la URL del webhook en la pestaña de integraciones y webhooks. Tras la compra, ahí se enviará la información de la transacción. Puedes generar el webhook con Zapier o con Make (antes Integromat).

Los principales eventos por los que filtramos están marcados con su clave de evento y son los siguientes:

Todos los casos y las respuestas de los webhooks se detallan a continuación:

Webhook tras la compra de un producto individual

{
  "event": "single_product_bought",
  "timestamp": 1741442518,
  "success": true,
  "is_subscription": false,
  "is_renew": false,
  "is_new": true,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": 50,
  "next_payment_attempt": null,
  "invoice_stripe_id": "pi_sample123456",
  "lang": "pl",
  "customer_name": "Jane Doe",
  "customer_first_name": "Jane",
  "customer_last_name": "Doe",
  "customer_email": "janedoe@example.com",
  "customer_id": 100002,
  "customer_stripe_id": "cus_sample654321",
  "order_id": 500002,
  "order_uuid": "00000000-0000-0000-0000-000000000004",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 50,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "samplescope2",
  "invoice_vat_rate": "0",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": true,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "p24",
  "promo_code": null,
  "product_id": "prod_sample654321",
  "product_name": "Sample Online Workshop",
  "product_description": "This is a sample description for an online workshop product. It includes details about the workshop, its content, schedule and other important information.",
  "product_file": null,
  "price_id": "price_sample654321",
  "price_custom_id": null,
  "price_name": "Online access",
  "price_description": null,
  "subscription_id": null,
  "subscription_stripe_id": null,
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": null,
  "subscription_plan_price": null,
  "subscription_current_period_start": null,
  "subscription_current_period_end": null,
  "subscription_onetime": false,
  "tenant_email": "contact@example.com",
  "tenant_name": "Sample Brand",
  "tenant_slug": "samplebrand",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "expiration_date": null
}

Webhook tras la asignación correcta del producto

{
  "event": "product_assigned",
  "timestamp": 1741442523,
  "success": true,
  "is_subscription": false,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "John Smith",
  "customer_first_name": "John",
  "customer_last_name": "Smith",
  "customer_email": "john.smith@example.com",
  "customer_id": 100001,
  "customer_stripe_id": "cus_XXXXXXXXXXXXXXXX",
  "order_id": 500001,
  "order_uuid": "00000000-0000-4000-a000-000000000001",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 50,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "demo",
  "invoice_vat_rate": "0",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": true,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "p24",
  "promo_code": null,
  "product_id": "prod_XXXXXXXXXXXX",
  "product_name": "Sample Product",
  "product_description": "This is a sample product description that replaces the original content. It contains information about what the customer will receive after purchasing this product.",
  "product_file": null,
  "price_id": "price_XXXXXXXXXXXX",
  "price_custom_id": null,
  "price_name": "online access",
  "price_description": null,
  "subscription_id": null,
  "subscription_stripe_id": null,
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": null,
  "subscription_plan_price": null,
  "subscription_current_period_start": null,
  "subscription_current_period_end": null,
  "subscription_onetime": false,
  "tenant_email": "info@example.com",
  "tenant_name": "Demo Company",
  "tenant_slug": "demo",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "assignee": {
    "id": 100001,
    "stripe_id": "cus_XXXXXXXXXXXXXXXX",
    "name": "John Smith",
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com"
  },
  "expiration_date": null
}

Webhook cuando el acceso al producto individual está a punto de caducar

{
  "event": "product_access_expiring",
  "timestamp": 1741428904,
  "success": true,
  "is_subscription": false,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Robert Johnson",
  "customer_first_name": "Robert",
  "customer_last_name": "Johnson",
  "customer_email": "robert.johnson@example.com",
  "customer_id": 100003,
  "customer_stripe_id": "cus_sample789012",
  "order_id": 500003,
  "order_uuid": "00000000-0000-0000-0000-000000000005",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": true,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": {
    "nip": "0000000001",
    "name": "SAMPLE COMPANY TWO SP. Z O.O.",
    "first_name": "Robert",
    "last_name": "Johnson",
    "street": "Sample Avenue",
    "street_number": "456",
    "house_number": null,
    "city": "Another City",
    "post_code": "00000",
    "post_city": null,
    "country_code": "PL"
  },
  "invoice_api_scope": "samplescope3",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": "12",
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": null,
  "promo_code": "SAMPLE123",
  "product_id": "prod_sample789012",
  "product_name": "Sample Course Access",
  "product_description": "Access to community focused on the course 'Sample Course Title' with additional materials and resources.",
  "product_file": null,
  "price_id": "price_sample789012",
  "price_custom_id": "sample-course-yearly",
  "price_name": "Yearly Access",
  "price_description": null,
  "subscription_id": null,
  "subscription_stripe_id": null,
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": null,
  "subscription_plan_price": null,
  "subscription_current_period_start": null,
  "subscription_current_period_end": null,
  "subscription_onetime": true,
  "tenant_email": "info@example.com",
  "tenant_name": "sampleedu",
  "tenant_slug": "sampleedu",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "expiration_date": "2025-03-11T11:14:56+01:00",
  "assignee": {
    "id": 100003,
    "stripe_id": "cus_sample789012",
    "name": "Robert Johnson",
    "first_name": "Robert",
    "last_name": "Johnson",
    "email": "robert.johnson@example.com"
  }
}

Webhook tras la caducidad del acceso al producto individual

{
  "event": "product_access_expired",
  "timestamp": 1741442044,
  "success": true,
  "is_subscription": false,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Emily Wilson",
  "customer_first_name": "Emily",
  "customer_last_name": "Wilson",
  "customer_email": "emily.wilson@example.com",
  "customer_id": 100004,
  "customer_stripe_id": "cus_sample345678",
  "order_id": 500004,
  "order_uuid": "00000000-0000-0000-0000-000000000006",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "samplescope3",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": "12",
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": null,
  "promo_code": "SAMPLE456",
  "product_id": "prod_sample345678",
  "product_name": "Sample Online Course",
  "product_description": "Monthly access to online course 'Sample Course Title' by John Author including video materials and exercises.",
  "product_file": null,
  "price_id": "price_sample345678",
  "price_custom_id": "sample-course-one-month",
  "price_name": "",
  "price_description": null,
  "subscription_id": null,
  "subscription_stripe_id": null,
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": null,
  "subscription_plan_price": null,
  "subscription_current_period_start": null,
  "subscription_current_period_end": null,
  "subscription_onetime": false,
  "tenant_email": "info@example.com",
  "tenant_name": "sampleedu",
  "tenant_slug": "sampleedu",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "expiration_date": "2025-03-08T14:53:15+01:00",
  "assignee": {
    "id": 100004,
    "stripe_id": "cus_sample345678",
    "name": "Emily Wilson",
    "first_name": "Emily",
    "last_name": "Wilson",
    "email": "emily.wilson@example.com"
  }
}

Webhook tras la compra correcta de una suscripción

Este evento se envía tras la compra de una suscripción. En este punto, se debería conceder el acceso al producto. Importante: la suscripción puede activarse en modo de prueba. En ese caso, la propiedad trial_ends_at indicará la fecha de finalización. Si no, su valor será null.

{
  "event": "subscription_created",
  "timestamp": 1741438333,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": true,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": "2025-03-22T13:52:05+01:00",
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": 0,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "John Doe",
  "customer_first_name": "John",
  "customer_last_name": "Doe",
  "customer_email": "john.doe@example.com",
  "customer_id": 10001,
  "customer_stripe_id": "cus_XXXXXXXXXXXX",
  "order_id": 500001,
  "order_uuid": "00000000-0000-0000-0000-000000000001",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": true,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": {
    "nip": "1234567890",
    "name": "EXAMPLE COMPANY NAME",
    "first_name": "John",
    "last_name": "Doe",
    "street": "Example Street",
    "street_number": "10",
    "house_number": "5",
    "city": "Example City",
    "post_code": "12345",
    "post_city": "Example City",
    "country_code": "PL"
  },
  "invoice_api_scope": "esy",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_XXXXXXXXXXXX",
  "product_name": "Example Product",
  "product_description": "Example product description with multiple lines\\n\\n✔︎ Feature one\\n\\n✔︎ Feature two\\n\\n✔︎ Feature three",
  "product_file": null,
  "price_id": "price_XXXXXXXXXXXX",
  "price_custom_id": "example:1+feature",
  "price_name": "Example pricing tier",
  "price_description": null,
  "subscription_id": 100001,
  "subscription_stripe_id": "sub_XXXXXXXXXXXX",
  "subscription_plan_custom_id": "example:1+feature",
  "subscription_plan_name": null,
  "subscription_price_name": "Example pricing tier",
  "subscription_plan_price": 99.99,
  "subscription_current_period_start": "2025-03-08T13:52:05+01:00",
  "subscription_current_period_end": "2025-03-22T13:52:05+01:00",
  "subscription_onetime": false,
  "tenant_email": "contact@example.com",
  "tenant_name": "example",
  "tenant_slug": "example",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": "app",
  "next_payment_amount": 99.99,
  "expiration_date": null
}

Webhook al hacer clic en Switch to this plan (cambiar a este plan) en el panel de suscripción

El cliente tiene la opción de cambiar a otro plan (si se ha definido alguno) desde el panel de Easycart. El nombre del plan que se envía al webhook procede de aquí:

Webhook after clicking Switch to this plan in the subscription panel

  • La propiedad subscription_plan_name indica a qué plan cambió el usuario
  • La propiedad subscription_plan_price indica el precio actual.
{
  "event": "subscription_plan_changed",
  "timestamp": 1741348534,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": 99,
  "next_payment_attempt": null,
  "invoice_stripe_id": "pi_XXXXXXXXXXXXX",
  "lang": "pl",
  "customer_name": "Michael Green",
  "customer_first_name": "Michael",
  "customer_last_name": "Green",
  "customer_email": "michael.green@example.com",
  "customer_id": 100006,
  "customer_stripe_id": "cus_DDDDDDDDDDDD",
  "order_id": 500006,
  "order_uuid": "00000000-0000-4000-a000-000000000006",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 99,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "edu",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_DDDDDDDDDDDD",
  "product_name": "Education Platform Access",
  "product_description": "Education platform subscription in any variant - covering all or selected specializations, and access to the community.",
  "product_file": null,
  "price_id": "price_DDDDDDDDDDDD",
  "price_custom_id": "full-access-monthly",
  "price_name": "full access",
  "price_description": null,
  "subscription_id": 90004,
  "subscription_stripe_id": "sub_DDDDDDDDDDDD",
  "subscription_plan_custom_id": "full-access-monthly",
  "subscription_plan_name": null,
  "subscription_price_name": "full access",
  "subscription_plan_price": 199,
  "subscription_current_period_start": "2025-02-10T14:10:04+01:00",
  "subscription_current_period_end": "2025-03-10T14:10:04+01:00",
  "subscription_onetime": false,
  "tenant_email": "support@example.com",
  "tenant_name": "education",
  "tenant_slug": "education",
  "custom_fields": {
    "specialization": "Full-stack Development"
  },
  "custom_params": {},
  "custom_email": {
    "heading": "Thank you for your purchase!",
    "content": "<p>Transactions are handled by a secure payment processor to provide the highest quality, security, and support for your purchases.</p>\\n<p>You will soon receive an email with access to the platform. You can manage your subscription, invoices, and payment methods from your account.</p>\\n<p>Thank you for being with us 😊</p>\\n"
  },
  "cross_sells": [],
  "ref": null,
  "assignee": {
    "id": 100006,
    "stripe_id": "cus_DDDDDDDDDDDD",
    "name": "Michael Green",
    "first_name": "Michael",
    "last_name": "Green",
    "email": "michael.green@example.com"
  }
}

Webhook cuando el usuario hace clic en Cancel (cancelar) en el panel de suscripción

La propiedad subscription_current_period_end indica la fecha en la que el plan debería desactivarse (y, por tanto, revocarse el acceso al producto).

{
  "event": "subscription_canceled",
  "timestamp": 1741441696,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": "2025-03-12T20:18:06+01:00",
  "subscription_renews_at": null,
  "subscription_canceled": true,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "John Smith",
  "customer_first_name": "John",
  "customer_last_name": "Smith",
  "customer_email": "example@example.com",
  "customer_id": 100001,
  "customer_stripe_id": "cus_sample123456",
  "order_id": 500001,
  "order_uuid": "00000000-0000-0000-0000-000000000001",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": true,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": {
    "nip": "0000000000",
    "name": "SAMPLE COMPANY NAME SP. Z O.O.",
    "first_name": null,
    "last_name": null,
    "street": "ul. Sample Street",
    "street_number": "123",
    "house_number": null,
    "city": "Sample City",
    "post_code": "00000",
    "post_city": "Sample City",
    "country_code": "PL"
  },
  "invoice_api_scope": "samplescope",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Smith",
    "phone": null,
    "address": "Sample Street 123",
    "post_code": "00-000",
    "city": "Sample City",
    "country_code": null
  },
  "delivery": null,
  "payment_method": "googlePay",
  "promo_code": null,
  "product_id": "prod_sample123456",
  "product_name": "Sample Product",
  "product_description": "This is a sample description for the product with multiple bullet points:\\n* Feature 1\\n* Feature 2\\n* Feature 3\\n* Additional benefits and more details",
  "product_file": null,
  "price_id": "price_sample123456",
  "price_custom_id": "sample-subscription-yearly",
  "price_name": "Yearly subscription (35% discount)",
  "price_description": null,
  "subscription_id": 100001,
  "subscription_stripe_id": "sub_sample123456",
  "subscription_plan_custom_id": "sample-subscription-yearly",
  "subscription_plan_name": null,
  "subscription_price_name": "Yearly subscription (35% discount)",
  "subscription_plan_price": 1499,
  "subscription_current_period_start": "2025-02-26T20:18:06+01:00",
  "subscription_current_period_end": "2025-03-12T20:18:06+01:00",
  "subscription_onetime": false,
  "tenant_email": "admin@example.com",
  "tenant_name": "sample",
  "tenant_slug": "sample",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [
    {
      "id": "00000000-0000-0000-0000-000000000002",
      "variant_id": 60001,
      "name": "Cross-sell Product 1",
      "variant_name": "",
      "is_recurring": false,
      "photo_url": "<https://example.com/sample-image-1.webp>",
      "description": "This is a sample description for cross-sell product 1. It highlights features and benefits of the product.",
      "original_amount": 9700,
      "amount": 7700,
      "gross_amount": 7700,
      "show_net_price": false,
      "is_net_amount": false,
      "currency": "pln",
      "tax_behavior": "inclusive",
      "tax_rate": 5,
      "active_days": null,
      "interval_count": null,
      "interval": null,
      "active_cycles": null,
      "trial_period_days": null,
      "discount_code_id": 50001,
      "discount_amount_off": 2000,
      "discount_percent_off": null,
      "discount_duration": {
        "type": "once",
        "until": null
      },
      "human_interval": "",
      "url": "<https://app.example.com/cross-sell/00000000-0000-0000-0000-000000000002/00000000-0000-0000-0000-000000000001>"
    },
    {
      "id": "00000000-0000-0000-0000-000000000003",
      "variant_id": 60002,
      "name": "Cross-sell Product 2",
      "variant_name": "Lifetime access",
      "is_recurring": false,
      "photo_url": "<https://example.com/sample-image-2.webp>",
      "description": "This is a sample description for cross-sell product 2. It highlights features and benefits of this second product.",
      "original_amount": 19700,
      "amount": 9700,
      "gross_amount": 9700,
      "show_net_price": false,
      "is_net_amount": false,
      "currency": "pln",
      "tax_behavior": "inclusive",
      "tax_rate": null,
      "active_days": null,
      "interval_count": null,
      "interval": null,
      "active_cycles": null,
      "trial_period_days": null,
      "discount_code_id": 50002,
      "discount_amount_off": 10000,
      "discount_percent_off": null,
      "discount_duration": {
        "type": "once",
        "until": null
      },
      "human_interval": "",
      "url": "<https://app.example.com/cross-sell/00000000-0000-0000-0000-000000000003/00000000-0000-0000-0000-000000000001>"
    }
  ],
  "ref": null
}

Webhook tras el vencimiento de la suscripción

Evento que se envía cuando la suscripción pasa a estar inactiva por cancelación del cliente, cancelación manual en el panel de Stripe, o porque el cobro ha fallado un número determinado de veces. En este momento se debería desactivar el acceso al producto.

{
  "event": "subscription_expired",
  "timestamp": 1741441696,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": "2025-03-12T20:18:06+01:00",
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": true,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "John Smith",
  "customer_first_name": "John",
  "customer_last_name": "Smith",
  "customer_email": "example@example.com",
  "customer_id": 100001,
  "customer_stripe_id": "cus_sample123456",
  "order_id": 500001,
  "order_uuid": "00000000-0000-0000-0000-000000000001",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": true,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": {
    "nip": "0000000000",
    "name": "SAMPLE COMPANY NAME SP. Z O.O.",
    "first_name": null,
    "last_name": null,
    "street": "ul. Sample Street",
    "street_number": "123",
    "house_number": null,
    "city": "Sample City",
    "post_code": "00000",
    "post_city": "Sample City",
    "country_code": "PL"
  },
  "invoice_api_scope": "samplescope",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Smith",
    "phone": null,
    "address": "Sample Street 123",
    "post_code": "00-000",
    "city": "Sample City",
    "country_code": null
  },
  "delivery": null,
  "payment_method": "googlePay",
  "promo_code": null,
  "product_id": "prod_sample123456",
  "product_name": "Sample Product",
  "product_description": "This is a sample description for the product with multiple bullet points:\\n* Feature 1\\n* Feature 2\\n* Feature 3\\n* Additional benefits and more details",
  "product_file": null,
  "price_id": "price_sample123456",
  "price_custom_id": "sample-subscription-yearly",
  "price_name": "Yearly subscription (35% discount)",
  "price_description": null,
  "subscription_id": 100001,
  "subscription_stripe_id": "sub_sample123456",
  "subscription_plan_custom_id": "sample-subscription-yearly",
  "subscription_plan_name": null,
  "subscription_price_name": "Yearly subscription (35% discount)",
  "subscription_plan_price": 1499,
  "subscription_current_period_start": "2025-02-26T20:18:06+01:00",
  "subscription_current_period_end": "2025-03-12T20:18:06+01:00",
  "subscription_onetime": false,
  "tenant_email": "admin@example.com",
  "tenant_name": "sample",
  "tenant_slug": "sample",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [
    {
      "id": "00000000-0000-0000-0000-000000000002",
      "variant_id": 60001,
      "name": "Cross-sell Product 1",
      "variant_name": "",
      "is_recurring": false,
      "photo_url": "<https://example.com/sample-image-1.webp>",
      "description": "This is a sample description for cross-sell product 1. It highlights features and benefits of the product.",
      "original_amount": 9700,
      "amount": 7700,
      "gross_amount": 7700,
      "show_net_price": false,
      "is_net_amount": false,
      "currency": "pln",
      "tax_behavior": "inclusive",
      "tax_rate": 5,
      "active_days": null,
      "interval_count": null,
      "interval": null,
      "active_cycles": null,
      "trial_period_days": null,
      "discount_code_id": 50001,
      "discount_amount_off": 2000,
      "discount_percent_off": null,
      "discount_duration": {
        "type": "once",
        "until": null
      },
      "human_interval": "",
      "url": "<https://app.example.com/cross-sell/00000000-0000-0000-0000-000000000002/00000000-0000-0000-0000-000000000001>"
    },
    {
      "id": "00000000-0000-0000-0000-000000000003",
      "variant_id": 60002,
      "name": "Cross-sell Product 2",
      "variant_name": "Lifetime access",
      "is_recurring": false,
      "photo_url": "<https://example.com/sample-image-2.webp>",
      "description": "This is a sample description for cross-sell product 2. It highlights features and benefits of this second product.",
      "original_amount": 19700,
      "amount": 9700,
      "gross_amount": 9700,
      "show_net_price": false,
      "is_net_amount": false,
      "currency": "pln",
      "tax_behavior": "inclusive",
      "tax_rate": null,
      "active_days": null,
      "interval_count": null,
      "interval": null,
      "active_cycles": null,
      "trial_period_days": null,
      "discount_code_id": 50002,
      "discount_amount_off": 10000,
      "discount_percent_off": null,
      "discount_duration": {
        "type": "once",
        "until": null
      },
      "human_interval": "",
      "url": "<https://app.example.com/cross-sell/00000000-0000-0000-0000-000000000003/00000000-0000-0000-0000-000000000001>"
    }
  ],
  "ref": null
}

Webhook tras cobrar correctamente el siguiente periodo de facturación

Tras cobrar la cuota del periodo de facturación, se envía un evento con los siguientes datos.

  • La propiedad amount_paid es el importe cobrado - este es el importe por el que se debería emitir la factura
  • Los datos de la factura están en la propiedad invoice_data (que puede ser null si no está disponible)
{
  "event": "subscription_renewed",
  "timestamp": 1741442223,
  "success": true,
  "is_subscription": true,
  "is_renew": true,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": 39,
  "next_payment_attempt": null,
  "invoice_stripe_id": "pi_XXXXXXXXXXXXX",
  "lang": "pl",
  "customer_name": "Robert Jones",
  "customer_first_name": "Robert",
  "customer_last_name": "Jones",
  "customer_email": "robert.jones@example.com",
  "customer_id": 100003,
  "customer_stripe_id": "cus_ZZZZZZZZZZZZZZ",
  "order_id": 500003,
  "order_uuid": "00000000-0000-4000-a000-000000000003",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 0,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "12345678",
  "invoice_vat_rate": 23,
  "invoice_flat_rate": 8.5,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "Robert",
    "last_name": "Jones",
    "phone": null,
    "address": "Main Street 123",
    "post_code": "00-000",
    "city": "Sample City",
    "country_code": null
  },
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_AAAAAAAAAAAA",
  "product_name": "Regular Access",
  "product_description": "This subscription provides all the tools you need. One subscription - three services with special pricing!",
  "product_file": null,
  "price_id": "price_AAAAAAAAAAAA",
  "price_custom_id": null,
  "price_name": "",
  "price_description": null,
  "subscription_id": 90001,
  "subscription_stripe_id": "sub_AAAAAAAAAAAA",
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": "",
  "subscription_plan_price": 39,
  "subscription_current_period_start": "2025-03-08T13:55:44+01:00",
  "subscription_current_period_end": "2025-04-08T14:55:44+02:00",
  "subscription_onetime": false,
  "tenant_email": "admin@example.com",
  "tenant_name": "Service Provider",
  "tenant_slug": "service",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null
}

Webhook por intento fallido de cobro del siguiente periodo de facturación

En caso de que falle el intento de cobro del periodo de facturación. La propiedad error_message contiene información sobre el error.

{
  "event": "subscription_renewal_failed",
  "timestamp": 1741441970,
  "success": false,
  "is_subscription": true,
  "is_renew": true,
  "is_new": false,
  "last_chance": false,
  "error_message": "do_not_honor",
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": "2025-03-09T13:52:44+01:00",
  "invoice_stripe_id": "in_XXXXXXXXXXXXX",
  "lang": "pl",
  "customer_name": "Emily Brown",
  "customer_first_name": "Emily",
  "customer_last_name": "Brown",
  "customer_email": "emily.brown@example.com",
  "customer_id": 100005,
  "customer_stripe_id": "cus_CCCCCCCCCCCCC",
  "order_id": 500005,
  "order_uuid": "00000000-0000-4000-a000-000000000005",
  "order_delegated": true,
  "order_assign_url": null,
  "order_amount": 24.6,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "demo",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_CCCCCCCCCCCC",
  "product_name": "Calendar App",
  "product_description": "Subscribe to Calendar App in monthly or yearly plan and forget about scheduling meetings. Net price. VAT will be added after selecting country.",
  "product_file": null,
  "price_id": "price_CCCCCCCCCCCC",
  "price_custom_id": "basic-monthly",
  "price_name": "Monthly Subscription Basic Plan",
  "price_description": null,
  "subscription_id": 90003,
  "subscription_stripe_id": "sub_CCCCCCCCCCCC",
  "subscription_plan_custom_id": "basic-monthly",
  "subscription_plan_name": null,
  "subscription_price_name": "Monthly Subscription Basic Plan",
  "subscription_plan_price": 20,
  "subscription_current_period_start": "2025-03-08T13:51:52+01:00",
  "subscription_current_period_end": "2025-04-08T14:51:52+02:00",
  "subscription_onetime": false,
  "tenant_email": "hello@example.com",
  "tenant_name": "calendar",
  "tenant_slug": "calendar",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null
}

Webhook X días antes del siguiente cobro

Estos datos se envían al webhook X días antes del siguiente cobro. La propiedad subscription_renews_at indica la fecha en la que se producirá el siguiente cobro.

El webhook se envía en función del evento invoice.upcoming de Stripe.

{
  "event": "subscription_renewal_upcoming",
  "timestamp": 1741442558,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": "2025-03-11T16:01:42+01:00",
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Sarah Wilson",
  "customer_first_name": "Sarah",
  "customer_last_name": "Wilson",
  "customer_email": "sarah.wilson@example.com",
  "customer_id": 100004,
  "customer_stripe_id": "cus_BBBBBBBBBBBBBB",
  "order_id": 500004,
  "order_uuid": "00000000-0000-4000-a000-000000000004",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 26,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "12345678",
  "invoice_vat_rate": 23,
  "invoice_flat_rate": 8.5,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "Sarah",
    "last_name": "Wilson",
    "phone": null,
    "address": "Central Avenue 42",
    "post_code": "10-100",
    "city": "Another City",
    "country_code": null
  },
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_BBBBBBBBBBBB",
  "product_name": "Music Library",
  "product_description": "This is a streaming service that gives you access to thousands of music tracks with just one click. Now you can have all songs and music backgrounds in one place.",
  "product_file": null,
  "price_id": "price_BBBBBBBBBBBB",
  "price_custom_id": null,
  "price_name": "1-month (subscription)",
  "price_description": null,
  "subscription_id": 90002,
  "subscription_stripe_id": "sub_BBBBBBBBBBBB",
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": "1-month (subscription)",
  "subscription_plan_price": 26,
  "subscription_current_period_start": "2025-02-11T15:01:42+01:00",
  "subscription_current_period_end": "2025-03-11T15:01:42+01:00",
  "subscription_onetime": false,
  "tenant_email": "admin@example.com",
  "tenant_name": "Music Service",
  "tenant_slug": "music",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "next_payment_amount": 26
}

Webhook X días antes de que termine la prueba

Este webhook es idéntico al anterior, pero si la propiedad trial_ends_at no es null, significa que será el primer cobro. En Stripe puedes configurar con cuántos días de antelación al primer cobro se debe enviar una notificación al cliente. Para hacerlo:

  1. Ve a los ajustes de Stripe
  2. En la sección Prevent failed payments (evitar pagos fallidos), selecciona el número de días adecuado

Webhook X days before the end of the trial

{
  "event": "subscription_renewal_upcoming",
  "timestamp": 1741442558,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": "2025-03-11T16:01:42+01:00",
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Sarah Wilson",
  "customer_first_name": "Sarah",
  "customer_last_name": "Wilson",
  "customer_email": "sarah.wilson@example.com",
  "customer_id": 100004,
  "customer_stripe_id": "cus_BBBBBBBBBBBBBB",
  "order_id": 500004,
  "order_uuid": "00000000-0000-4000-a000-000000000004",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 26,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "12345678",
  "invoice_vat_rate": 23,
  "invoice_flat_rate": 8.5,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "Sarah",
    "last_name": "Wilson",
    "phone": null,
    "address": "Central Avenue 42",
    "post_code": "10-100",
    "city": "Another City",
    "country_code": null
  },
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_BBBBBBBBBBBB",
  "product_name": "Music Library",
  "product_description": "This is a streaming service that gives you access to thousands of music tracks with just one click. Now you can have all songs and music backgrounds in one place.",
  "product_file": null,
  "price_id": "price_BBBBBBBBBBBB",
  "price_custom_id": null,
  "price_name": "1-month (subscription)",
  "price_description": null,
  "subscription_id": 90002,
  "subscription_stripe_id": "sub_BBBBBBBBBBBB",
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": "1-month (subscription)",
  "subscription_plan_price": 26,
  "subscription_current_period_start": "2025-02-11T15:01:42+01:00",
  "subscription_current_period_end": "2025-03-11T15:01:42+01:00",
  "subscription_onetime": false,
  "tenant_email": "admin@example.com",
  "tenant_name": "Music Service",
  "tenant_slug": "music",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null,
  "next_payment_amount": 26
}

Webhook tras reanudar correctamente la suscripción

{
  "event": "subscription_resumed",
  "timestamp": 1741395873,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": false,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Anna Johnson",
  "customer_first_name": "Anna",
  "customer_last_name": "Johnson",
  "customer_email": "anna.johnson@example.com",
  "customer_id": 100002,
  "customer_stripe_id": "cus_YYYYYYYYYYYYYYYY",
  "order_id": 500002,
  "order_uuid": "00000000-0000-4000-a000-000000000002",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 99,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "12345678",
  "invoice_vat_rate": 23,
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": {
    "first_name": "Anna",
    "last_name": "Johnson",
    "phone": "+48000000000",
    "address": null,
    "post_code": null,
    "city": null,
    "country_code": null
  },
  "delivery": null,
  "payment_method": "paymentRequest",
  "promo_code": null,
  "product_id": "prod_YYYYYYYYYYYY",
  "product_name": "Premium Subscription",
  "product_description": "This is a sample subscription product with various features and benefits for the subscriber. It includes access to premium content and other services.",
  "product_file": null,
  "price_id": "price_YYYYYYYYYYYY",
  "price_custom_id": null,
  "price_name": "Monthly Membership",
  "price_description": null,
  "subscription_id": 90000,
  "subscription_stripe_id": "sub_ZZZZZZZZZZZZZZ",
  "subscription_plan_custom_id": null,
  "subscription_plan_name": null,
  "subscription_price_name": "Monthly Membership",
  "subscription_plan_price": 99,
  "subscription_current_period_start": "2025-02-28T19:59:22+01:00",
  "subscription_current_period_end": "2025-03-31T20:59:22+02:00",
  "subscription_onetime": false,
  "tenant_email": "contact@example.com",
  "tenant_name": "Premium Service",
  "tenant_slug": "premium",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": "Order Summary",
    "content": "<p><strong>Thank you for your purchase!</strong> We're excited to have you as a member.</p>\\n<p>Below is your order summary and access to manage your subscription.</p>\\n<p>Remember that your subscription will <strong>automatically renew each month.</strong> You can cancel anytime. If you have any questions, just reach out to us!</p>\\n<p><strong>Click here to access your account and get started!</strong></p>\\n"
  },
  "cross_sells": [],
  "ref": null
}

Webhook tras eliminar la suscripción

{
  "event": "subscription_deleted",
  "timestamp": 1741441453,
  "success": true,
  "is_subscription": true,
  "is_renew": false,
  "is_new": false,
  "last_chance": false,
  "error_message": null,
  "trial_ends_at": null,
  "subscription_renews_at": null,
  "subscription_canceled": false,
  "subscription_expired": true,
  "subscription_new_plan_name": null,
  "amount_paid": null,
  "next_payment_attempt": null,
  "invoice_stripe_id": null,
  "lang": "pl",
  "customer_name": "Jessica Taylor",
  "customer_first_name": "Jessica",
  "customer_last_name": "Taylor",
  "customer_email": "jessica.taylor@example.com",
  "customer_id": 100007,
  "customer_stripe_id": "cus_EEEEEEEEEEEEE",
  "order_id": 500007,
  "order_uuid": "00000000-0000-4000-a000-000000000007",
  "order_delegated": false,
  "order_assign_url": null,
  "order_amount": 199,
  "order_has_invoice": false,
  "recovered_checkout_session": null,
  "currency": "pln",
  "quantity": 1,
  "qr_code_image": null,
  "qr_code_info": null,
  "invoice_data": null,
  "invoice_api_scope": "12345678",
  "invoice_vat_rate": "23",
  "invoice_flat_rate": null,
  "invoice_gtu_code": null,
  "invoice_remarks": null,
  "checkboxes": {
    "newsletter": false,
    "mandatory": false,
    "optional": false
  },
  "shipping": null,
  "delivery": null,
  "payment_method": "card",
  "promo_code": null,
  "product_id": "prod_EEEEEEEEEEEE",
  "product_name": "PRO",
  "product_description": null,
  "product_file": null,
  "price_id": "price_EEEEEEEEEEEE",
  "price_custom_id": "planner-15",
  "price_name": "Card Payment",
  "price_description": null,
  "subscription_id": 90005,
  "subscription_stripe_id": "sub_EEEEEEEEEEEE",
  "subscription_plan_custom_id": "planner-15",
  "subscription_plan_name": null,
  "subscription_price_name": "Card Payment",
  "subscription_plan_price": 199,
  "subscription_current_period_start": "2024-05-10T21:05:29+02:00",
  "subscription_current_period_end": "2024-06-10T21:05:29+02:00",
  "subscription_onetime": false,
  "tenant_email": "info@example.com",
  "tenant_name": "Planning App",
  "tenant_slug": "planning",
  "custom_fields": null,
  "custom_params": {},
  "custom_email": {
    "heading": null,
    "content": null
  },
  "cross_sells": [],
  "ref": null
}

Webhook tras modificar los datos del cliente

{
  "event": "customer_data_changed",
  "timestamp": 1741440113,
  "data": {
    "previous": {
      "customer_name": "Alice Brown",
      "customer_email": "alice.b@example.com"
    },
    "current": {
      "customer_name": "Alice Smith-Brown",
      "customer_email": "alice.b@example.com"
    }
  }
}
¿No encontraste lo que buscabas? Contáctanos