dodopayments 2.48.0 → 2.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/bin/migration-config.json +37 -0
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balances.d.mts +1 -0
- package/resources/balances.d.mts.map +1 -1
- package/resources/balances.d.ts +1 -0
- package/resources/balances.d.ts.map +1 -1
- package/resources/blocklist/blocklist.d.mts +10 -0
- package/resources/blocklist/blocklist.d.mts.map +1 -0
- package/resources/blocklist/blocklist.d.ts +10 -0
- package/resources/blocklist/blocklist.d.ts.map +1 -0
- package/resources/blocklist/blocklist.js +17 -0
- package/resources/blocklist/blocklist.js.map +1 -0
- package/resources/blocklist/blocklist.mjs +12 -0
- package/resources/blocklist/blocklist.mjs.map +1 -0
- package/resources/blocklist/customers/customers.d.mts +161 -0
- package/resources/blocklist/customers/customers.d.mts.map +1 -0
- package/resources/blocklist/customers/customers.d.ts +161 -0
- package/resources/blocklist/customers/customers.d.ts.map +1 -0
- package/resources/blocklist/customers/customers.js +38 -0
- package/resources/blocklist/customers/customers.js.map +1 -0
- package/resources/blocklist/customers/customers.mjs +33 -0
- package/resources/blocklist/customers/customers.mjs.map +1 -0
- package/resources/blocklist/customers/index.d.mts +3 -0
- package/resources/blocklist/customers/index.d.mts.map +1 -0
- package/resources/blocklist/customers/index.d.ts +3 -0
- package/resources/blocklist/customers/index.d.ts.map +1 -0
- package/resources/blocklist/customers/index.js +9 -0
- package/resources/blocklist/customers/index.js.map +1 -0
- package/resources/blocklist/customers/index.mjs +4 -0
- package/resources/blocklist/customers/index.mjs.map +1 -0
- package/resources/blocklist/customers/notes.d.mts +34 -0
- package/resources/blocklist/customers/notes.d.mts.map +1 -0
- package/resources/blocklist/customers/notes.d.ts +34 -0
- package/resources/blocklist/customers/notes.d.ts.map +1 -0
- package/resources/blocklist/customers/notes.js +17 -0
- package/resources/blocklist/customers/notes.js.map +1 -0
- package/resources/blocklist/customers/notes.mjs +13 -0
- package/resources/blocklist/customers/notes.mjs.map +1 -0
- package/resources/blocklist/customers.d.mts +2 -0
- package/resources/blocklist/customers.d.mts.map +1 -0
- package/resources/blocklist/customers.d.ts +2 -0
- package/resources/blocklist/customers.d.ts.map +1 -0
- package/resources/blocklist/customers.js +6 -0
- package/resources/blocklist/customers.js.map +1 -0
- package/resources/blocklist/customers.mjs +3 -0
- package/resources/blocklist/customers.mjs.map +1 -0
- package/resources/blocklist/index.d.mts +3 -0
- package/resources/blocklist/index.d.mts.map +1 -0
- package/resources/blocklist/index.d.ts +3 -0
- package/resources/blocklist/index.d.ts.map +1 -0
- package/resources/blocklist/index.js +9 -0
- package/resources/blocklist/index.js.map +1 -0
- package/resources/blocklist/index.mjs +4 -0
- package/resources/blocklist/index.mjs.map +1 -0
- package/resources/blocklist.d.mts +2 -0
- package/resources/blocklist.d.mts.map +1 -0
- package/resources/blocklist.d.ts +2 -0
- package/resources/blocklist.d.ts.map +1 -0
- package/resources/blocklist.js +6 -0
- package/resources/blocklist.js.map +1 -0
- package/resources/blocklist.mjs +3 -0
- package/resources/blocklist.mjs.map +1 -0
- package/resources/customers/customers.d.mts +10 -0
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +10 -0
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payments.d.mts +64 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +64 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +21 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +21 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/subscriptions.d.mts +3 -3
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +3 -3
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/webhook-events.d.mts +12 -2
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +12 -2
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhooks/index.d.mts +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +543 -51
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +543 -51
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +11 -0
- package/src/resources/balances.ts +2 -0
- package/src/resources/blocklist/blocklist.ts +37 -0
- package/src/resources/blocklist/customers/customers.ts +254 -0
- package/src/resources/blocklist/customers/index.ts +21 -0
- package/src/resources/blocklist/customers/notes.ts +62 -0
- package/src/resources/blocklist/customers.ts +3 -0
- package/src/resources/blocklist/index.ts +15 -0
- package/src/resources/blocklist.ts +3 -0
- package/src/resources/customers/customers.ts +12 -0
- package/src/resources/index.ts +4 -0
- package/src/resources/payments.ts +84 -0
- package/src/resources/subscriptions.ts +4 -2
- package/src/resources/webhook-events.ts +13 -1
- package/src/resources/webhooks/index.ts +1 -0
- package/src/resources/webhooks/webhooks.ts +575 -48
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -681,7 +681,7 @@ export namespace DunningRecoveredWebhookEvent {
|
|
|
681
681
|
|
|
682
682
|
subscription_id: string;
|
|
683
683
|
|
|
684
|
-
trigger_state: 'on_hold' | 'cancelled';
|
|
684
|
+
trigger_state: 'on_hold' | 'cancelled' | 'past_due';
|
|
685
685
|
|
|
686
686
|
payment_id?: string | null;
|
|
687
687
|
}
|
|
@@ -727,7 +727,7 @@ export namespace DunningStartedWebhookEvent {
|
|
|
727
727
|
|
|
728
728
|
subscription_id: string;
|
|
729
729
|
|
|
730
|
-
trigger_state: 'on_hold' | 'cancelled';
|
|
730
|
+
trigger_state: 'on_hold' | 'cancelled' | 'past_due';
|
|
731
731
|
|
|
732
732
|
payment_id?: string | null;
|
|
733
733
|
}
|
|
@@ -1470,9 +1470,10 @@ export interface SubscriptionActiveWebhookEvent {
|
|
|
1470
1470
|
business_id: string;
|
|
1471
1471
|
|
|
1472
1472
|
/**
|
|
1473
|
-
*
|
|
1473
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1474
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1474
1475
|
*/
|
|
1475
|
-
data:
|
|
1476
|
+
data: SubscriptionActiveWebhookEvent.Data;
|
|
1476
1477
|
|
|
1477
1478
|
/**
|
|
1478
1479
|
* The timestamp of when the event occurred
|
|
@@ -1485,6 +1486,25 @@ export interface SubscriptionActiveWebhookEvent {
|
|
|
1485
1486
|
type: 'subscription.active';
|
|
1486
1487
|
}
|
|
1487
1488
|
|
|
1489
|
+
export namespace SubscriptionActiveWebhookEvent {
|
|
1490
|
+
/**
|
|
1491
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1492
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1493
|
+
*/
|
|
1494
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1495
|
+
/**
|
|
1496
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1497
|
+
* `cancelled` at this time.
|
|
1498
|
+
*
|
|
1499
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1500
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1501
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1502
|
+
* deadline too, next to a `past_due` status.
|
|
1503
|
+
*/
|
|
1504
|
+
past_due_ends_at?: string | null;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1488
1508
|
export interface SubscriptionCancelledWebhookEvent {
|
|
1489
1509
|
/**
|
|
1490
1510
|
* The business identifier
|
|
@@ -1492,9 +1512,10 @@ export interface SubscriptionCancelledWebhookEvent {
|
|
|
1492
1512
|
business_id: string;
|
|
1493
1513
|
|
|
1494
1514
|
/**
|
|
1495
|
-
*
|
|
1515
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1516
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1496
1517
|
*/
|
|
1497
|
-
data:
|
|
1518
|
+
data: SubscriptionCancelledWebhookEvent.Data;
|
|
1498
1519
|
|
|
1499
1520
|
/**
|
|
1500
1521
|
* The timestamp of when the event occurred
|
|
@@ -1507,6 +1528,25 @@ export interface SubscriptionCancelledWebhookEvent {
|
|
|
1507
1528
|
type: 'subscription.cancelled';
|
|
1508
1529
|
}
|
|
1509
1530
|
|
|
1531
|
+
export namespace SubscriptionCancelledWebhookEvent {
|
|
1532
|
+
/**
|
|
1533
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1534
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1535
|
+
*/
|
|
1536
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1537
|
+
/**
|
|
1538
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1539
|
+
* `cancelled` at this time.
|
|
1540
|
+
*
|
|
1541
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1542
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1543
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1544
|
+
* deadline too, next to a `past_due` status.
|
|
1545
|
+
*/
|
|
1546
|
+
past_due_ends_at?: string | null;
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1510
1550
|
export interface SubscriptionExpiredWebhookEvent {
|
|
1511
1551
|
/**
|
|
1512
1552
|
* The business identifier
|
|
@@ -1514,9 +1554,10 @@ export interface SubscriptionExpiredWebhookEvent {
|
|
|
1514
1554
|
business_id: string;
|
|
1515
1555
|
|
|
1516
1556
|
/**
|
|
1517
|
-
*
|
|
1557
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1558
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1518
1559
|
*/
|
|
1519
|
-
data:
|
|
1560
|
+
data: SubscriptionExpiredWebhookEvent.Data;
|
|
1520
1561
|
|
|
1521
1562
|
/**
|
|
1522
1563
|
* The timestamp of when the event occurred
|
|
@@ -1529,6 +1570,25 @@ export interface SubscriptionExpiredWebhookEvent {
|
|
|
1529
1570
|
type: 'subscription.expired';
|
|
1530
1571
|
}
|
|
1531
1572
|
|
|
1573
|
+
export namespace SubscriptionExpiredWebhookEvent {
|
|
1574
|
+
/**
|
|
1575
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1576
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1577
|
+
*/
|
|
1578
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1579
|
+
/**
|
|
1580
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1581
|
+
* `cancelled` at this time.
|
|
1582
|
+
*
|
|
1583
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1584
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1585
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1586
|
+
* deadline too, next to a `past_due` status.
|
|
1587
|
+
*/
|
|
1588
|
+
past_due_ends_at?: string | null;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1532
1592
|
export interface SubscriptionFailedWebhookEvent {
|
|
1533
1593
|
/**
|
|
1534
1594
|
* The business identifier
|
|
@@ -1536,9 +1596,10 @@ export interface SubscriptionFailedWebhookEvent {
|
|
|
1536
1596
|
business_id: string;
|
|
1537
1597
|
|
|
1538
1598
|
/**
|
|
1539
|
-
*
|
|
1599
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1600
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1540
1601
|
*/
|
|
1541
|
-
data:
|
|
1602
|
+
data: SubscriptionFailedWebhookEvent.Data;
|
|
1542
1603
|
|
|
1543
1604
|
/**
|
|
1544
1605
|
* The timestamp of when the event occurred
|
|
@@ -1551,6 +1612,25 @@ export interface SubscriptionFailedWebhookEvent {
|
|
|
1551
1612
|
type: 'subscription.failed';
|
|
1552
1613
|
}
|
|
1553
1614
|
|
|
1615
|
+
export namespace SubscriptionFailedWebhookEvent {
|
|
1616
|
+
/**
|
|
1617
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1618
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1619
|
+
*/
|
|
1620
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1621
|
+
/**
|
|
1622
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1623
|
+
* `cancelled` at this time.
|
|
1624
|
+
*
|
|
1625
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1626
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1627
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1628
|
+
* deadline too, next to a `past_due` status.
|
|
1629
|
+
*/
|
|
1630
|
+
past_due_ends_at?: string | null;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1554
1634
|
export interface SubscriptionOnHoldWebhookEvent {
|
|
1555
1635
|
/**
|
|
1556
1636
|
* The business identifier
|
|
@@ -1558,9 +1638,10 @@ export interface SubscriptionOnHoldWebhookEvent {
|
|
|
1558
1638
|
business_id: string;
|
|
1559
1639
|
|
|
1560
1640
|
/**
|
|
1561
|
-
*
|
|
1641
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1642
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1562
1643
|
*/
|
|
1563
|
-
data:
|
|
1644
|
+
data: SubscriptionOnHoldWebhookEvent.Data;
|
|
1564
1645
|
|
|
1565
1646
|
/**
|
|
1566
1647
|
* The timestamp of when the event occurred
|
|
@@ -1573,6 +1654,67 @@ export interface SubscriptionOnHoldWebhookEvent {
|
|
|
1573
1654
|
type: 'subscription.on_hold';
|
|
1574
1655
|
}
|
|
1575
1656
|
|
|
1657
|
+
export namespace SubscriptionOnHoldWebhookEvent {
|
|
1658
|
+
/**
|
|
1659
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1660
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1661
|
+
*/
|
|
1662
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1663
|
+
/**
|
|
1664
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1665
|
+
* `cancelled` at this time.
|
|
1666
|
+
*
|
|
1667
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1668
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1669
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1670
|
+
* deadline too, next to a `past_due` status.
|
|
1671
|
+
*/
|
|
1672
|
+
past_due_ends_at?: string | null;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
export interface SubscriptionPastDueWebhookEvent {
|
|
1677
|
+
/**
|
|
1678
|
+
* The business identifier
|
|
1679
|
+
*/
|
|
1680
|
+
business_id: string;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1684
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1685
|
+
*/
|
|
1686
|
+
data: SubscriptionPastDueWebhookEvent.Data;
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* The timestamp of when the event occurred
|
|
1690
|
+
*/
|
|
1691
|
+
timestamp: string;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* The event type
|
|
1695
|
+
*/
|
|
1696
|
+
type: 'subscription.past_due';
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
export namespace SubscriptionPastDueWebhookEvent {
|
|
1700
|
+
/**
|
|
1701
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1702
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1703
|
+
*/
|
|
1704
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1705
|
+
/**
|
|
1706
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1707
|
+
* `cancelled` at this time.
|
|
1708
|
+
*
|
|
1709
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1710
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1711
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1712
|
+
* deadline too, next to a `past_due` status.
|
|
1713
|
+
*/
|
|
1714
|
+
past_due_ends_at?: string | null;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1576
1718
|
export interface SubscriptionPausedWebhookEvent {
|
|
1577
1719
|
/**
|
|
1578
1720
|
* The business identifier
|
|
@@ -1580,9 +1722,10 @@ export interface SubscriptionPausedWebhookEvent {
|
|
|
1580
1722
|
business_id: string;
|
|
1581
1723
|
|
|
1582
1724
|
/**
|
|
1583
|
-
*
|
|
1725
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1726
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1584
1727
|
*/
|
|
1585
|
-
data:
|
|
1728
|
+
data: SubscriptionPausedWebhookEvent.Data;
|
|
1586
1729
|
|
|
1587
1730
|
/**
|
|
1588
1731
|
* The timestamp of when the event occurred
|
|
@@ -1595,6 +1738,25 @@ export interface SubscriptionPausedWebhookEvent {
|
|
|
1595
1738
|
type: 'subscription.paused';
|
|
1596
1739
|
}
|
|
1597
1740
|
|
|
1741
|
+
export namespace SubscriptionPausedWebhookEvent {
|
|
1742
|
+
/**
|
|
1743
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1744
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1745
|
+
*/
|
|
1746
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1747
|
+
/**
|
|
1748
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1749
|
+
* `cancelled` at this time.
|
|
1750
|
+
*
|
|
1751
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1752
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1753
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1754
|
+
* deadline too, next to a `past_due` status.
|
|
1755
|
+
*/
|
|
1756
|
+
past_due_ends_at?: string | null;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1598
1760
|
export interface SubscriptionPlanChangedWebhookEvent {
|
|
1599
1761
|
/**
|
|
1600
1762
|
* The business identifier
|
|
@@ -1602,9 +1764,10 @@ export interface SubscriptionPlanChangedWebhookEvent {
|
|
|
1602
1764
|
business_id: string;
|
|
1603
1765
|
|
|
1604
1766
|
/**
|
|
1605
|
-
*
|
|
1767
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1768
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1606
1769
|
*/
|
|
1607
|
-
data:
|
|
1770
|
+
data: SubscriptionPlanChangedWebhookEvent.Data;
|
|
1608
1771
|
|
|
1609
1772
|
/**
|
|
1610
1773
|
* The timestamp of when the event occurred
|
|
@@ -1617,6 +1780,25 @@ export interface SubscriptionPlanChangedWebhookEvent {
|
|
|
1617
1780
|
type: 'subscription.plan_changed';
|
|
1618
1781
|
}
|
|
1619
1782
|
|
|
1783
|
+
export namespace SubscriptionPlanChangedWebhookEvent {
|
|
1784
|
+
/**
|
|
1785
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1786
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1787
|
+
*/
|
|
1788
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1789
|
+
/**
|
|
1790
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1791
|
+
* `cancelled` at this time.
|
|
1792
|
+
*
|
|
1793
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1794
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1795
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1796
|
+
* deadline too, next to a `past_due` status.
|
|
1797
|
+
*/
|
|
1798
|
+
past_due_ends_at?: string | null;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1620
1802
|
export interface SubscriptionRenewedWebhookEvent {
|
|
1621
1803
|
/**
|
|
1622
1804
|
* The business identifier
|
|
@@ -1624,9 +1806,10 @@ export interface SubscriptionRenewedWebhookEvent {
|
|
|
1624
1806
|
business_id: string;
|
|
1625
1807
|
|
|
1626
1808
|
/**
|
|
1627
|
-
*
|
|
1809
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1810
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1628
1811
|
*/
|
|
1629
|
-
data:
|
|
1812
|
+
data: SubscriptionRenewedWebhookEvent.Data;
|
|
1630
1813
|
|
|
1631
1814
|
/**
|
|
1632
1815
|
* The timestamp of when the event occurred
|
|
@@ -1639,6 +1822,25 @@ export interface SubscriptionRenewedWebhookEvent {
|
|
|
1639
1822
|
type: 'subscription.renewed';
|
|
1640
1823
|
}
|
|
1641
1824
|
|
|
1825
|
+
export namespace SubscriptionRenewedWebhookEvent {
|
|
1826
|
+
/**
|
|
1827
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1828
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1829
|
+
*/
|
|
1830
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1831
|
+
/**
|
|
1832
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1833
|
+
* `cancelled` at this time.
|
|
1834
|
+
*
|
|
1835
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1836
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1837
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1838
|
+
* deadline too, next to a `past_due` status.
|
|
1839
|
+
*/
|
|
1840
|
+
past_due_ends_at?: string | null;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1642
1844
|
export interface SubscriptionUnpausedWebhookEvent {
|
|
1643
1845
|
/**
|
|
1644
1846
|
* The business identifier
|
|
@@ -1646,9 +1848,10 @@ export interface SubscriptionUnpausedWebhookEvent {
|
|
|
1646
1848
|
business_id: string;
|
|
1647
1849
|
|
|
1648
1850
|
/**
|
|
1649
|
-
*
|
|
1851
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1852
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1650
1853
|
*/
|
|
1651
|
-
data:
|
|
1854
|
+
data: SubscriptionUnpausedWebhookEvent.Data;
|
|
1652
1855
|
|
|
1653
1856
|
/**
|
|
1654
1857
|
* The timestamp of when the event occurred
|
|
@@ -1661,6 +1864,25 @@ export interface SubscriptionUnpausedWebhookEvent {
|
|
|
1661
1864
|
type: 'subscription.unpaused';
|
|
1662
1865
|
}
|
|
1663
1866
|
|
|
1867
|
+
export namespace SubscriptionUnpausedWebhookEvent {
|
|
1868
|
+
/**
|
|
1869
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1870
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1871
|
+
*/
|
|
1872
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1873
|
+
/**
|
|
1874
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1875
|
+
* `cancelled` at this time.
|
|
1876
|
+
*
|
|
1877
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1878
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1879
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1880
|
+
* deadline too, next to a `past_due` status.
|
|
1881
|
+
*/
|
|
1882
|
+
past_due_ends_at?: string | null;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1664
1886
|
export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
1665
1887
|
/**
|
|
1666
1888
|
* The business identifier
|
|
@@ -1668,9 +1890,10 @@ export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
|
1668
1890
|
business_id: string;
|
|
1669
1891
|
|
|
1670
1892
|
/**
|
|
1671
|
-
*
|
|
1893
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1894
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1672
1895
|
*/
|
|
1673
|
-
data:
|
|
1896
|
+
data: SubscriptionUpdatePaymentMethodWebhookEvent.Data;
|
|
1674
1897
|
|
|
1675
1898
|
/**
|
|
1676
1899
|
* The timestamp of when the event occurred
|
|
@@ -1683,6 +1906,25 @@ export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
|
1683
1906
|
type: 'subscription.update_payment_method';
|
|
1684
1907
|
}
|
|
1685
1908
|
|
|
1909
|
+
export namespace SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
1910
|
+
/**
|
|
1911
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1912
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1913
|
+
*/
|
|
1914
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1915
|
+
/**
|
|
1916
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1917
|
+
* `cancelled` at this time.
|
|
1918
|
+
*
|
|
1919
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1920
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1921
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1922
|
+
* deadline too, next to a `past_due` status.
|
|
1923
|
+
*/
|
|
1924
|
+
past_due_ends_at?: string | null;
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1686
1928
|
export interface SubscriptionUpdatedWebhookEvent {
|
|
1687
1929
|
/**
|
|
1688
1930
|
* The business identifier
|
|
@@ -1690,9 +1932,10 @@ export interface SubscriptionUpdatedWebhookEvent {
|
|
|
1690
1932
|
business_id: string;
|
|
1691
1933
|
|
|
1692
1934
|
/**
|
|
1693
|
-
*
|
|
1935
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1936
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1694
1937
|
*/
|
|
1695
|
-
data:
|
|
1938
|
+
data: SubscriptionUpdatedWebhookEvent.Data;
|
|
1696
1939
|
|
|
1697
1940
|
/**
|
|
1698
1941
|
* The timestamp of when the event occurred
|
|
@@ -1705,6 +1948,25 @@ export interface SubscriptionUpdatedWebhookEvent {
|
|
|
1705
1948
|
type: 'subscription.updated';
|
|
1706
1949
|
}
|
|
1707
1950
|
|
|
1951
|
+
export namespace SubscriptionUpdatedWebhookEvent {
|
|
1952
|
+
/**
|
|
1953
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
1954
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
1955
|
+
*/
|
|
1956
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
1957
|
+
/**
|
|
1958
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
1959
|
+
* `cancelled` at this time.
|
|
1960
|
+
*
|
|
1961
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
1962
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
1963
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
1964
|
+
* deadline too, next to a `past_due` status.
|
|
1965
|
+
*/
|
|
1966
|
+
past_due_ends_at?: string | null;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1708
1970
|
export interface AbandonedCheckoutDetectedWebhookEvent {
|
|
1709
1971
|
/**
|
|
1710
1972
|
* The business identifier
|
|
@@ -2200,7 +2462,7 @@ export namespace DunningRecoveredWebhookEvent {
|
|
|
2200
2462
|
|
|
2201
2463
|
subscription_id: string;
|
|
2202
2464
|
|
|
2203
|
-
trigger_state: 'on_hold' | 'cancelled';
|
|
2465
|
+
trigger_state: 'on_hold' | 'cancelled' | 'past_due';
|
|
2204
2466
|
|
|
2205
2467
|
payment_id?: string | null;
|
|
2206
2468
|
}
|
|
@@ -2246,7 +2508,7 @@ export namespace DunningStartedWebhookEvent {
|
|
|
2246
2508
|
|
|
2247
2509
|
subscription_id: string;
|
|
2248
2510
|
|
|
2249
|
-
trigger_state: 'on_hold' | 'cancelled';
|
|
2511
|
+
trigger_state: 'on_hold' | 'cancelled' | 'past_due';
|
|
2250
2512
|
|
|
2251
2513
|
payment_id?: string | null;
|
|
2252
2514
|
}
|
|
@@ -2989,9 +3251,10 @@ export interface SubscriptionActiveWebhookEvent {
|
|
|
2989
3251
|
business_id: string;
|
|
2990
3252
|
|
|
2991
3253
|
/**
|
|
2992
|
-
*
|
|
3254
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3255
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
2993
3256
|
*/
|
|
2994
|
-
data:
|
|
3257
|
+
data: SubscriptionActiveWebhookEvent.Data;
|
|
2995
3258
|
|
|
2996
3259
|
/**
|
|
2997
3260
|
* The timestamp of when the event occurred
|
|
@@ -3004,6 +3267,25 @@ export interface SubscriptionActiveWebhookEvent {
|
|
|
3004
3267
|
type: 'subscription.active';
|
|
3005
3268
|
}
|
|
3006
3269
|
|
|
3270
|
+
export namespace SubscriptionActiveWebhookEvent {
|
|
3271
|
+
/**
|
|
3272
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3273
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3274
|
+
*/
|
|
3275
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3276
|
+
/**
|
|
3277
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3278
|
+
* `cancelled` at this time.
|
|
3279
|
+
*
|
|
3280
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3281
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3282
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3283
|
+
* deadline too, next to a `past_due` status.
|
|
3284
|
+
*/
|
|
3285
|
+
past_due_ends_at?: string | null;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3007
3289
|
export interface SubscriptionCancelledWebhookEvent {
|
|
3008
3290
|
/**
|
|
3009
3291
|
* The business identifier
|
|
@@ -3011,9 +3293,10 @@ export interface SubscriptionCancelledWebhookEvent {
|
|
|
3011
3293
|
business_id: string;
|
|
3012
3294
|
|
|
3013
3295
|
/**
|
|
3014
|
-
*
|
|
3296
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3297
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3015
3298
|
*/
|
|
3016
|
-
data:
|
|
3299
|
+
data: SubscriptionCancelledWebhookEvent.Data;
|
|
3017
3300
|
|
|
3018
3301
|
/**
|
|
3019
3302
|
* The timestamp of when the event occurred
|
|
@@ -3026,6 +3309,25 @@ export interface SubscriptionCancelledWebhookEvent {
|
|
|
3026
3309
|
type: 'subscription.cancelled';
|
|
3027
3310
|
}
|
|
3028
3311
|
|
|
3312
|
+
export namespace SubscriptionCancelledWebhookEvent {
|
|
3313
|
+
/**
|
|
3314
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3315
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3316
|
+
*/
|
|
3317
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3318
|
+
/**
|
|
3319
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3320
|
+
* `cancelled` at this time.
|
|
3321
|
+
*
|
|
3322
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3323
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3324
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3325
|
+
* deadline too, next to a `past_due` status.
|
|
3326
|
+
*/
|
|
3327
|
+
past_due_ends_at?: string | null;
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3029
3331
|
export interface SubscriptionExpiredWebhookEvent {
|
|
3030
3332
|
/**
|
|
3031
3333
|
* The business identifier
|
|
@@ -3033,9 +3335,10 @@ export interface SubscriptionExpiredWebhookEvent {
|
|
|
3033
3335
|
business_id: string;
|
|
3034
3336
|
|
|
3035
3337
|
/**
|
|
3036
|
-
*
|
|
3338
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3339
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3037
3340
|
*/
|
|
3038
|
-
data:
|
|
3341
|
+
data: SubscriptionExpiredWebhookEvent.Data;
|
|
3039
3342
|
|
|
3040
3343
|
/**
|
|
3041
3344
|
* The timestamp of when the event occurred
|
|
@@ -3048,6 +3351,25 @@ export interface SubscriptionExpiredWebhookEvent {
|
|
|
3048
3351
|
type: 'subscription.expired';
|
|
3049
3352
|
}
|
|
3050
3353
|
|
|
3354
|
+
export namespace SubscriptionExpiredWebhookEvent {
|
|
3355
|
+
/**
|
|
3356
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3357
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3358
|
+
*/
|
|
3359
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3360
|
+
/**
|
|
3361
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3362
|
+
* `cancelled` at this time.
|
|
3363
|
+
*
|
|
3364
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3365
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3366
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3367
|
+
* deadline too, next to a `past_due` status.
|
|
3368
|
+
*/
|
|
3369
|
+
past_due_ends_at?: string | null;
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3051
3373
|
export interface SubscriptionFailedWebhookEvent {
|
|
3052
3374
|
/**
|
|
3053
3375
|
* The business identifier
|
|
@@ -3055,9 +3377,10 @@ export interface SubscriptionFailedWebhookEvent {
|
|
|
3055
3377
|
business_id: string;
|
|
3056
3378
|
|
|
3057
3379
|
/**
|
|
3058
|
-
*
|
|
3380
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3381
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3059
3382
|
*/
|
|
3060
|
-
data:
|
|
3383
|
+
data: SubscriptionFailedWebhookEvent.Data;
|
|
3061
3384
|
|
|
3062
3385
|
/**
|
|
3063
3386
|
* The timestamp of when the event occurred
|
|
@@ -3070,6 +3393,25 @@ export interface SubscriptionFailedWebhookEvent {
|
|
|
3070
3393
|
type: 'subscription.failed';
|
|
3071
3394
|
}
|
|
3072
3395
|
|
|
3396
|
+
export namespace SubscriptionFailedWebhookEvent {
|
|
3397
|
+
/**
|
|
3398
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3399
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3400
|
+
*/
|
|
3401
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3402
|
+
/**
|
|
3403
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3404
|
+
* `cancelled` at this time.
|
|
3405
|
+
*
|
|
3406
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3407
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3408
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3409
|
+
* deadline too, next to a `past_due` status.
|
|
3410
|
+
*/
|
|
3411
|
+
past_due_ends_at?: string | null;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3073
3415
|
export interface SubscriptionOnHoldWebhookEvent {
|
|
3074
3416
|
/**
|
|
3075
3417
|
* The business identifier
|
|
@@ -3077,9 +3419,10 @@ export interface SubscriptionOnHoldWebhookEvent {
|
|
|
3077
3419
|
business_id: string;
|
|
3078
3420
|
|
|
3079
3421
|
/**
|
|
3080
|
-
*
|
|
3422
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3423
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3081
3424
|
*/
|
|
3082
|
-
data:
|
|
3425
|
+
data: SubscriptionOnHoldWebhookEvent.Data;
|
|
3083
3426
|
|
|
3084
3427
|
/**
|
|
3085
3428
|
* The timestamp of when the event occurred
|
|
@@ -3092,6 +3435,67 @@ export interface SubscriptionOnHoldWebhookEvent {
|
|
|
3092
3435
|
type: 'subscription.on_hold';
|
|
3093
3436
|
}
|
|
3094
3437
|
|
|
3438
|
+
export namespace SubscriptionOnHoldWebhookEvent {
|
|
3439
|
+
/**
|
|
3440
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3441
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3442
|
+
*/
|
|
3443
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3444
|
+
/**
|
|
3445
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3446
|
+
* `cancelled` at this time.
|
|
3447
|
+
*
|
|
3448
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3449
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3450
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3451
|
+
* deadline too, next to a `past_due` status.
|
|
3452
|
+
*/
|
|
3453
|
+
past_due_ends_at?: string | null;
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
export interface SubscriptionPastDueWebhookEvent {
|
|
3458
|
+
/**
|
|
3459
|
+
* The business identifier
|
|
3460
|
+
*/
|
|
3461
|
+
business_id: string;
|
|
3462
|
+
|
|
3463
|
+
/**
|
|
3464
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3465
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3466
|
+
*/
|
|
3467
|
+
data: SubscriptionPastDueWebhookEvent.Data;
|
|
3468
|
+
|
|
3469
|
+
/**
|
|
3470
|
+
* The timestamp of when the event occurred
|
|
3471
|
+
*/
|
|
3472
|
+
timestamp: string;
|
|
3473
|
+
|
|
3474
|
+
/**
|
|
3475
|
+
* The event type
|
|
3476
|
+
*/
|
|
3477
|
+
type: 'subscription.past_due';
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
export namespace SubscriptionPastDueWebhookEvent {
|
|
3481
|
+
/**
|
|
3482
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3483
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3484
|
+
*/
|
|
3485
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3486
|
+
/**
|
|
3487
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3488
|
+
* `cancelled` at this time.
|
|
3489
|
+
*
|
|
3490
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3491
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3492
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3493
|
+
* deadline too, next to a `past_due` status.
|
|
3494
|
+
*/
|
|
3495
|
+
past_due_ends_at?: string | null;
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3095
3499
|
export interface SubscriptionPausedWebhookEvent {
|
|
3096
3500
|
/**
|
|
3097
3501
|
* The business identifier
|
|
@@ -3099,9 +3503,10 @@ export interface SubscriptionPausedWebhookEvent {
|
|
|
3099
3503
|
business_id: string;
|
|
3100
3504
|
|
|
3101
3505
|
/**
|
|
3102
|
-
*
|
|
3506
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3507
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3103
3508
|
*/
|
|
3104
|
-
data:
|
|
3509
|
+
data: SubscriptionPausedWebhookEvent.Data;
|
|
3105
3510
|
|
|
3106
3511
|
/**
|
|
3107
3512
|
* The timestamp of when the event occurred
|
|
@@ -3114,6 +3519,25 @@ export interface SubscriptionPausedWebhookEvent {
|
|
|
3114
3519
|
type: 'subscription.paused';
|
|
3115
3520
|
}
|
|
3116
3521
|
|
|
3522
|
+
export namespace SubscriptionPausedWebhookEvent {
|
|
3523
|
+
/**
|
|
3524
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3525
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3526
|
+
*/
|
|
3527
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3528
|
+
/**
|
|
3529
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3530
|
+
* `cancelled` at this time.
|
|
3531
|
+
*
|
|
3532
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3533
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3534
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3535
|
+
* deadline too, next to a `past_due` status.
|
|
3536
|
+
*/
|
|
3537
|
+
past_due_ends_at?: string | null;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3117
3541
|
export interface SubscriptionPlanChangedWebhookEvent {
|
|
3118
3542
|
/**
|
|
3119
3543
|
* The business identifier
|
|
@@ -3121,9 +3545,10 @@ export interface SubscriptionPlanChangedWebhookEvent {
|
|
|
3121
3545
|
business_id: string;
|
|
3122
3546
|
|
|
3123
3547
|
/**
|
|
3124
|
-
*
|
|
3548
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3549
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3125
3550
|
*/
|
|
3126
|
-
data:
|
|
3551
|
+
data: SubscriptionPlanChangedWebhookEvent.Data;
|
|
3127
3552
|
|
|
3128
3553
|
/**
|
|
3129
3554
|
* The timestamp of when the event occurred
|
|
@@ -3136,6 +3561,25 @@ export interface SubscriptionPlanChangedWebhookEvent {
|
|
|
3136
3561
|
type: 'subscription.plan_changed';
|
|
3137
3562
|
}
|
|
3138
3563
|
|
|
3564
|
+
export namespace SubscriptionPlanChangedWebhookEvent {
|
|
3565
|
+
/**
|
|
3566
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3567
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3568
|
+
*/
|
|
3569
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3570
|
+
/**
|
|
3571
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3572
|
+
* `cancelled` at this time.
|
|
3573
|
+
*
|
|
3574
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3575
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3576
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3577
|
+
* deadline too, next to a `past_due` status.
|
|
3578
|
+
*/
|
|
3579
|
+
past_due_ends_at?: string | null;
|
|
3580
|
+
}
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3139
3583
|
export interface SubscriptionRenewedWebhookEvent {
|
|
3140
3584
|
/**
|
|
3141
3585
|
* The business identifier
|
|
@@ -3143,9 +3587,10 @@ export interface SubscriptionRenewedWebhookEvent {
|
|
|
3143
3587
|
business_id: string;
|
|
3144
3588
|
|
|
3145
3589
|
/**
|
|
3146
|
-
*
|
|
3590
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3591
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3147
3592
|
*/
|
|
3148
|
-
data:
|
|
3593
|
+
data: SubscriptionRenewedWebhookEvent.Data;
|
|
3149
3594
|
|
|
3150
3595
|
/**
|
|
3151
3596
|
* The timestamp of when the event occurred
|
|
@@ -3158,6 +3603,25 @@ export interface SubscriptionRenewedWebhookEvent {
|
|
|
3158
3603
|
type: 'subscription.renewed';
|
|
3159
3604
|
}
|
|
3160
3605
|
|
|
3606
|
+
export namespace SubscriptionRenewedWebhookEvent {
|
|
3607
|
+
/**
|
|
3608
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3609
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3610
|
+
*/
|
|
3611
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3612
|
+
/**
|
|
3613
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3614
|
+
* `cancelled` at this time.
|
|
3615
|
+
*
|
|
3616
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3617
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3618
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3619
|
+
* deadline too, next to a `past_due` status.
|
|
3620
|
+
*/
|
|
3621
|
+
past_due_ends_at?: string | null;
|
|
3622
|
+
}
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3161
3625
|
export interface SubscriptionUnpausedWebhookEvent {
|
|
3162
3626
|
/**
|
|
3163
3627
|
* The business identifier
|
|
@@ -3165,9 +3629,10 @@ export interface SubscriptionUnpausedWebhookEvent {
|
|
|
3165
3629
|
business_id: string;
|
|
3166
3630
|
|
|
3167
3631
|
/**
|
|
3168
|
-
*
|
|
3632
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3633
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3169
3634
|
*/
|
|
3170
|
-
data:
|
|
3635
|
+
data: SubscriptionUnpausedWebhookEvent.Data;
|
|
3171
3636
|
|
|
3172
3637
|
/**
|
|
3173
3638
|
* The timestamp of when the event occurred
|
|
@@ -3180,6 +3645,25 @@ export interface SubscriptionUnpausedWebhookEvent {
|
|
|
3180
3645
|
type: 'subscription.unpaused';
|
|
3181
3646
|
}
|
|
3182
3647
|
|
|
3648
|
+
export namespace SubscriptionUnpausedWebhookEvent {
|
|
3649
|
+
/**
|
|
3650
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3651
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3652
|
+
*/
|
|
3653
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3654
|
+
/**
|
|
3655
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3656
|
+
* `cancelled` at this time.
|
|
3657
|
+
*
|
|
3658
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3659
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3660
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3661
|
+
* deadline too, next to a `past_due` status.
|
|
3662
|
+
*/
|
|
3663
|
+
past_due_ends_at?: string | null;
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3183
3667
|
export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
3184
3668
|
/**
|
|
3185
3669
|
* The business identifier
|
|
@@ -3187,9 +3671,10 @@ export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
|
3187
3671
|
business_id: string;
|
|
3188
3672
|
|
|
3189
3673
|
/**
|
|
3190
|
-
*
|
|
3674
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3675
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3191
3676
|
*/
|
|
3192
|
-
data:
|
|
3677
|
+
data: SubscriptionUpdatePaymentMethodWebhookEvent.Data;
|
|
3193
3678
|
|
|
3194
3679
|
/**
|
|
3195
3680
|
* The timestamp of when the event occurred
|
|
@@ -3202,6 +3687,25 @@ export interface SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
|
3202
3687
|
type: 'subscription.update_payment_method';
|
|
3203
3688
|
}
|
|
3204
3689
|
|
|
3690
|
+
export namespace SubscriptionUpdatePaymentMethodWebhookEvent {
|
|
3691
|
+
/**
|
|
3692
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3693
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3694
|
+
*/
|
|
3695
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3696
|
+
/**
|
|
3697
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3698
|
+
* `cancelled` at this time.
|
|
3699
|
+
*
|
|
3700
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3701
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3702
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3703
|
+
* deadline too, next to a `past_due` status.
|
|
3704
|
+
*/
|
|
3705
|
+
past_due_ends_at?: string | null;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3205
3709
|
export interface SubscriptionUpdatedWebhookEvent {
|
|
3206
3710
|
/**
|
|
3207
3711
|
* The business identifier
|
|
@@ -3209,9 +3713,10 @@ export interface SubscriptionUpdatedWebhookEvent {
|
|
|
3209
3713
|
business_id: string;
|
|
3210
3714
|
|
|
3211
3715
|
/**
|
|
3212
|
-
*
|
|
3716
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3717
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3213
3718
|
*/
|
|
3214
|
-
data:
|
|
3719
|
+
data: SubscriptionUpdatedWebhookEvent.Data;
|
|
3215
3720
|
|
|
3216
3721
|
/**
|
|
3217
3722
|
* The timestamp of when the event occurred
|
|
@@ -3224,6 +3729,25 @@ export interface SubscriptionUpdatedWebhookEvent {
|
|
|
3224
3729
|
type: 'subscription.updated';
|
|
3225
3730
|
}
|
|
3226
3731
|
|
|
3732
|
+
export namespace SubscriptionUpdatedWebhookEvent {
|
|
3733
|
+
/**
|
|
3734
|
+
* Subscription payload sent on a webhook. It carries every field of
|
|
3735
|
+
* `SubscriptionResponse`, plus the grace-period deadline.
|
|
3736
|
+
*/
|
|
3737
|
+
export interface Data extends SubscriptionsAPI.Subscription {
|
|
3738
|
+
/**
|
|
3739
|
+
* Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
3740
|
+
* `cancelled` at this time.
|
|
3741
|
+
*
|
|
3742
|
+
* Read in the same query as the rest of the payload, so it always comes from the
|
|
3743
|
+
* row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
3744
|
+
* a window at that moment. A delayed event of another type therefore carries the
|
|
3745
|
+
* deadline too, next to a `past_due` status.
|
|
3746
|
+
*/
|
|
3747
|
+
past_due_ends_at?: string | null;
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3227
3751
|
export type UnsafeUnwrapWebhookEvent =
|
|
3228
3752
|
| AbandonedCheckoutDetectedWebhookEvent
|
|
3229
3753
|
| AbandonedCheckoutRecoveredWebhookEvent
|
|
@@ -3266,6 +3790,7 @@ export type UnsafeUnwrapWebhookEvent =
|
|
|
3266
3790
|
| SubscriptionExpiredWebhookEvent
|
|
3267
3791
|
| SubscriptionFailedWebhookEvent
|
|
3268
3792
|
| SubscriptionOnHoldWebhookEvent
|
|
3793
|
+
| SubscriptionPastDueWebhookEvent
|
|
3269
3794
|
| SubscriptionPausedWebhookEvent
|
|
3270
3795
|
| SubscriptionPlanChangedWebhookEvent
|
|
3271
3796
|
| SubscriptionRenewedWebhookEvent
|
|
@@ -3315,6 +3840,7 @@ export type UnwrapWebhookEvent =
|
|
|
3315
3840
|
| SubscriptionExpiredWebhookEvent
|
|
3316
3841
|
| SubscriptionFailedWebhookEvent
|
|
3317
3842
|
| SubscriptionOnHoldWebhookEvent
|
|
3843
|
+
| SubscriptionPastDueWebhookEvent
|
|
3318
3844
|
| SubscriptionPausedWebhookEvent
|
|
3319
3845
|
| SubscriptionPlanChangedWebhookEvent
|
|
3320
3846
|
| SubscriptionRenewedWebhookEvent
|
|
@@ -3445,6 +3971,7 @@ export declare namespace Webhooks {
|
|
|
3445
3971
|
type SubscriptionExpiredWebhookEvent as SubscriptionExpiredWebhookEvent,
|
|
3446
3972
|
type SubscriptionFailedWebhookEvent as SubscriptionFailedWebhookEvent,
|
|
3447
3973
|
type SubscriptionOnHoldWebhookEvent as SubscriptionOnHoldWebhookEvent,
|
|
3974
|
+
type SubscriptionPastDueWebhookEvent as SubscriptionPastDueWebhookEvent,
|
|
3448
3975
|
type SubscriptionPausedWebhookEvent as SubscriptionPausedWebhookEvent,
|
|
3449
3976
|
type SubscriptionPlanChangedWebhookEvent as SubscriptionPlanChangedWebhookEvent,
|
|
3450
3977
|
type SubscriptionRenewedWebhookEvent as SubscriptionRenewedWebhookEvent,
|