Svix

Prestashop Billing Webhook Event Types

This is the list of event types that we currently send.
For guidance on how to listen to these events, take a look at Svix's guide to consuming webhooks.

customer-billing-address.updated

Triggered when a customer billing address is updated.

Example customer-billing-address.updated
JSON
{
  "data": {
    "billingAddress": {
      "city": "Paris",
      "company": "company",
      "country": "FR",
      "first_name": "John",
      "last_name": "Doe",
      "line1": "1 rue de Rivoli",
      "object": "billing_address",
      "validation_status": "not_validated",
      "zip": "85000"
    },
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "vatNumber": ""
  },
  "eventType": "customer-billing-address.updated"
}

customer.created

Triggered when a customer is created, which happens only one time per store. You cannot expect to receive this event for your integrated module.

Example customer.created
JSON
{
  "data": {
    "chargebeeCustomerId": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
    "createdFromIp": "10.0.1.13",
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "shopId": "b2581e4b-0030-4fc8-9bf2-7f01c550a946"
  },
  "eventType": "customer.created"
}

customer.updated

Triggered when a customer is updated.

Example customer.updated
JSON
{
  "data": {
    "chargebeeCustomerId": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
    "createdFromIp": "10.0.1.13",
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "shopId": "b2581e4b-0030-4fc8-9bf2-7f01c550a946"
  },
  "eventType": "customer.updated"
}

invoice.generated

Triggered when an invoice is generated.

Example invoice.generated
JSON
{
  "data": {
    "invoice": {
      "amountDue": 0,
      "amountPaid": 0,
      "amountTotal": 7080,
      "currencyCode": "EUR",
      "customerId": "cde02ad4-667f-4c56-8950-332ce9ef1c55",
      "invoiceDate": 1698653360,
      "invoiceId": "14005",
      "lineItems": [
        {
          "amount": 5900,
          "componentId": "builtfor_free-EUR-Monthly",
          "description": "Builtfor free plan",
          "entityType": "plan_item_price",
          "invoiceLineItemId": "li_BTUA2hTu9gOJY6Fy",
          "subscriptionId": "BTM8jcTfkZNVEABI",
          "taxAmount": 1181,
          "taxRate": 20
        }
      ],
      "productId": "builtfor_example",
      "status": "paid",
      "subscriptionId": "BTM8jcTfkZNVEABI",
      "taxAmount": 1180,
      "taxIncluded": true
    },
    "module_id": "builtfor_example"
  },
  "eventType": "invoice.generated"
}

invoice.updated

Triggered when an invoice is updated.

Example invoice.updated
JSON
{
  "data": {
    "invoice": {
      "amountDue": 0,
      "amountPaid": 0,
      "amountTotal": 7080,
      "currencyCode": "EUR",
      "customerId": "cde02ad4-667f-4c56-8950-332ce9ef1c55",
      "invoiceDate": 1698653360,
      "invoiceId": "14005",
      "lineItems": [
        {
          "amount": 5900,
          "componentId": "builtfor_free-EUR-Monthly",
          "description": "Builtfor free plan",
          "entityType": "plan_item_price",
          "invoiceLineItemId": "li_BTUA2hTu9gOJY6Fy",
          "subscriptionId": "BTM8jcTfkZNVEABI",
          "taxAmount": 1181,
          "taxRate": 20
        }
      ],
      "productId": "builtfor_example",
      "status": "paid",
      "subscriptionId": "BTM8jcTfkZNVEABI",
      "taxAmount": 1180,
      "taxIncluded": true
    },
    "module_id": "builtfor_example"
  },
  "eventType": "invoice.updated"
}

payment.failed

Triggered when a payment has failed.

Example payment.failed
JSON
{
  "data": {
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "module_id": "foobar",
    "subscription": {
      "activated_at": 1636066800,
      "base_currency_code": "EUR",
      "billing_period": 1,
      "billing_period_unit": "month",
      "channel": "web",
      "created_at": 1636029127,
      "currency_code": "EUR",
      "current_term_end": 1639004399,
      "current_term_start": 1636412400,
      "customer_id": "AzZluuSkIEXas24Mv",
      "deleted": false,
      "due_invoices_count": 1,
      "due_since": 1636412400,
      "exchange_rate": 1,
      "has_scheduled_changes": false,
      "id": "AzZltzSnnXURXasn",
      "meta_data": {
        "module": "rbm-example"
      },
      "mrr": 100,
      "next_billing_at": 1639004400,
      "object": "subscription",
      "override_relationship": false,
      "plan_amount": 100,
      "plan_free_quantity": 0,
      "plan_id": "default-free",
      "plan_quantity": 1,
      "plan_unit_price": 100,
      "resource_version": 1636467088785,
      "started_at": 1635980400,
      "status": "active",
      "total_dues": 120,
      "trial_end": 1635980400,
      "trial_end_action": "site_default",
      "trial_start": 1635980400,
      "updated_at": 1636467088
    },
    "transaction": {
      "amount": 120,
      "amount_unused": 0,
      "base_currency_code": "EUR",
      "currency_code": "EUR",
      "customer_id": "AzZluuSkIEXas24Mv",
      "date": 1636467087,
      "deleted": false,
      "error_code": "authentication_required",
      "error_text": "Your card was declined. This transaction requires authentication.",
      "exchange_rate": 1,
      "fraud_reason": "The bank returned the decline code `authentication_required`.",
      "gateway": "stripe",
      "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
      "id": "txn_Azz5uVSoHB7gi16HQ",
      "id_at_gateway": "ch_3Jtv2pGp5Dc2lo8u16q8AjHP",
      "linked_invoices": [
        {
          "applied_amount": 120,
          "applied_at": 1636467088,
          "invoice_date": 1636412400,
          "invoice_id": "1531",
          "invoice_status": "payment_due",
          "invoice_total": 120
        }
      ],
      "linked_refunds": [],
      "masked_card_number": "************3184",
      "object": "transaction",
      "payment_method": "card",
      "payment_source_id": "pm_AzZlyjSoHAvW5Jdw",
      "resource_version": 1636467088743,
      "status": "failure",
      "subscription_id": "AzZltzSnnXURXasn",
      "type": "payment",
      "updated_at": 1636467088
    }
  },
  "eventType": "payment.failed"
}

payment.refunded

Triggered when a payment has been refunded.

Example payment.refunded
JSON
{
  "data": {
    "credit_note": {
      "allocations": [],
      "amount_allocated": 0,
      "amount_available": 0,
      "amount_refunded": 9999,
      "base_currency_code": "EUR",
      "billing_address": {
        "city": "Paris",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue des rues 75001 Paris",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "75001"
      },
      "channel": "web",
      "create_reason_code": "Subscription Cancellation",
      "currency_code": "EUR",
      "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "customer_notes": "",
      "date": 1702371866,
      "deleted": false,
      "exchange_rate": 1,
      "fractional_correction": 0,
      "generated_at": 1702371866,
      "id": "TEST-CN-2317",
      "line_item_discounts": [],
      "line_item_taxes": [],
      "line_items": [
        {
          "amount": 9999,
          "amount_in_decimal": "99.99",
          "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
          "date_from": 1702371849,
          "date_to": 1705049921,
          "description": "builtfor_example Basic - Prorated Credits for 12-Dec-2023 - 12-Jan-2024",
          "discount_amount": 0,
          "entity_description": "builtfor_example",
          "entity_id": "builtfor_example_basic-EUR-Monthly",
          "entity_type": "plan_item_price",
          "id": "li_BTTwcVTyDKrSC5zK",
          "is_taxed": false,
          "item_level_discount_amount": 0,
          "metered": false,
          "object": "line_item",
          "pricing_model": "flat_fee",
          "quantity": 1,
          "quantity_in_decimal": "1.000",
          "reference_line_item_id": "li_198OinTyDKn2p11r",
          "subscription_id": "BTcntHTvmOcjdP08",
          "tax_amount": 0,
          "tax_exempt_reason": "export",
          "unit_amount": 9999,
          "unit_amount_in_decimal": "99.99"
        }
      ],
      "linked_refunds": [
        {
          "applied_amount": 9999,
          "applied_at": 1702371989,
          "txn_amount": 9999,
          "txn_date": 1702371988,
          "txn_id": "txn_BTTvzWTyDLN9l24o",
          "txn_status": "success"
        }
      ],
      "object": "credit_note",
      "price_type": "tax_exclusive",
      "reason_code": "subscription_cancellation",
      "reference_invoice_id": "14944",
      "refunded_at": 1702371989,
      "resource_version": 1702371989273,
      "round_off_amount": 0,
      "status": "refunded",
      "sub_total": 9999,
      "subscription_id": "BTcntHTvmOcjdP08",
      "taxes": [],
      "total": 9999,
      "type": "refundable",
      "updated_at": 1702371989
    },
    "customer": {
      "allow_direct_debit": false,
      "auto_close_invoices": true,
      "auto_collection": "off",
      "billing_address": {
        "city": "Paris",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue des rues 75001 Paris",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "75001"
      },
      "card_status": "no_card",
      "cf_consent": "False",
      "cf_shop_id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": false,
        "send_payment_emails": false,
        "send_subscription_emails": false
      },
      "created_at": 1700135419,
      "created_from_ip": "115.42.32.112",
      "deleted": false,
      "email": "john.doe@gmail.com",
      "excess_payments": 0,
      "id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "locale": "en",
      "meta_data": {
        "shop_url": "https://johndoe.com"
      },
      "mrr": 0,
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "62adb639-27fc-4fec-b647-bfesdb937596",
        "parent_id": "r9v1De5915gjoy7D4r1P0WWilFu2",
        "payment_owner_id": "62adb639-27fc-4fec-b647-bfesdb937596",
        "root_id": "r9v1De5915gjoy7D4r1P0WWilFu2"
      },
      "resource_version": 1702371989266,
      "tax_providers_fields": [],
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1702371989,
      "use_default_hierarchy_settings": true
    },
    "invoice": {
      "adjustment_credit_notes": [],
      "amount_adjusted": 0,
      "amount_due": 0,
      "amount_paid": 9999,
      "amount_to_collect": 0,
      "applied_credits": [],
      "base_currency_code": "EUR",
      "billing_address": {
        "city": "Paris",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue des rues 75001 Paris",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "75001"
      },
      "channel": "web",
      "credits_applied": 0,
      "currency_code": "EUR",
      "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "date": 1702371849,
      "deleted": false,
      "due_date": 1702371849,
      "dunning_attempts": [],
      "exchange_rate": 1,
      "first_invoice": true,
      "generated_at": 1702371849,
      "has_advance_charges": false,
      "id": "14944",
      "is_gifted": false,
      "issued_credit_notes": [
        {
          "cn_create_reason_code": "Subscription Cancellation",
          "cn_date": 1702371866,
          "cn_id": "TEST-CN-2317",
          "cn_reason_code": "subscription_cancellation",
          "cn_status": "refunded",
          "cn_total": 9999
        }
      ],
      "line_items": [
        {
          "amount": 9999,
          "amount_in_decimal": "99.99",
          "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
          "date_from": 1702371849,
          "date_to": 1705049921,
          "description": "builtfor_example Basic - Prorated Charges",
          "discount_amount": 0,
          "entity_description": "builtfor_example",
          "entity_id": "builtfor_example_basic-EUR-Monthly",
          "entity_type": "plan_item_price",
          "id": "li_198OinTyDKn2p11r",
          "is_taxed": false,
          "item_level_discount_amount": 0,
          "metered": false,
          "object": "line_item",
          "pricing_model": "flat_fee",
          "quantity": 1,
          "quantity_in_decimal": "1.000",
          "subscription_id": "BTcntHTvmOcjdP08",
          "tax_amount": 0,
          "tax_exempt_reason": "export",
          "unit_amount": 9999,
          "unit_amount_in_decimal": "99.99"
        }
      ],
      "linked_orders": [],
      "linked_payments": [
        {
          "applied_amount": 9999,
          "applied_at": 1702371850,
          "txn_amount": 9999,
          "txn_date": 1702371849,
          "txn_id": "txn_198OinTyDKn5511s",
          "txn_status": "success"
        }
      ],
      "net_term_days": 0,
      "new_sales_amount": 9999,
      "object": "invoice",
      "paid_at": 1702371849,
      "payment_owner": "62adb639-27fc-4fec-b647-bfesdb937596",
      "price_type": "tax_exclusive",
      "recurring": true,
      "resource_version": 1702371989271,
      "round_off_amount": 0,
      "status": "paid",
      "sub_total": 9999,
      "subscription_id": "BTcntHTvmOcjdP08",
      "tax": 0,
      "term_finalized": true,
      "total": 9999,
      "updated_at": 1702371989,
      "write_off_amount": 0
    },
    "subscription": {
      "activated_at": 1702371521,
      "auto_close_invoices": true,
      "billing_period": 1,
      "billing_period_unit": "month",
      "cancelled_at": 1702371866,
      "channel": "web",
      "create_pending_invoices": false,
      "created_at": 1700141536,
      "currency_code": "EUR",
      "current_term_end": 1702371866,
      "current_term_start": 1702371521,
      "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "deleted": false,
      "due_invoices_count": 0,
      "has_scheduled_advance_invoices": false,
      "has_scheduled_changes": false,
      "id": "BTcntHTvmOcjdP08",
      "meta_data": {
        "module": "builtfor_example"
      },
      "mrr": 0,
      "object": "subscription",
      "override_relationship": false,
      "resource_version": 1702371866408,
      "started_at": 1700141536,
      "status": "cancelled",
      "subscription_items": [
        {
          "amount": 10000,
          "amount_in_decimal": "100.00",
          "free_quantity": 0,
          "free_quantity_in_decimal": "0.000",
          "item_price_id": "builtfor_example_basic-EUR-Monthly",
          "item_type": "plan",
          "object": "subscription_item",
          "quantity": 1,
          "quantity_in_decimal": "1.000",
          "trial_end": 1702371494,
          "unit_price": 10000,
          "unit_price_in_decimal": "100.00"
        }
      ],
      "trial_end": 1702371494,
      "trial_end_action": "site_default",
      "trial_start": 1700141536,
      "updated_at": 1702371866
    },
    "transaction": {
      "amount": 9999,
      "amount_unused": 0,
      "base_currency_code": "EUR",
      "currency_code": "EUR",
      "customer_id": "62adb639-27fc-4fec-b647-bfesdb937596",
      "date": 1702371988,
      "deleted": false,
      "error_code": "authentication_required",
      "error_text": "Your card was declined. This transaction requires authentication.",
      "exchange_rate": 1,
      "fraud_reason": "The bank returned the decline code `authentication_required`.",
      "gateway": "stripe",
      "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
      "id": "txn_BTTvzWTyDLN9l24o",
      "id_at_gateway": "re_3OMRsrGp5Dc2lo8u1dQpD6as",
      "linked_credit_notes": [
        {
          "applied_amount": 9999,
          "applied_at": 1702371989,
          "cn_create_reason_code": "Subscription Cancellation",
          "cn_date": 1702371866,
          "cn_id": "TEST-CN-2317",
          "cn_reason_code": "subscription_cancellation",
          "cn_reference_invoice_id": "14944",
          "cn_status": "refunded",
          "cn_total": 9999
        }
      ],
      "linked_invoices": [
        {
          "applied_amount": 120,
          "applied_at": 1636467088,
          "invoice_date": 1636412400,
          "invoice_id": "1531",
          "invoice_status": "payment_due",
          "invoice_total": 120
        }
      ],
      "linked_refunds": [],
      "masked_card_number": "************1111",
      "object": "transaction",
      "payment_method": "card",
      "payment_method_details": "{\"card\":{\"iin\":\"******\",\"last4\":\"1111\",\"funding_type\":\"credit\",\"expiry_month\":1,\"expiry_year\":2025,\"masked_number\":\"************1111\",\"object\":\"card\",\"brand\":\"visa\"}}",
      "payment_source_id": "pm_AzZlyjSoHAvW5Jdw",
      "refunded_txn_id": "txn_198OinTyDKn5511s",
      "resource_version": 1702371989276,
      "status": "success",
      "subscription_id": "BTcntHTvmOcjdP08",
      "type": "refund",
      "updated_at": 1702371989
    }
  },
  "eventType": "payment.refunded"
}

payment.succeeded

Triggered when a payment has succeeded.

Example payment.succeeded
JSON
{
  "data": {
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "module_id": "foobar",
    "subscription": {
      "activated_at": 1636066800,
      "base_currency_code": "EUR",
      "billing_period": 1,
      "billing_period_unit": "month",
      "channel": "web",
      "created_at": 1636029127,
      "currency_code": "EUR",
      "current_term_end": 1639004399,
      "current_term_start": 1636412400,
      "customer_id": "AzZluuSkIEXas24Mv",
      "deleted": false,
      "due_invoices_count": 1,
      "due_since": 1636412400,
      "exchange_rate": 1,
      "has_scheduled_changes": false,
      "id": "AzZltzSnnXURXasn",
      "meta_data": {
        "module": "rbm-example"
      },
      "mrr": 100,
      "next_billing_at": 1639004400,
      "object": "subscription",
      "override_relationship": false,
      "plan_amount": 100,
      "plan_free_quantity": 0,
      "plan_id": "default-free",
      "plan_quantity": 1,
      "plan_unit_price": 100,
      "resource_version": 1636467088785,
      "started_at": 1635980400,
      "status": "active",
      "total_dues": 120,
      "trial_end": 1635980400,
      "trial_end_action": "site_default",
      "trial_start": 1635980400,
      "updated_at": 1636467088
    },
    "transaction": {
      "amount": 120,
      "amount_unused": 0,
      "base_currency_code": "EUR",
      "currency_code": "EUR",
      "customer_id": "AzZluuSkIEXas24Mv",
      "date": 1636467087,
      "deleted": false,
      "error_code": "authentication_required",
      "error_text": "Your card was declined. This transaction requires authentication.",
      "exchange_rate": 1,
      "fraud_reason": "The bank returned the decline code `authentication_required`.",
      "gateway": "stripe",
      "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
      "id": "txn_Azz5uVSoHB7gi16HQ",
      "id_at_gateway": "ch_3Jtv2pGp5Dc2lo8u16q8AjHP",
      "linked_invoices": [
        {
          "applied_amount": 120,
          "applied_at": 1636467088,
          "invoice_date": 1636412400,
          "invoice_id": "1531",
          "invoice_status": "payment_due",
          "invoice_total": 120
        }
      ],
      "linked_refunds": [],
      "masked_card_number": "************3184",
      "object": "transaction",
      "payment_method": "card",
      "payment_source_id": "pm_AzZlyjSoHAvW5Jdw",
      "resource_version": 1636467088743,
      "status": "failure",
      "subscription_id": "AzZltzSnnXURXasn",
      "type": "payment",
      "updated_at": 1636467088
    }
  },
  "eventType": "payment.succeeded"
}

subscription.created

Triggered when a subscription is created.

Example subscription.created
JSON
{
  "data": {
    "chargebeeCustomerId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "shopId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "subscription": {
      "activated_at": 1636066800,
      "base_currency_code": "EUR",
      "billing_period": 1,
      "billing_period_unit": "month",
      "channel": "web",
      "created_at": 1636029127,
      "currency_code": "EUR",
      "current_term_end": 1639004399,
      "current_term_start": 1636412400,
      "customer_id": "AzZluuSkIEXas24Mv",
      "deleted": false,
      "due_invoices_count": 1,
      "due_since": 1636412400,
      "exchange_rate": 1,
      "has_scheduled_changes": false,
      "id": "AzZltzSnnXURXasn",
      "meta_data": {
        "module": "rbm-example"
      },
      "mrr": 100,
      "next_billing_at": 1639004400,
      "object": "subscription",
      "override_relationship": false,
      "plan_amount": 100,
      "plan_free_quantity": 0,
      "plan_id": "default-free",
      "plan_quantity": 1,
      "plan_unit_price": 100,
      "resource_version": 1636467088785,
      "started_at": 1635980400,
      "status": "active",
      "total_dues": 120,
      "trial_end": 1635980400,
      "trial_end_action": "site_default",
      "trial_start": 1635980400,
      "updated_at": 1636467088
    }
  },
  "eventType": "subscription.created"
}

subscription.status-updated

Triggered when a subscription's status changes.

Example subscription.status-updated
JSON
{
  "data": {
    "chargebeeCustomerId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "shopId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "subscription": {
      "activated_at": 1636066800,
      "base_currency_code": "EUR",
      "billing_period": 1,
      "billing_period_unit": "month",
      "channel": "web",
      "created_at": 1636029127,
      "currency_code": "EUR",
      "current_term_end": 1639004399,
      "current_term_start": 1636412400,
      "customer_id": "AzZluuSkIEXas24Mv",
      "deleted": false,
      "due_invoices_count": 1,
      "due_since": 1636412400,
      "exchange_rate": 1,
      "has_scheduled_changes": false,
      "id": "AzZltzSnnXURXasn",
      "meta_data": {
        "module": "rbm-example"
      },
      "mrr": 100,
      "next_billing_at": 1639004400,
      "object": "subscription",
      "override_relationship": false,
      "plan_amount": 100,
      "plan_free_quantity": 0,
      "plan_id": "default-free",
      "plan_quantity": 1,
      "plan_unit_price": 100,
      "resource_version": 1636467088785,
      "started_at": 1635980400,
      "status": "active",
      "total_dues": 120,
      "trial_end": 1635980400,
      "trial_end_action": "site_default",
      "trial_start": 1635980400,
      "updated_at": 1636467088
    }
  },
  "eventType": "subscription.status-updated"
}

subscription.updated

Triggered when a subscription is updated. A plan upgrade will trigger this event.

Example subscription.updated
JSON
{
  "data": {
    "chargebeeCustomerId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "customer": {
      "allow_direct_debit": false,
      "auto_collection": "on",
      "billing_address": {
        "city": "Paris",
        "company": "company",
        "country": "FR",
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1 rue de Rivoli",
        "object": "billing_address",
        "validation_status": "not_validated",
        "zip": "85000"
      },
      "business_customer_without_vat_number": false,
      "card_status": "valid",
      "cf_consent": "False",
      "cf_shop_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "channel": "web",
      "child_account_access": {
        "portal_download_invoices": "yes",
        "portal_edit_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "created_at": 1639489665,
      "created_from_ip": "37.59.216.43",
      "deleted": false,
      "email": "john.doe@prestashop.com",
      "excess_payments": 0,
      "id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
      "is_location_valid": true,
      "meta_data": {
        "shop_url": "https://my-shop.prestashop.com"
      },
      "net_term_days": 0,
      "object": "customer",
      "parent_account_access": {
        "portal_download_child_invoices": "yes",
        "portal_edit_child_subscriptions": "yes",
        "send_invoice_emails": true,
        "send_payment_emails": true,
        "send_subscription_emails": true
      },
      "payment_method": {
        "gateway": "stripe",
        "gateway_account_id": "gw_Azqe1TSLVjdNhdI",
        "object": "payment_method",
        "reference_id": "cus_Km9gpGiTwLYPzA/card_1K9WdDGp5Dc2lo8uY9G6Or4r",
        "status": "valid",
        "type": "card"
      },
      "pii_cleared": "active",
      "preferred_currency_code": "EUR",
      "primary_payment_source_id": "pm_6oZmhSsKtNhO4puJ",
      "promotional_credits": 0,
      "refundable_credits": 0,
      "relationship": {
        "invoice_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "parent_id": "Cpnr7otANbbqcliaHCbco",
        "payment_owner_id": "b2581e4b-0030-4fc8-9bf2-7f01c550a946",
        "root_id": "Cpnr7otANbbqcliaHCbco"
      },
      "resource_version": 1641367315861,
      "taxability": "taxable",
      "unbilled_charges": 0,
      "updated_at": 1641367315,
      "use_default_hierarchy_settings": true
    },
    "shopId": "d673f3d0-86b1-4193-a714-dc9c487ec767",
    "subscription": {
      "activated_at": 1636066800,
      "base_currency_code": "EUR",
      "billing_period": 1,
      "billing_period_unit": "month",
      "channel": "web",
      "created_at": 1636029127,
      "currency_code": "EUR",
      "current_term_end": 1639004399,
      "current_term_start": 1636412400,
      "customer_id": "AzZluuSkIEXas24Mv",
      "deleted": false,
      "due_invoices_count": 1,
      "due_since": 1636412400,
      "exchange_rate": 1,
      "has_scheduled_changes": false,
      "id": "AzZltzSnnXURXasn",
      "meta_data": {
        "module": "rbm-example"
      },
      "mrr": 100,
      "next_billing_at": 1639004400,
      "object": "subscription",
      "override_relationship": false,
      "plan_amount": 100,
      "plan_free_quantity": 0,
      "plan_id": "default-free",
      "plan_quantity": 1,
      "plan_unit_price": 100,
      "resource_version": 1636467088785,
      "started_at": 1635980400,
      "status": "active",
      "total_dues": 120,
      "trial_end": 1635980400,
      "trial_end_action": "site_default",
      "trial_start": 1635980400,
      "updated_at": 1636467088
    }
  },
  "eventType": "subscription.updated"
}