Lista zdarzeń wysyłanych na webhook
Jeśli sam obsługujesz automatyzację, możesz zrobić to programistycznie, lub z pomocą narzędzi jak Zapier. W ustawieniach produktu dodaj adres URL webhooka w zakładce Integracje i webhook. Po zakupie trafią na niego informacje na temat transakcji. Webhook możesz wygenerować za pomocą Zapiera lub Make (dawniej Integromat).
Główne zdarzenia, po których filtrujemy oznaczone są kluczem event i są to odpowiednio:
- single_product_bought - zakup pojedynczego produktu
- product_assigned - udane przypisanie dostępu do pojedynczego produktu
- product_access_expiring - dostęp do pojedynczego produktu wkrótce wygaśnie
- product_access_expired - wygaśnięcie dostępu do pojedynczego produktu
- subscription_created - zakup nowej subskrypcji
- subscription_plan_changed - zmiana planu przez panel Easycart
- subscription_canceled - anulowanie subskrypcji w panelu Easycart (będzie ważna do końca okresu rozliczeniowego)
- subscription_expired - ostateczne wygaśnięcie subskrypcji
- subscription_renewed - odnowienie subskrypcji
- subscription_renewal_failed - nieudana próba pobrania środków przy odnowieniu
- subscription_renewal_upcoming - zbliżające się odnowienie
- subscription_resumed - udane wznowienie subskrypcji
- subscription_deleted - permanentne usunięcie subskrypcji
- customer_data_changed - zmiana danych klienta
Wszystkie przypadki oraz odpowiedzi webhooka znajdziesz poniżej
Webhook po pomyślnym zakupie pojedynczego produktu
{
"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 po pomyślnym przypisaniu dostępu do pojedynczego produktu
{
"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 kiedy wygasa dostęp do jednorazowego zakupu
{
"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 po wygaśnięciu dostępu do produktu
{
"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 po pomyślnym zakupie subskrypcji
Jest to zdarzenie wysyłane po zakupie subskrypcji. Na tym etapie należy przydzielić dostęp do produktu.
Ważne: subskrypcja może być aktywowana w trybie okresu próbnego (Trial). W takiej sytuacji właściwość trial_ends_at będzie wskazywać na datę jego zakończenia. W przeciwnym razie będzie ustawione na wartość 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 po kliknięciu Przełącz na ten plan w panelu subskrypcji
Klient ma możliwość przełączenia się na inny plan (o ile taki został zdefiniowany) z poziomu panelu Easycart. Nazwa planu przekazana do webhooka będzie pochodzić stąd:

- Właściwość subscription_plan_name mówi Ci na jaki plan przełączył się użytkownik
- Właściwość subscription_plan_price mówi jaka jest aktualna cena.
{
"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 po kliknięciu przez użytkownika Anuluj w panelu subskrypcji
Właściwość subscription_current_period_end wskazuje na datę w której plan powinien zostać wyłączony (i tym samym odebrany dostęp do produktu).
{
"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 po wygaśnięciu subskrypcji
Zdarzenie wysyłane w chwili gdy subskrypcja przestaje być aktywna w wyniku jej anulowania przez klienta lub ręcznego anulowania w panelu Stripe lub w sytuacji gdy nie udało się pobrać opłaty określoną liczbę razy. Jest to moment w którym dostęp do produktu powinien zostać wyłączony.
{
"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 po poprawnym pobraniu pieniędzy za kolejny okres rozliczeniowy
Po pobraniu opłaty za okres rozliczeniowy, wysyłane jest zdarzenie zawierające poniższe dane.
- Właściwość amount_paid to pobrana kwota w PLN - na tę kwotę należy wystawić fakturę
- Dane do faktury znajdują się we właściwości invoice_data (która może być wartością null w przypadku ich braku)
{
"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 przy nieudanej próbie pobrania pieniędzy za kolejny okres rozliczeniowy
W przypadku nieudanej próby pobrania pieniędzy za okres rozliczeniowy. Właściwość error_message zawiera informację o błędzie.
{
"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 na X dni przed kolejnym pobraniem pieniędzy
Poniższe dane wysyłane są na webhook na X dni przed kolejnym pobraniem pieniędzy. Właściwość subscription_renews_at wskazuje na datę, kiedy nastąpi najbliższe pobranie opłaty.
Webhook wysyłany jest na podstawie zdarzenia invoice.upcoming od 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 na X dni przed zakończeniem trial
Webhook jest identyczny jak powyższy, ale jeżeli właściwość trial_ends_atnie jest równanull, to znaczy, że będzie to pierwsze pobranie.
W Stripe masz możliwość ustawienia ile dni przed pobraniem pierwszej płatności ma zostać wysłane powiadomienie do klienta.
Aby to zrobić:
- Przejdź do ustawień w Stripe
- W sekcji Prevent failed payments wybierz odpowiednią liczbę dni

{
"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 po udanym wznowieniu subskrypcji
{
"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 po usunięciu subskrypcji
{
"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 po modyfikacji danych klienta
{
"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"
}
}
}