@linqapp/sdk 0.55.2 → 0.57.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 +14 -0
- package/client.d.mts +11 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -3
- package/client.d.ts.map +1 -1
- package/client.js +10 -2
- package/client.js.map +1 -1
- package/client.mjs +10 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/chats/chats.d.mts +6 -9
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +6 -9
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/messages.d.mts +13 -5
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +13 -5
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +8 -0
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +8 -0
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/chats/polls.d.mts +8 -0
- package/resources/chats/polls.d.mts.map +1 -1
- package/resources/chats/polls.d.ts +8 -0
- package/resources/chats/polls.d.ts.map +1 -1
- package/resources/chats/polls.js +8 -0
- package/resources/chats/polls.js.map +1 -1
- package/resources/chats/polls.mjs +8 -0
- package/resources/chats/polls.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +13 -5
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +13 -5
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +8 -0
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +8 -0
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messages/poll.d.mts +8 -0
- package/resources/messages/poll.d.mts.map +1 -1
- package/resources/messages/poll.d.ts +8 -0
- package/resources/messages/poll.d.ts.map +1 -1
- package/resources/messages/poll.js +8 -0
- package/resources/messages/poll.js.map +1 -1
- package/resources/messages/poll.mjs +8 -0
- package/resources/messages/poll.mjs.map +1 -1
- package/resources/webhooks.d.mts +1232 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1232 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +36 -10
- package/src/resources/chats/chats.ts +6 -9
- package/src/resources/chats/messages.ts +13 -5
- package/src/resources/chats/polls.ts +8 -0
- package/src/resources/index.ts +9 -0
- package/src/resources/messages/messages.ts +13 -5
- package/src/resources/messages/poll.ts +8 -0
- package/src/resources/webhooks.ts +1927 -1
- 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
|
@@ -3770,6 +3770,1914 @@ export namespace PhoneNumberStatusUpdatedWebhookEvent {
|
|
|
3770
3770
|
}
|
|
3771
3771
|
}
|
|
3772
3772
|
|
|
3773
|
+
export interface ConnectionCreatedWebhookEvent {
|
|
3774
|
+
/**
|
|
3775
|
+
* API version for the webhook payload format
|
|
3776
|
+
*/
|
|
3777
|
+
api_version: string;
|
|
3778
|
+
|
|
3779
|
+
/**
|
|
3780
|
+
* When the event was created
|
|
3781
|
+
*/
|
|
3782
|
+
created_at: string;
|
|
3783
|
+
|
|
3784
|
+
/**
|
|
3785
|
+
* The payment request, as returned by
|
|
3786
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
3787
|
+
*/
|
|
3788
|
+
data: ConnectionCreatedWebhookEvent.Data;
|
|
3789
|
+
|
|
3790
|
+
/**
|
|
3791
|
+
* Unique identifier for this event (for deduplication)
|
|
3792
|
+
*/
|
|
3793
|
+
event_id: string;
|
|
3794
|
+
|
|
3795
|
+
event_type:
|
|
3796
|
+
| 'payment.succeeded'
|
|
3797
|
+
| 'payment.canceled'
|
|
3798
|
+
| 'payment.expired'
|
|
3799
|
+
| 'message.sent'
|
|
3800
|
+
| 'message.received'
|
|
3801
|
+
| 'message.read'
|
|
3802
|
+
| 'message.delivered'
|
|
3803
|
+
| 'message.failed'
|
|
3804
|
+
| 'message.edited'
|
|
3805
|
+
| 'reaction.added'
|
|
3806
|
+
| 'reaction.removed'
|
|
3807
|
+
| 'poll.received'
|
|
3808
|
+
| 'poll.failed'
|
|
3809
|
+
| 'poll.sent'
|
|
3810
|
+
| 'poll.delivered'
|
|
3811
|
+
| 'poll.read'
|
|
3812
|
+
| 'poll.updated'
|
|
3813
|
+
| 'poll.vote.added'
|
|
3814
|
+
| 'poll.vote.removed'
|
|
3815
|
+
| 'poll.reaction.added'
|
|
3816
|
+
| 'participant.added'
|
|
3817
|
+
| 'participant.removed'
|
|
3818
|
+
| 'chat.created'
|
|
3819
|
+
| 'chat.group_name_updated'
|
|
3820
|
+
| 'chat.group_icon_updated'
|
|
3821
|
+
| 'chat.group_name_update_failed'
|
|
3822
|
+
| 'chat.group_icon_update_failed'
|
|
3823
|
+
| 'chat.background_updated'
|
|
3824
|
+
| 'chat.background_update_failed'
|
|
3825
|
+
| 'chat.typing_indicator.started'
|
|
3826
|
+
| 'chat.typing_indicator.stopped'
|
|
3827
|
+
| 'phone_number.status_updated'
|
|
3828
|
+
| 'contact_card.received'
|
|
3829
|
+
| 'call.initiated'
|
|
3830
|
+
| 'call.ringing'
|
|
3831
|
+
| 'call.answered'
|
|
3832
|
+
| 'call.ended'
|
|
3833
|
+
| 'call.failed'
|
|
3834
|
+
| 'call.declined'
|
|
3835
|
+
| 'call.no_answer'
|
|
3836
|
+
| 'location.sharing.started'
|
|
3837
|
+
| 'location.sharing.stopped'
|
|
3838
|
+
| 'payment.declined'
|
|
3839
|
+
| 'payment.authorized'
|
|
3840
|
+
| 'connection.created'
|
|
3841
|
+
| 'connection.revoked';
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
3845
|
+
*/
|
|
3846
|
+
partner_id: string;
|
|
3847
|
+
|
|
3848
|
+
/**
|
|
3849
|
+
* Trace ID for debugging and correlation across systems.
|
|
3850
|
+
*/
|
|
3851
|
+
trace_id: string;
|
|
3852
|
+
|
|
3853
|
+
/**
|
|
3854
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
3855
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
3856
|
+
* specified, defaults based on subscription creation date.
|
|
3857
|
+
*/
|
|
3858
|
+
webhook_version: string;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
export namespace ConnectionCreatedWebhookEvent {
|
|
3862
|
+
/**
|
|
3863
|
+
* The payment request, as returned by
|
|
3864
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
3865
|
+
*/
|
|
3866
|
+
export interface Data {
|
|
3867
|
+
/**
|
|
3868
|
+
* The payment request id.
|
|
3869
|
+
*/
|
|
3870
|
+
id: string;
|
|
3871
|
+
|
|
3872
|
+
/**
|
|
3873
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
3874
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
3875
|
+
* applied.
|
|
3876
|
+
*/
|
|
3877
|
+
amount: number;
|
|
3878
|
+
|
|
3879
|
+
/**
|
|
3880
|
+
* URL the recipient opens to pay
|
|
3881
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
3882
|
+
*/
|
|
3883
|
+
checkout_url: string;
|
|
3884
|
+
|
|
3885
|
+
created_at: string;
|
|
3886
|
+
|
|
3887
|
+
currency: string;
|
|
3888
|
+
|
|
3889
|
+
object: string;
|
|
3890
|
+
|
|
3891
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
3892
|
+
|
|
3893
|
+
description?: string;
|
|
3894
|
+
|
|
3895
|
+
/**
|
|
3896
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
3897
|
+
* Absent when none was applied.
|
|
3898
|
+
*/
|
|
3899
|
+
discount?: Data.Discount;
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* Subscription mode — how often the subscription renews.
|
|
3903
|
+
*/
|
|
3904
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
3905
|
+
|
|
3906
|
+
/**
|
|
3907
|
+
* Subscription mode — intervals per renewal.
|
|
3908
|
+
*/
|
|
3909
|
+
interval_count?: number;
|
|
3910
|
+
|
|
3911
|
+
metadata?: { [key: string]: string };
|
|
3912
|
+
|
|
3913
|
+
/**
|
|
3914
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
3915
|
+
*/
|
|
3916
|
+
mode?: 'payment' | 'subscription';
|
|
3917
|
+
|
|
3918
|
+
/**
|
|
3919
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
3920
|
+
*/
|
|
3921
|
+
natural?: Data.Natural;
|
|
3922
|
+
|
|
3923
|
+
/**
|
|
3924
|
+
* Subscription mode — the recurring price subscribed to.
|
|
3925
|
+
*/
|
|
3926
|
+
price_id?: string;
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* Subscription mode — units of the price subscribed to.
|
|
3930
|
+
*/
|
|
3931
|
+
quantity?: number;
|
|
3932
|
+
|
|
3933
|
+
/**
|
|
3934
|
+
* The rail this request settled on.
|
|
3935
|
+
*/
|
|
3936
|
+
rail?: 'stripe' | 'natural';
|
|
3937
|
+
|
|
3938
|
+
/**
|
|
3939
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
3940
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
3941
|
+
* `subscription_id`.
|
|
3942
|
+
*/
|
|
3943
|
+
stripe?: Data.Stripe;
|
|
3944
|
+
|
|
3945
|
+
/**
|
|
3946
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
3947
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
3948
|
+
* moved).
|
|
3949
|
+
*/
|
|
3950
|
+
trial_end?: string;
|
|
3951
|
+
|
|
3952
|
+
updated_at?: string;
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
export namespace Data {
|
|
3956
|
+
/**
|
|
3957
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
3958
|
+
* Absent when none was applied.
|
|
3959
|
+
*/
|
|
3960
|
+
export interface Discount {
|
|
3961
|
+
coupon?: string;
|
|
3962
|
+
|
|
3963
|
+
/**
|
|
3964
|
+
* Name of the coupon/promo code displayed to customers.
|
|
3965
|
+
*/
|
|
3966
|
+
label?: string;
|
|
3967
|
+
|
|
3968
|
+
promotion_code?: string;
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
/**
|
|
3972
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
3973
|
+
*/
|
|
3974
|
+
export interface Natural {
|
|
3975
|
+
/**
|
|
3976
|
+
* The Natural payment request (`prq_...`).
|
|
3977
|
+
*/
|
|
3978
|
+
payment_request_id?: string;
|
|
3979
|
+
|
|
3980
|
+
/**
|
|
3981
|
+
* The settled transaction (`txn_...`).
|
|
3982
|
+
*/
|
|
3983
|
+
transaction_id?: string;
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
/**
|
|
3987
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
3988
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
3989
|
+
* `subscription_id`.
|
|
3990
|
+
*/
|
|
3991
|
+
export interface Stripe {
|
|
3992
|
+
/**
|
|
3993
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
3994
|
+
* mode; set in payment mode only when the request was created with a
|
|
3995
|
+
* `customer_id`.
|
|
3996
|
+
*/
|
|
3997
|
+
customer_id?: string;
|
|
3998
|
+
|
|
3999
|
+
/**
|
|
4000
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
4001
|
+
*/
|
|
4002
|
+
payment_intent_id?: string;
|
|
4003
|
+
|
|
4004
|
+
/**
|
|
4005
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
4006
|
+
*/
|
|
4007
|
+
subscription_id?: string;
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
|
|
4012
|
+
export interface ConnectionRevokedWebhookEvent {
|
|
4013
|
+
/**
|
|
4014
|
+
* API version for the webhook payload format
|
|
4015
|
+
*/
|
|
4016
|
+
api_version: string;
|
|
4017
|
+
|
|
4018
|
+
/**
|
|
4019
|
+
* When the event was created
|
|
4020
|
+
*/
|
|
4021
|
+
created_at: string;
|
|
4022
|
+
|
|
4023
|
+
/**
|
|
4024
|
+
* The payment request, as returned by
|
|
4025
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4026
|
+
*/
|
|
4027
|
+
data: ConnectionRevokedWebhookEvent.Data;
|
|
4028
|
+
|
|
4029
|
+
/**
|
|
4030
|
+
* Unique identifier for this event (for deduplication)
|
|
4031
|
+
*/
|
|
4032
|
+
event_id: string;
|
|
4033
|
+
|
|
4034
|
+
event_type:
|
|
4035
|
+
| 'payment.succeeded'
|
|
4036
|
+
| 'payment.canceled'
|
|
4037
|
+
| 'payment.expired'
|
|
4038
|
+
| 'message.sent'
|
|
4039
|
+
| 'message.received'
|
|
4040
|
+
| 'message.read'
|
|
4041
|
+
| 'message.delivered'
|
|
4042
|
+
| 'message.failed'
|
|
4043
|
+
| 'message.edited'
|
|
4044
|
+
| 'reaction.added'
|
|
4045
|
+
| 'reaction.removed'
|
|
4046
|
+
| 'poll.received'
|
|
4047
|
+
| 'poll.failed'
|
|
4048
|
+
| 'poll.sent'
|
|
4049
|
+
| 'poll.delivered'
|
|
4050
|
+
| 'poll.read'
|
|
4051
|
+
| 'poll.updated'
|
|
4052
|
+
| 'poll.vote.added'
|
|
4053
|
+
| 'poll.vote.removed'
|
|
4054
|
+
| 'poll.reaction.added'
|
|
4055
|
+
| 'participant.added'
|
|
4056
|
+
| 'participant.removed'
|
|
4057
|
+
| 'chat.created'
|
|
4058
|
+
| 'chat.group_name_updated'
|
|
4059
|
+
| 'chat.group_icon_updated'
|
|
4060
|
+
| 'chat.group_name_update_failed'
|
|
4061
|
+
| 'chat.group_icon_update_failed'
|
|
4062
|
+
| 'chat.background_updated'
|
|
4063
|
+
| 'chat.background_update_failed'
|
|
4064
|
+
| 'chat.typing_indicator.started'
|
|
4065
|
+
| 'chat.typing_indicator.stopped'
|
|
4066
|
+
| 'phone_number.status_updated'
|
|
4067
|
+
| 'contact_card.received'
|
|
4068
|
+
| 'call.initiated'
|
|
4069
|
+
| 'call.ringing'
|
|
4070
|
+
| 'call.answered'
|
|
4071
|
+
| 'call.ended'
|
|
4072
|
+
| 'call.failed'
|
|
4073
|
+
| 'call.declined'
|
|
4074
|
+
| 'call.no_answer'
|
|
4075
|
+
| 'location.sharing.started'
|
|
4076
|
+
| 'location.sharing.stopped'
|
|
4077
|
+
| 'payment.declined'
|
|
4078
|
+
| 'payment.authorized'
|
|
4079
|
+
| 'connection.created'
|
|
4080
|
+
| 'connection.revoked';
|
|
4081
|
+
|
|
4082
|
+
/**
|
|
4083
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
4084
|
+
*/
|
|
4085
|
+
partner_id: string;
|
|
4086
|
+
|
|
4087
|
+
/**
|
|
4088
|
+
* Trace ID for debugging and correlation across systems.
|
|
4089
|
+
*/
|
|
4090
|
+
trace_id: string;
|
|
4091
|
+
|
|
4092
|
+
/**
|
|
4093
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
4094
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
4095
|
+
* specified, defaults based on subscription creation date.
|
|
4096
|
+
*/
|
|
4097
|
+
webhook_version: string;
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
export namespace ConnectionRevokedWebhookEvent {
|
|
4101
|
+
/**
|
|
4102
|
+
* The payment request, as returned by
|
|
4103
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4104
|
+
*/
|
|
4105
|
+
export interface Data {
|
|
4106
|
+
/**
|
|
4107
|
+
* The payment request id.
|
|
4108
|
+
*/
|
|
4109
|
+
id: string;
|
|
4110
|
+
|
|
4111
|
+
/**
|
|
4112
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
4113
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
4114
|
+
* applied.
|
|
4115
|
+
*/
|
|
4116
|
+
amount: number;
|
|
4117
|
+
|
|
4118
|
+
/**
|
|
4119
|
+
* URL the recipient opens to pay
|
|
4120
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
4121
|
+
*/
|
|
4122
|
+
checkout_url: string;
|
|
4123
|
+
|
|
4124
|
+
created_at: string;
|
|
4125
|
+
|
|
4126
|
+
currency: string;
|
|
4127
|
+
|
|
4128
|
+
object: string;
|
|
4129
|
+
|
|
4130
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
4131
|
+
|
|
4132
|
+
description?: string;
|
|
4133
|
+
|
|
4134
|
+
/**
|
|
4135
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4136
|
+
* Absent when none was applied.
|
|
4137
|
+
*/
|
|
4138
|
+
discount?: Data.Discount;
|
|
4139
|
+
|
|
4140
|
+
/**
|
|
4141
|
+
* Subscription mode — how often the subscription renews.
|
|
4142
|
+
*/
|
|
4143
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
4144
|
+
|
|
4145
|
+
/**
|
|
4146
|
+
* Subscription mode — intervals per renewal.
|
|
4147
|
+
*/
|
|
4148
|
+
interval_count?: number;
|
|
4149
|
+
|
|
4150
|
+
metadata?: { [key: string]: string };
|
|
4151
|
+
|
|
4152
|
+
/**
|
|
4153
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
4154
|
+
*/
|
|
4155
|
+
mode?: 'payment' | 'subscription';
|
|
4156
|
+
|
|
4157
|
+
/**
|
|
4158
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4159
|
+
*/
|
|
4160
|
+
natural?: Data.Natural;
|
|
4161
|
+
|
|
4162
|
+
/**
|
|
4163
|
+
* Subscription mode — the recurring price subscribed to.
|
|
4164
|
+
*/
|
|
4165
|
+
price_id?: string;
|
|
4166
|
+
|
|
4167
|
+
/**
|
|
4168
|
+
* Subscription mode — units of the price subscribed to.
|
|
4169
|
+
*/
|
|
4170
|
+
quantity?: number;
|
|
4171
|
+
|
|
4172
|
+
/**
|
|
4173
|
+
* The rail this request settled on.
|
|
4174
|
+
*/
|
|
4175
|
+
rail?: 'stripe' | 'natural';
|
|
4176
|
+
|
|
4177
|
+
/**
|
|
4178
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4179
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4180
|
+
* `subscription_id`.
|
|
4181
|
+
*/
|
|
4182
|
+
stripe?: Data.Stripe;
|
|
4183
|
+
|
|
4184
|
+
/**
|
|
4185
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
4186
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
4187
|
+
* moved).
|
|
4188
|
+
*/
|
|
4189
|
+
trial_end?: string;
|
|
4190
|
+
|
|
4191
|
+
updated_at?: string;
|
|
4192
|
+
}
|
|
4193
|
+
|
|
4194
|
+
export namespace Data {
|
|
4195
|
+
/**
|
|
4196
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4197
|
+
* Absent when none was applied.
|
|
4198
|
+
*/
|
|
4199
|
+
export interface Discount {
|
|
4200
|
+
coupon?: string;
|
|
4201
|
+
|
|
4202
|
+
/**
|
|
4203
|
+
* Name of the coupon/promo code displayed to customers.
|
|
4204
|
+
*/
|
|
4205
|
+
label?: string;
|
|
4206
|
+
|
|
4207
|
+
promotion_code?: string;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
/**
|
|
4211
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4212
|
+
*/
|
|
4213
|
+
export interface Natural {
|
|
4214
|
+
/**
|
|
4215
|
+
* The Natural payment request (`prq_...`).
|
|
4216
|
+
*/
|
|
4217
|
+
payment_request_id?: string;
|
|
4218
|
+
|
|
4219
|
+
/**
|
|
4220
|
+
* The settled transaction (`txn_...`).
|
|
4221
|
+
*/
|
|
4222
|
+
transaction_id?: string;
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4225
|
+
/**
|
|
4226
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4227
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4228
|
+
* `subscription_id`.
|
|
4229
|
+
*/
|
|
4230
|
+
export interface Stripe {
|
|
4231
|
+
/**
|
|
4232
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
4233
|
+
* mode; set in payment mode only when the request was created with a
|
|
4234
|
+
* `customer_id`.
|
|
4235
|
+
*/
|
|
4236
|
+
customer_id?: string;
|
|
4237
|
+
|
|
4238
|
+
/**
|
|
4239
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
4240
|
+
*/
|
|
4241
|
+
payment_intent_id?: string;
|
|
4242
|
+
|
|
4243
|
+
/**
|
|
4244
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
4245
|
+
*/
|
|
4246
|
+
subscription_id?: string;
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
export interface LocationSharingStartedWebhookEvent {
|
|
4252
|
+
/**
|
|
4253
|
+
* API version for the webhook payload format
|
|
4254
|
+
*/
|
|
4255
|
+
api_version: string;
|
|
4256
|
+
|
|
4257
|
+
/**
|
|
4258
|
+
* When the event was created
|
|
4259
|
+
*/
|
|
4260
|
+
created_at: string;
|
|
4261
|
+
|
|
4262
|
+
data: LocationSharingStartedWebhookEvent.Data;
|
|
4263
|
+
|
|
4264
|
+
/**
|
|
4265
|
+
* Unique identifier for this event (for deduplication)
|
|
4266
|
+
*/
|
|
4267
|
+
event_id: string;
|
|
4268
|
+
|
|
4269
|
+
event_type:
|
|
4270
|
+
| 'location.sharing.started'
|
|
4271
|
+
| 'message.sent'
|
|
4272
|
+
| 'message.received'
|
|
4273
|
+
| 'message.read'
|
|
4274
|
+
| 'message.delivered'
|
|
4275
|
+
| 'message.failed'
|
|
4276
|
+
| 'message.edited'
|
|
4277
|
+
| 'reaction.added'
|
|
4278
|
+
| 'reaction.removed'
|
|
4279
|
+
| 'poll.received'
|
|
4280
|
+
| 'poll.failed'
|
|
4281
|
+
| 'poll.sent'
|
|
4282
|
+
| 'poll.delivered'
|
|
4283
|
+
| 'poll.read'
|
|
4284
|
+
| 'poll.updated'
|
|
4285
|
+
| 'poll.vote.added'
|
|
4286
|
+
| 'poll.vote.removed'
|
|
4287
|
+
| 'poll.reaction.added'
|
|
4288
|
+
| 'participant.added'
|
|
4289
|
+
| 'participant.removed'
|
|
4290
|
+
| 'chat.created'
|
|
4291
|
+
| 'chat.group_name_updated'
|
|
4292
|
+
| 'chat.group_icon_updated'
|
|
4293
|
+
| 'chat.group_name_update_failed'
|
|
4294
|
+
| 'chat.group_icon_update_failed'
|
|
4295
|
+
| 'chat.background_updated'
|
|
4296
|
+
| 'chat.background_update_failed'
|
|
4297
|
+
| 'chat.typing_indicator.started'
|
|
4298
|
+
| 'chat.typing_indicator.stopped'
|
|
4299
|
+
| 'phone_number.status_updated'
|
|
4300
|
+
| 'contact_card.received'
|
|
4301
|
+
| 'call.initiated'
|
|
4302
|
+
| 'call.ringing'
|
|
4303
|
+
| 'call.answered'
|
|
4304
|
+
| 'call.ended'
|
|
4305
|
+
| 'call.failed'
|
|
4306
|
+
| 'call.declined'
|
|
4307
|
+
| 'call.no_answer'
|
|
4308
|
+
| 'location.sharing.stopped'
|
|
4309
|
+
| 'payment.succeeded'
|
|
4310
|
+
| 'payment.canceled'
|
|
4311
|
+
| 'payment.expired'
|
|
4312
|
+
| 'payment.declined'
|
|
4313
|
+
| 'payment.authorized'
|
|
4314
|
+
| 'connection.created'
|
|
4315
|
+
| 'connection.revoked';
|
|
4316
|
+
|
|
4317
|
+
/**
|
|
4318
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
4319
|
+
*/
|
|
4320
|
+
partner_id: string;
|
|
4321
|
+
|
|
4322
|
+
/**
|
|
4323
|
+
* Trace ID for debugging and correlation across systems.
|
|
4324
|
+
*/
|
|
4325
|
+
trace_id: string;
|
|
4326
|
+
|
|
4327
|
+
/**
|
|
4328
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
4329
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
4330
|
+
* specified, defaults based on subscription creation date.
|
|
4331
|
+
*/
|
|
4332
|
+
webhook_version: string;
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
export namespace LocationSharingStartedWebhookEvent {
|
|
4336
|
+
export interface Data {
|
|
4337
|
+
/**
|
|
4338
|
+
* When location sharing started. Always present: falls back to when the share was
|
|
4339
|
+
* first observed if the device reported no start time.
|
|
4340
|
+
*/
|
|
4341
|
+
began_at: string | null;
|
|
4342
|
+
|
|
4343
|
+
/**
|
|
4344
|
+
* The chat this share was first sent to. Location sharing is per-contact rather
|
|
4345
|
+
* than per-chat, so the location may also be visible in other chats with the same
|
|
4346
|
+
* handle; this identifies where the share originated and does not change if the
|
|
4347
|
+
* contact later shares into another chat. Null when the originating chat could not
|
|
4348
|
+
* be determined.
|
|
4349
|
+
*/
|
|
4350
|
+
chat_id: string | null;
|
|
4351
|
+
|
|
4352
|
+
/**
|
|
4353
|
+
* When location sharing will expire. Null when sharing indefinitely.
|
|
4354
|
+
*/
|
|
4355
|
+
ends_at: string | null;
|
|
4356
|
+
|
|
4357
|
+
/**
|
|
4358
|
+
* Phone number of the person sharing their location
|
|
4359
|
+
*/
|
|
4360
|
+
shared_by: string;
|
|
4361
|
+
|
|
4362
|
+
/**
|
|
4363
|
+
* Your phone number receiving the location
|
|
4364
|
+
*/
|
|
4365
|
+
shared_with: string;
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4369
|
+
export interface LocationSharingStoppedWebhookEvent {
|
|
4370
|
+
/**
|
|
4371
|
+
* API version for the webhook payload format
|
|
4372
|
+
*/
|
|
4373
|
+
api_version: string;
|
|
4374
|
+
|
|
4375
|
+
/**
|
|
4376
|
+
* When the event was created
|
|
4377
|
+
*/
|
|
4378
|
+
created_at: string;
|
|
4379
|
+
|
|
4380
|
+
data: LocationSharingStoppedWebhookEvent.Data;
|
|
4381
|
+
|
|
4382
|
+
/**
|
|
4383
|
+
* Unique identifier for this event (for deduplication)
|
|
4384
|
+
*/
|
|
4385
|
+
event_id: string;
|
|
4386
|
+
|
|
4387
|
+
event_type:
|
|
4388
|
+
| 'location.sharing.stopped'
|
|
4389
|
+
| 'message.sent'
|
|
4390
|
+
| 'message.received'
|
|
4391
|
+
| 'message.read'
|
|
4392
|
+
| 'message.delivered'
|
|
4393
|
+
| 'message.failed'
|
|
4394
|
+
| 'message.edited'
|
|
4395
|
+
| 'reaction.added'
|
|
4396
|
+
| 'reaction.removed'
|
|
4397
|
+
| 'poll.received'
|
|
4398
|
+
| 'poll.failed'
|
|
4399
|
+
| 'poll.sent'
|
|
4400
|
+
| 'poll.delivered'
|
|
4401
|
+
| 'poll.read'
|
|
4402
|
+
| 'poll.updated'
|
|
4403
|
+
| 'poll.vote.added'
|
|
4404
|
+
| 'poll.vote.removed'
|
|
4405
|
+
| 'poll.reaction.added'
|
|
4406
|
+
| 'participant.added'
|
|
4407
|
+
| 'participant.removed'
|
|
4408
|
+
| 'chat.created'
|
|
4409
|
+
| 'chat.group_name_updated'
|
|
4410
|
+
| 'chat.group_icon_updated'
|
|
4411
|
+
| 'chat.group_name_update_failed'
|
|
4412
|
+
| 'chat.group_icon_update_failed'
|
|
4413
|
+
| 'chat.background_updated'
|
|
4414
|
+
| 'chat.background_update_failed'
|
|
4415
|
+
| 'chat.typing_indicator.started'
|
|
4416
|
+
| 'chat.typing_indicator.stopped'
|
|
4417
|
+
| 'phone_number.status_updated'
|
|
4418
|
+
| 'contact_card.received'
|
|
4419
|
+
| 'call.initiated'
|
|
4420
|
+
| 'call.ringing'
|
|
4421
|
+
| 'call.answered'
|
|
4422
|
+
| 'call.ended'
|
|
4423
|
+
| 'call.failed'
|
|
4424
|
+
| 'call.declined'
|
|
4425
|
+
| 'call.no_answer'
|
|
4426
|
+
| 'location.sharing.started'
|
|
4427
|
+
| 'payment.succeeded'
|
|
4428
|
+
| 'payment.canceled'
|
|
4429
|
+
| 'payment.expired'
|
|
4430
|
+
| 'payment.declined'
|
|
4431
|
+
| 'payment.authorized'
|
|
4432
|
+
| 'connection.created'
|
|
4433
|
+
| 'connection.revoked';
|
|
4434
|
+
|
|
4435
|
+
/**
|
|
4436
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
4437
|
+
*/
|
|
4438
|
+
partner_id: string;
|
|
4439
|
+
|
|
4440
|
+
/**
|
|
4441
|
+
* Trace ID for debugging and correlation across systems.
|
|
4442
|
+
*/
|
|
4443
|
+
trace_id: string;
|
|
4444
|
+
|
|
4445
|
+
/**
|
|
4446
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
4447
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
4448
|
+
* specified, defaults based on subscription creation date.
|
|
4449
|
+
*/
|
|
4450
|
+
webhook_version: string;
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
export namespace LocationSharingStoppedWebhookEvent {
|
|
4454
|
+
export interface Data {
|
|
4455
|
+
/**
|
|
4456
|
+
* When the sharing session started, matching began_at on its started event. Always
|
|
4457
|
+
* present.
|
|
4458
|
+
*/
|
|
4459
|
+
began_at: string | null;
|
|
4460
|
+
|
|
4461
|
+
/**
|
|
4462
|
+
* The chat the ended share was first sent to, matching the chat_id on its started
|
|
4463
|
+
* event. Sharing always stops for the contact as a whole, never for a single chat,
|
|
4464
|
+
* so this is the session's origin rather than the chat it stopped in. Null when
|
|
4465
|
+
* the originating chat could not be determined.
|
|
4466
|
+
*/
|
|
4467
|
+
chat_id: string | null;
|
|
4468
|
+
|
|
4469
|
+
/**
|
|
4470
|
+
* When the sharing session was observed to stop.
|
|
4471
|
+
*/
|
|
4472
|
+
ended_at: string;
|
|
4473
|
+
|
|
4474
|
+
/**
|
|
4475
|
+
* Phone number of the person who stopped sharing
|
|
4476
|
+
*/
|
|
4477
|
+
shared_by: string;
|
|
4478
|
+
|
|
4479
|
+
/**
|
|
4480
|
+
* Your phone number that was receiving the location
|
|
4481
|
+
*/
|
|
4482
|
+
shared_with: string;
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
export interface PaymentAuthorizedWebhookEvent {
|
|
4487
|
+
/**
|
|
4488
|
+
* API version for the webhook payload format
|
|
4489
|
+
*/
|
|
4490
|
+
api_version: string;
|
|
4491
|
+
|
|
4492
|
+
/**
|
|
4493
|
+
* When the event was created
|
|
4494
|
+
*/
|
|
4495
|
+
created_at: string;
|
|
4496
|
+
|
|
4497
|
+
/**
|
|
4498
|
+
* The payment request, as returned by
|
|
4499
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4500
|
+
*/
|
|
4501
|
+
data: PaymentAuthorizedWebhookEvent.Data;
|
|
4502
|
+
|
|
4503
|
+
/**
|
|
4504
|
+
* Unique identifier for this event (for deduplication)
|
|
4505
|
+
*/
|
|
4506
|
+
event_id: string;
|
|
4507
|
+
|
|
4508
|
+
event_type:
|
|
4509
|
+
| 'payment.succeeded'
|
|
4510
|
+
| 'payment.canceled'
|
|
4511
|
+
| 'payment.expired'
|
|
4512
|
+
| 'message.sent'
|
|
4513
|
+
| 'message.received'
|
|
4514
|
+
| 'message.read'
|
|
4515
|
+
| 'message.delivered'
|
|
4516
|
+
| 'message.failed'
|
|
4517
|
+
| 'message.edited'
|
|
4518
|
+
| 'reaction.added'
|
|
4519
|
+
| 'reaction.removed'
|
|
4520
|
+
| 'poll.received'
|
|
4521
|
+
| 'poll.failed'
|
|
4522
|
+
| 'poll.sent'
|
|
4523
|
+
| 'poll.delivered'
|
|
4524
|
+
| 'poll.read'
|
|
4525
|
+
| 'poll.updated'
|
|
4526
|
+
| 'poll.vote.added'
|
|
4527
|
+
| 'poll.vote.removed'
|
|
4528
|
+
| 'poll.reaction.added'
|
|
4529
|
+
| 'participant.added'
|
|
4530
|
+
| 'participant.removed'
|
|
4531
|
+
| 'chat.created'
|
|
4532
|
+
| 'chat.group_name_updated'
|
|
4533
|
+
| 'chat.group_icon_updated'
|
|
4534
|
+
| 'chat.group_name_update_failed'
|
|
4535
|
+
| 'chat.group_icon_update_failed'
|
|
4536
|
+
| 'chat.background_updated'
|
|
4537
|
+
| 'chat.background_update_failed'
|
|
4538
|
+
| 'chat.typing_indicator.started'
|
|
4539
|
+
| 'chat.typing_indicator.stopped'
|
|
4540
|
+
| 'phone_number.status_updated'
|
|
4541
|
+
| 'contact_card.received'
|
|
4542
|
+
| 'call.initiated'
|
|
4543
|
+
| 'call.ringing'
|
|
4544
|
+
| 'call.answered'
|
|
4545
|
+
| 'call.ended'
|
|
4546
|
+
| 'call.failed'
|
|
4547
|
+
| 'call.declined'
|
|
4548
|
+
| 'call.no_answer'
|
|
4549
|
+
| 'location.sharing.started'
|
|
4550
|
+
| 'location.sharing.stopped'
|
|
4551
|
+
| 'payment.declined'
|
|
4552
|
+
| 'payment.authorized'
|
|
4553
|
+
| 'connection.created'
|
|
4554
|
+
| 'connection.revoked';
|
|
4555
|
+
|
|
4556
|
+
/**
|
|
4557
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
4558
|
+
*/
|
|
4559
|
+
partner_id: string;
|
|
4560
|
+
|
|
4561
|
+
/**
|
|
4562
|
+
* Trace ID for debugging and correlation across systems.
|
|
4563
|
+
*/
|
|
4564
|
+
trace_id: string;
|
|
4565
|
+
|
|
4566
|
+
/**
|
|
4567
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
4568
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
4569
|
+
* specified, defaults based on subscription creation date.
|
|
4570
|
+
*/
|
|
4571
|
+
webhook_version: string;
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
export namespace PaymentAuthorizedWebhookEvent {
|
|
4575
|
+
/**
|
|
4576
|
+
* The payment request, as returned by
|
|
4577
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4578
|
+
*/
|
|
4579
|
+
export interface Data {
|
|
4580
|
+
/**
|
|
4581
|
+
* The payment request id.
|
|
4582
|
+
*/
|
|
4583
|
+
id: string;
|
|
4584
|
+
|
|
4585
|
+
/**
|
|
4586
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
4587
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
4588
|
+
* applied.
|
|
4589
|
+
*/
|
|
4590
|
+
amount: number;
|
|
4591
|
+
|
|
4592
|
+
/**
|
|
4593
|
+
* URL the recipient opens to pay
|
|
4594
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
4595
|
+
*/
|
|
4596
|
+
checkout_url: string;
|
|
4597
|
+
|
|
4598
|
+
created_at: string;
|
|
4599
|
+
|
|
4600
|
+
currency: string;
|
|
4601
|
+
|
|
4602
|
+
object: string;
|
|
4603
|
+
|
|
4604
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
4605
|
+
|
|
4606
|
+
description?: string;
|
|
4607
|
+
|
|
4608
|
+
/**
|
|
4609
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4610
|
+
* Absent when none was applied.
|
|
4611
|
+
*/
|
|
4612
|
+
discount?: Data.Discount;
|
|
4613
|
+
|
|
4614
|
+
/**
|
|
4615
|
+
* Subscription mode — how often the subscription renews.
|
|
4616
|
+
*/
|
|
4617
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
4618
|
+
|
|
4619
|
+
/**
|
|
4620
|
+
* Subscription mode — intervals per renewal.
|
|
4621
|
+
*/
|
|
4622
|
+
interval_count?: number;
|
|
4623
|
+
|
|
4624
|
+
metadata?: { [key: string]: string };
|
|
4625
|
+
|
|
4626
|
+
/**
|
|
4627
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
4628
|
+
*/
|
|
4629
|
+
mode?: 'payment' | 'subscription';
|
|
4630
|
+
|
|
4631
|
+
/**
|
|
4632
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4633
|
+
*/
|
|
4634
|
+
natural?: Data.Natural;
|
|
4635
|
+
|
|
4636
|
+
/**
|
|
4637
|
+
* Subscription mode — the recurring price subscribed to.
|
|
4638
|
+
*/
|
|
4639
|
+
price_id?: string;
|
|
4640
|
+
|
|
4641
|
+
/**
|
|
4642
|
+
* Subscription mode — units of the price subscribed to.
|
|
4643
|
+
*/
|
|
4644
|
+
quantity?: number;
|
|
4645
|
+
|
|
4646
|
+
/**
|
|
4647
|
+
* The rail this request settled on.
|
|
4648
|
+
*/
|
|
4649
|
+
rail?: 'stripe' | 'natural';
|
|
4650
|
+
|
|
4651
|
+
/**
|
|
4652
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4653
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4654
|
+
* `subscription_id`.
|
|
4655
|
+
*/
|
|
4656
|
+
stripe?: Data.Stripe;
|
|
4657
|
+
|
|
4658
|
+
/**
|
|
4659
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
4660
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
4661
|
+
* moved).
|
|
4662
|
+
*/
|
|
4663
|
+
trial_end?: string;
|
|
4664
|
+
|
|
4665
|
+
updated_at?: string;
|
|
4666
|
+
}
|
|
4667
|
+
|
|
4668
|
+
export namespace Data {
|
|
4669
|
+
/**
|
|
4670
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4671
|
+
* Absent when none was applied.
|
|
4672
|
+
*/
|
|
4673
|
+
export interface Discount {
|
|
4674
|
+
coupon?: string;
|
|
4675
|
+
|
|
4676
|
+
/**
|
|
4677
|
+
* Name of the coupon/promo code displayed to customers.
|
|
4678
|
+
*/
|
|
4679
|
+
label?: string;
|
|
4680
|
+
|
|
4681
|
+
promotion_code?: string;
|
|
4682
|
+
}
|
|
4683
|
+
|
|
4684
|
+
/**
|
|
4685
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4686
|
+
*/
|
|
4687
|
+
export interface Natural {
|
|
4688
|
+
/**
|
|
4689
|
+
* The Natural payment request (`prq_...`).
|
|
4690
|
+
*/
|
|
4691
|
+
payment_request_id?: string;
|
|
4692
|
+
|
|
4693
|
+
/**
|
|
4694
|
+
* The settled transaction (`txn_...`).
|
|
4695
|
+
*/
|
|
4696
|
+
transaction_id?: string;
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4699
|
+
/**
|
|
4700
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4701
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4702
|
+
* `subscription_id`.
|
|
4703
|
+
*/
|
|
4704
|
+
export interface Stripe {
|
|
4705
|
+
/**
|
|
4706
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
4707
|
+
* mode; set in payment mode only when the request was created with a
|
|
4708
|
+
* `customer_id`.
|
|
4709
|
+
*/
|
|
4710
|
+
customer_id?: string;
|
|
4711
|
+
|
|
4712
|
+
/**
|
|
4713
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
4714
|
+
*/
|
|
4715
|
+
payment_intent_id?: string;
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
4719
|
+
*/
|
|
4720
|
+
subscription_id?: string;
|
|
4721
|
+
}
|
|
4722
|
+
}
|
|
4723
|
+
}
|
|
4724
|
+
|
|
4725
|
+
export interface PaymentCanceledWebhookEvent {
|
|
4726
|
+
/**
|
|
4727
|
+
* API version for the webhook payload format
|
|
4728
|
+
*/
|
|
4729
|
+
api_version: string;
|
|
4730
|
+
|
|
4731
|
+
/**
|
|
4732
|
+
* When the event was created
|
|
4733
|
+
*/
|
|
4734
|
+
created_at: string;
|
|
4735
|
+
|
|
4736
|
+
/**
|
|
4737
|
+
* The payment request, as returned by
|
|
4738
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4739
|
+
*/
|
|
4740
|
+
data: PaymentCanceledWebhookEvent.Data;
|
|
4741
|
+
|
|
4742
|
+
/**
|
|
4743
|
+
* Unique identifier for this event (for deduplication)
|
|
4744
|
+
*/
|
|
4745
|
+
event_id: string;
|
|
4746
|
+
|
|
4747
|
+
event_type:
|
|
4748
|
+
| 'payment.succeeded'
|
|
4749
|
+
| 'payment.canceled'
|
|
4750
|
+
| 'payment.expired'
|
|
4751
|
+
| 'message.sent'
|
|
4752
|
+
| 'message.received'
|
|
4753
|
+
| 'message.read'
|
|
4754
|
+
| 'message.delivered'
|
|
4755
|
+
| 'message.failed'
|
|
4756
|
+
| 'message.edited'
|
|
4757
|
+
| 'reaction.added'
|
|
4758
|
+
| 'reaction.removed'
|
|
4759
|
+
| 'poll.received'
|
|
4760
|
+
| 'poll.failed'
|
|
4761
|
+
| 'poll.sent'
|
|
4762
|
+
| 'poll.delivered'
|
|
4763
|
+
| 'poll.read'
|
|
4764
|
+
| 'poll.updated'
|
|
4765
|
+
| 'poll.vote.added'
|
|
4766
|
+
| 'poll.vote.removed'
|
|
4767
|
+
| 'poll.reaction.added'
|
|
4768
|
+
| 'participant.added'
|
|
4769
|
+
| 'participant.removed'
|
|
4770
|
+
| 'chat.created'
|
|
4771
|
+
| 'chat.group_name_updated'
|
|
4772
|
+
| 'chat.group_icon_updated'
|
|
4773
|
+
| 'chat.group_name_update_failed'
|
|
4774
|
+
| 'chat.group_icon_update_failed'
|
|
4775
|
+
| 'chat.background_updated'
|
|
4776
|
+
| 'chat.background_update_failed'
|
|
4777
|
+
| 'chat.typing_indicator.started'
|
|
4778
|
+
| 'chat.typing_indicator.stopped'
|
|
4779
|
+
| 'phone_number.status_updated'
|
|
4780
|
+
| 'contact_card.received'
|
|
4781
|
+
| 'call.initiated'
|
|
4782
|
+
| 'call.ringing'
|
|
4783
|
+
| 'call.answered'
|
|
4784
|
+
| 'call.ended'
|
|
4785
|
+
| 'call.failed'
|
|
4786
|
+
| 'call.declined'
|
|
4787
|
+
| 'call.no_answer'
|
|
4788
|
+
| 'location.sharing.started'
|
|
4789
|
+
| 'location.sharing.stopped'
|
|
4790
|
+
| 'payment.declined'
|
|
4791
|
+
| 'payment.authorized'
|
|
4792
|
+
| 'connection.created'
|
|
4793
|
+
| 'connection.revoked';
|
|
4794
|
+
|
|
4795
|
+
/**
|
|
4796
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
4797
|
+
*/
|
|
4798
|
+
partner_id: string;
|
|
4799
|
+
|
|
4800
|
+
/**
|
|
4801
|
+
* Trace ID for debugging and correlation across systems.
|
|
4802
|
+
*/
|
|
4803
|
+
trace_id: string;
|
|
4804
|
+
|
|
4805
|
+
/**
|
|
4806
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
4807
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
4808
|
+
* specified, defaults based on subscription creation date.
|
|
4809
|
+
*/
|
|
4810
|
+
webhook_version: string;
|
|
4811
|
+
}
|
|
4812
|
+
|
|
4813
|
+
export namespace PaymentCanceledWebhookEvent {
|
|
4814
|
+
/**
|
|
4815
|
+
* The payment request, as returned by
|
|
4816
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4817
|
+
*/
|
|
4818
|
+
export interface Data {
|
|
4819
|
+
/**
|
|
4820
|
+
* The payment request id.
|
|
4821
|
+
*/
|
|
4822
|
+
id: string;
|
|
4823
|
+
|
|
4824
|
+
/**
|
|
4825
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
4826
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
4827
|
+
* applied.
|
|
4828
|
+
*/
|
|
4829
|
+
amount: number;
|
|
4830
|
+
|
|
4831
|
+
/**
|
|
4832
|
+
* URL the recipient opens to pay
|
|
4833
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
4834
|
+
*/
|
|
4835
|
+
checkout_url: string;
|
|
4836
|
+
|
|
4837
|
+
created_at: string;
|
|
4838
|
+
|
|
4839
|
+
currency: string;
|
|
4840
|
+
|
|
4841
|
+
object: string;
|
|
4842
|
+
|
|
4843
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
4844
|
+
|
|
4845
|
+
description?: string;
|
|
4846
|
+
|
|
4847
|
+
/**
|
|
4848
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4849
|
+
* Absent when none was applied.
|
|
4850
|
+
*/
|
|
4851
|
+
discount?: Data.Discount;
|
|
4852
|
+
|
|
4853
|
+
/**
|
|
4854
|
+
* Subscription mode — how often the subscription renews.
|
|
4855
|
+
*/
|
|
4856
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
4857
|
+
|
|
4858
|
+
/**
|
|
4859
|
+
* Subscription mode — intervals per renewal.
|
|
4860
|
+
*/
|
|
4861
|
+
interval_count?: number;
|
|
4862
|
+
|
|
4863
|
+
metadata?: { [key: string]: string };
|
|
4864
|
+
|
|
4865
|
+
/**
|
|
4866
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
4867
|
+
*/
|
|
4868
|
+
mode?: 'payment' | 'subscription';
|
|
4869
|
+
|
|
4870
|
+
/**
|
|
4871
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4872
|
+
*/
|
|
4873
|
+
natural?: Data.Natural;
|
|
4874
|
+
|
|
4875
|
+
/**
|
|
4876
|
+
* Subscription mode — the recurring price subscribed to.
|
|
4877
|
+
*/
|
|
4878
|
+
price_id?: string;
|
|
4879
|
+
|
|
4880
|
+
/**
|
|
4881
|
+
* Subscription mode — units of the price subscribed to.
|
|
4882
|
+
*/
|
|
4883
|
+
quantity?: number;
|
|
4884
|
+
|
|
4885
|
+
/**
|
|
4886
|
+
* The rail this request settled on.
|
|
4887
|
+
*/
|
|
4888
|
+
rail?: 'stripe' | 'natural';
|
|
4889
|
+
|
|
4890
|
+
/**
|
|
4891
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4892
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4893
|
+
* `subscription_id`.
|
|
4894
|
+
*/
|
|
4895
|
+
stripe?: Data.Stripe;
|
|
4896
|
+
|
|
4897
|
+
/**
|
|
4898
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
4899
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
4900
|
+
* moved).
|
|
4901
|
+
*/
|
|
4902
|
+
trial_end?: string;
|
|
4903
|
+
|
|
4904
|
+
updated_at?: string;
|
|
4905
|
+
}
|
|
4906
|
+
|
|
4907
|
+
export namespace Data {
|
|
4908
|
+
/**
|
|
4909
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
4910
|
+
* Absent when none was applied.
|
|
4911
|
+
*/
|
|
4912
|
+
export interface Discount {
|
|
4913
|
+
coupon?: string;
|
|
4914
|
+
|
|
4915
|
+
/**
|
|
4916
|
+
* Name of the coupon/promo code displayed to customers.
|
|
4917
|
+
*/
|
|
4918
|
+
label?: string;
|
|
4919
|
+
|
|
4920
|
+
promotion_code?: string;
|
|
4921
|
+
}
|
|
4922
|
+
|
|
4923
|
+
/**
|
|
4924
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
4925
|
+
*/
|
|
4926
|
+
export interface Natural {
|
|
4927
|
+
/**
|
|
4928
|
+
* The Natural payment request (`prq_...`).
|
|
4929
|
+
*/
|
|
4930
|
+
payment_request_id?: string;
|
|
4931
|
+
|
|
4932
|
+
/**
|
|
4933
|
+
* The settled transaction (`txn_...`).
|
|
4934
|
+
*/
|
|
4935
|
+
transaction_id?: string;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
/**
|
|
4939
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
4940
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
4941
|
+
* `subscription_id`.
|
|
4942
|
+
*/
|
|
4943
|
+
export interface Stripe {
|
|
4944
|
+
/**
|
|
4945
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
4946
|
+
* mode; set in payment mode only when the request was created with a
|
|
4947
|
+
* `customer_id`.
|
|
4948
|
+
*/
|
|
4949
|
+
customer_id?: string;
|
|
4950
|
+
|
|
4951
|
+
/**
|
|
4952
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
4953
|
+
*/
|
|
4954
|
+
payment_intent_id?: string;
|
|
4955
|
+
|
|
4956
|
+
/**
|
|
4957
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
4958
|
+
*/
|
|
4959
|
+
subscription_id?: string;
|
|
4960
|
+
}
|
|
4961
|
+
}
|
|
4962
|
+
}
|
|
4963
|
+
|
|
4964
|
+
export interface PaymentDeclinedWebhookEvent {
|
|
4965
|
+
/**
|
|
4966
|
+
* API version for the webhook payload format
|
|
4967
|
+
*/
|
|
4968
|
+
api_version: string;
|
|
4969
|
+
|
|
4970
|
+
/**
|
|
4971
|
+
* When the event was created
|
|
4972
|
+
*/
|
|
4973
|
+
created_at: string;
|
|
4974
|
+
|
|
4975
|
+
/**
|
|
4976
|
+
* The payment request, as returned by
|
|
4977
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
4978
|
+
*/
|
|
4979
|
+
data: PaymentDeclinedWebhookEvent.Data;
|
|
4980
|
+
|
|
4981
|
+
/**
|
|
4982
|
+
* Unique identifier for this event (for deduplication)
|
|
4983
|
+
*/
|
|
4984
|
+
event_id: string;
|
|
4985
|
+
|
|
4986
|
+
event_type:
|
|
4987
|
+
| 'payment.succeeded'
|
|
4988
|
+
| 'payment.canceled'
|
|
4989
|
+
| 'payment.expired'
|
|
4990
|
+
| 'message.sent'
|
|
4991
|
+
| 'message.received'
|
|
4992
|
+
| 'message.read'
|
|
4993
|
+
| 'message.delivered'
|
|
4994
|
+
| 'message.failed'
|
|
4995
|
+
| 'message.edited'
|
|
4996
|
+
| 'reaction.added'
|
|
4997
|
+
| 'reaction.removed'
|
|
4998
|
+
| 'poll.received'
|
|
4999
|
+
| 'poll.failed'
|
|
5000
|
+
| 'poll.sent'
|
|
5001
|
+
| 'poll.delivered'
|
|
5002
|
+
| 'poll.read'
|
|
5003
|
+
| 'poll.updated'
|
|
5004
|
+
| 'poll.vote.added'
|
|
5005
|
+
| 'poll.vote.removed'
|
|
5006
|
+
| 'poll.reaction.added'
|
|
5007
|
+
| 'participant.added'
|
|
5008
|
+
| 'participant.removed'
|
|
5009
|
+
| 'chat.created'
|
|
5010
|
+
| 'chat.group_name_updated'
|
|
5011
|
+
| 'chat.group_icon_updated'
|
|
5012
|
+
| 'chat.group_name_update_failed'
|
|
5013
|
+
| 'chat.group_icon_update_failed'
|
|
5014
|
+
| 'chat.background_updated'
|
|
5015
|
+
| 'chat.background_update_failed'
|
|
5016
|
+
| 'chat.typing_indicator.started'
|
|
5017
|
+
| 'chat.typing_indicator.stopped'
|
|
5018
|
+
| 'phone_number.status_updated'
|
|
5019
|
+
| 'contact_card.received'
|
|
5020
|
+
| 'call.initiated'
|
|
5021
|
+
| 'call.ringing'
|
|
5022
|
+
| 'call.answered'
|
|
5023
|
+
| 'call.ended'
|
|
5024
|
+
| 'call.failed'
|
|
5025
|
+
| 'call.declined'
|
|
5026
|
+
| 'call.no_answer'
|
|
5027
|
+
| 'location.sharing.started'
|
|
5028
|
+
| 'location.sharing.stopped'
|
|
5029
|
+
| 'payment.declined'
|
|
5030
|
+
| 'payment.authorized'
|
|
5031
|
+
| 'connection.created'
|
|
5032
|
+
| 'connection.revoked';
|
|
5033
|
+
|
|
5034
|
+
/**
|
|
5035
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
5036
|
+
*/
|
|
5037
|
+
partner_id: string;
|
|
5038
|
+
|
|
5039
|
+
/**
|
|
5040
|
+
* Trace ID for debugging and correlation across systems.
|
|
5041
|
+
*/
|
|
5042
|
+
trace_id: string;
|
|
5043
|
+
|
|
5044
|
+
/**
|
|
5045
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
5046
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
5047
|
+
* specified, defaults based on subscription creation date.
|
|
5048
|
+
*/
|
|
5049
|
+
webhook_version: string;
|
|
5050
|
+
}
|
|
5051
|
+
|
|
5052
|
+
export namespace PaymentDeclinedWebhookEvent {
|
|
5053
|
+
/**
|
|
5054
|
+
* The payment request, as returned by
|
|
5055
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
5056
|
+
*/
|
|
5057
|
+
export interface Data {
|
|
5058
|
+
/**
|
|
5059
|
+
* The payment request id.
|
|
5060
|
+
*/
|
|
5061
|
+
id: string;
|
|
5062
|
+
|
|
5063
|
+
/**
|
|
5064
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
5065
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
5066
|
+
* applied.
|
|
5067
|
+
*/
|
|
5068
|
+
amount: number;
|
|
5069
|
+
|
|
5070
|
+
/**
|
|
5071
|
+
* URL the recipient opens to pay
|
|
5072
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
5073
|
+
*/
|
|
5074
|
+
checkout_url: string;
|
|
5075
|
+
|
|
5076
|
+
created_at: string;
|
|
5077
|
+
|
|
5078
|
+
currency: string;
|
|
5079
|
+
|
|
5080
|
+
object: string;
|
|
5081
|
+
|
|
5082
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
5083
|
+
|
|
5084
|
+
description?: string;
|
|
5085
|
+
|
|
5086
|
+
/**
|
|
5087
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5088
|
+
* Absent when none was applied.
|
|
5089
|
+
*/
|
|
5090
|
+
discount?: Data.Discount;
|
|
5091
|
+
|
|
5092
|
+
/**
|
|
5093
|
+
* Subscription mode — how often the subscription renews.
|
|
5094
|
+
*/
|
|
5095
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
5096
|
+
|
|
5097
|
+
/**
|
|
5098
|
+
* Subscription mode — intervals per renewal.
|
|
5099
|
+
*/
|
|
5100
|
+
interval_count?: number;
|
|
5101
|
+
|
|
5102
|
+
metadata?: { [key: string]: string };
|
|
5103
|
+
|
|
5104
|
+
/**
|
|
5105
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
5106
|
+
*/
|
|
5107
|
+
mode?: 'payment' | 'subscription';
|
|
5108
|
+
|
|
5109
|
+
/**
|
|
5110
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5111
|
+
*/
|
|
5112
|
+
natural?: Data.Natural;
|
|
5113
|
+
|
|
5114
|
+
/**
|
|
5115
|
+
* Subscription mode — the recurring price subscribed to.
|
|
5116
|
+
*/
|
|
5117
|
+
price_id?: string;
|
|
5118
|
+
|
|
5119
|
+
/**
|
|
5120
|
+
* Subscription mode — units of the price subscribed to.
|
|
5121
|
+
*/
|
|
5122
|
+
quantity?: number;
|
|
5123
|
+
|
|
5124
|
+
/**
|
|
5125
|
+
* The rail this request settled on.
|
|
5126
|
+
*/
|
|
5127
|
+
rail?: 'stripe' | 'natural';
|
|
5128
|
+
|
|
5129
|
+
/**
|
|
5130
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5131
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5132
|
+
* `subscription_id`.
|
|
5133
|
+
*/
|
|
5134
|
+
stripe?: Data.Stripe;
|
|
5135
|
+
|
|
5136
|
+
/**
|
|
5137
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
5138
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
5139
|
+
* moved).
|
|
5140
|
+
*/
|
|
5141
|
+
trial_end?: string;
|
|
5142
|
+
|
|
5143
|
+
updated_at?: string;
|
|
5144
|
+
}
|
|
5145
|
+
|
|
5146
|
+
export namespace Data {
|
|
5147
|
+
/**
|
|
5148
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5149
|
+
* Absent when none was applied.
|
|
5150
|
+
*/
|
|
5151
|
+
export interface Discount {
|
|
5152
|
+
coupon?: string;
|
|
5153
|
+
|
|
5154
|
+
/**
|
|
5155
|
+
* Name of the coupon/promo code displayed to customers.
|
|
5156
|
+
*/
|
|
5157
|
+
label?: string;
|
|
5158
|
+
|
|
5159
|
+
promotion_code?: string;
|
|
5160
|
+
}
|
|
5161
|
+
|
|
5162
|
+
/**
|
|
5163
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5164
|
+
*/
|
|
5165
|
+
export interface Natural {
|
|
5166
|
+
/**
|
|
5167
|
+
* The Natural payment request (`prq_...`).
|
|
5168
|
+
*/
|
|
5169
|
+
payment_request_id?: string;
|
|
5170
|
+
|
|
5171
|
+
/**
|
|
5172
|
+
* The settled transaction (`txn_...`).
|
|
5173
|
+
*/
|
|
5174
|
+
transaction_id?: string;
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5177
|
+
/**
|
|
5178
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5179
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5180
|
+
* `subscription_id`.
|
|
5181
|
+
*/
|
|
5182
|
+
export interface Stripe {
|
|
5183
|
+
/**
|
|
5184
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
5185
|
+
* mode; set in payment mode only when the request was created with a
|
|
5186
|
+
* `customer_id`.
|
|
5187
|
+
*/
|
|
5188
|
+
customer_id?: string;
|
|
5189
|
+
|
|
5190
|
+
/**
|
|
5191
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
5192
|
+
*/
|
|
5193
|
+
payment_intent_id?: string;
|
|
5194
|
+
|
|
5195
|
+
/**
|
|
5196
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
5197
|
+
*/
|
|
5198
|
+
subscription_id?: string;
|
|
5199
|
+
}
|
|
5200
|
+
}
|
|
5201
|
+
}
|
|
5202
|
+
|
|
5203
|
+
export interface PaymentExpiredWebhookEvent {
|
|
5204
|
+
/**
|
|
5205
|
+
* API version for the webhook payload format
|
|
5206
|
+
*/
|
|
5207
|
+
api_version: string;
|
|
5208
|
+
|
|
5209
|
+
/**
|
|
5210
|
+
* When the event was created
|
|
5211
|
+
*/
|
|
5212
|
+
created_at: string;
|
|
5213
|
+
|
|
5214
|
+
/**
|
|
5215
|
+
* The payment request, as returned by
|
|
5216
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
5217
|
+
*/
|
|
5218
|
+
data: PaymentExpiredWebhookEvent.Data;
|
|
5219
|
+
|
|
5220
|
+
/**
|
|
5221
|
+
* Unique identifier for this event (for deduplication)
|
|
5222
|
+
*/
|
|
5223
|
+
event_id: string;
|
|
5224
|
+
|
|
5225
|
+
event_type:
|
|
5226
|
+
| 'payment.succeeded'
|
|
5227
|
+
| 'payment.canceled'
|
|
5228
|
+
| 'payment.expired'
|
|
5229
|
+
| 'message.sent'
|
|
5230
|
+
| 'message.received'
|
|
5231
|
+
| 'message.read'
|
|
5232
|
+
| 'message.delivered'
|
|
5233
|
+
| 'message.failed'
|
|
5234
|
+
| 'message.edited'
|
|
5235
|
+
| 'reaction.added'
|
|
5236
|
+
| 'reaction.removed'
|
|
5237
|
+
| 'poll.received'
|
|
5238
|
+
| 'poll.failed'
|
|
5239
|
+
| 'poll.sent'
|
|
5240
|
+
| 'poll.delivered'
|
|
5241
|
+
| 'poll.read'
|
|
5242
|
+
| 'poll.updated'
|
|
5243
|
+
| 'poll.vote.added'
|
|
5244
|
+
| 'poll.vote.removed'
|
|
5245
|
+
| 'poll.reaction.added'
|
|
5246
|
+
| 'participant.added'
|
|
5247
|
+
| 'participant.removed'
|
|
5248
|
+
| 'chat.created'
|
|
5249
|
+
| 'chat.group_name_updated'
|
|
5250
|
+
| 'chat.group_icon_updated'
|
|
5251
|
+
| 'chat.group_name_update_failed'
|
|
5252
|
+
| 'chat.group_icon_update_failed'
|
|
5253
|
+
| 'chat.background_updated'
|
|
5254
|
+
| 'chat.background_update_failed'
|
|
5255
|
+
| 'chat.typing_indicator.started'
|
|
5256
|
+
| 'chat.typing_indicator.stopped'
|
|
5257
|
+
| 'phone_number.status_updated'
|
|
5258
|
+
| 'contact_card.received'
|
|
5259
|
+
| 'call.initiated'
|
|
5260
|
+
| 'call.ringing'
|
|
5261
|
+
| 'call.answered'
|
|
5262
|
+
| 'call.ended'
|
|
5263
|
+
| 'call.failed'
|
|
5264
|
+
| 'call.declined'
|
|
5265
|
+
| 'call.no_answer'
|
|
5266
|
+
| 'location.sharing.started'
|
|
5267
|
+
| 'location.sharing.stopped'
|
|
5268
|
+
| 'payment.declined'
|
|
5269
|
+
| 'payment.authorized'
|
|
5270
|
+
| 'connection.created'
|
|
5271
|
+
| 'connection.revoked';
|
|
5272
|
+
|
|
5273
|
+
/**
|
|
5274
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
5275
|
+
*/
|
|
5276
|
+
partner_id: string;
|
|
5277
|
+
|
|
5278
|
+
/**
|
|
5279
|
+
* Trace ID for debugging and correlation across systems.
|
|
5280
|
+
*/
|
|
5281
|
+
trace_id: string;
|
|
5282
|
+
|
|
5283
|
+
/**
|
|
5284
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
5285
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
5286
|
+
* specified, defaults based on subscription creation date.
|
|
5287
|
+
*/
|
|
5288
|
+
webhook_version: string;
|
|
5289
|
+
}
|
|
5290
|
+
|
|
5291
|
+
export namespace PaymentExpiredWebhookEvent {
|
|
5292
|
+
/**
|
|
5293
|
+
* The payment request, as returned by
|
|
5294
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
5295
|
+
*/
|
|
5296
|
+
export interface Data {
|
|
5297
|
+
/**
|
|
5298
|
+
* The payment request id.
|
|
5299
|
+
*/
|
|
5300
|
+
id: string;
|
|
5301
|
+
|
|
5302
|
+
/**
|
|
5303
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
5304
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
5305
|
+
* applied.
|
|
5306
|
+
*/
|
|
5307
|
+
amount: number;
|
|
5308
|
+
|
|
5309
|
+
/**
|
|
5310
|
+
* URL the recipient opens to pay
|
|
5311
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
5312
|
+
*/
|
|
5313
|
+
checkout_url: string;
|
|
5314
|
+
|
|
5315
|
+
created_at: string;
|
|
5316
|
+
|
|
5317
|
+
currency: string;
|
|
5318
|
+
|
|
5319
|
+
object: string;
|
|
5320
|
+
|
|
5321
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
5322
|
+
|
|
5323
|
+
description?: string;
|
|
5324
|
+
|
|
5325
|
+
/**
|
|
5326
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5327
|
+
* Absent when none was applied.
|
|
5328
|
+
*/
|
|
5329
|
+
discount?: Data.Discount;
|
|
5330
|
+
|
|
5331
|
+
/**
|
|
5332
|
+
* Subscription mode — how often the subscription renews.
|
|
5333
|
+
*/
|
|
5334
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
5335
|
+
|
|
5336
|
+
/**
|
|
5337
|
+
* Subscription mode — intervals per renewal.
|
|
5338
|
+
*/
|
|
5339
|
+
interval_count?: number;
|
|
5340
|
+
|
|
5341
|
+
metadata?: { [key: string]: string };
|
|
5342
|
+
|
|
5343
|
+
/**
|
|
5344
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
5345
|
+
*/
|
|
5346
|
+
mode?: 'payment' | 'subscription';
|
|
5347
|
+
|
|
5348
|
+
/**
|
|
5349
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5350
|
+
*/
|
|
5351
|
+
natural?: Data.Natural;
|
|
5352
|
+
|
|
5353
|
+
/**
|
|
5354
|
+
* Subscription mode — the recurring price subscribed to.
|
|
5355
|
+
*/
|
|
5356
|
+
price_id?: string;
|
|
5357
|
+
|
|
5358
|
+
/**
|
|
5359
|
+
* Subscription mode — units of the price subscribed to.
|
|
5360
|
+
*/
|
|
5361
|
+
quantity?: number;
|
|
5362
|
+
|
|
5363
|
+
/**
|
|
5364
|
+
* The rail this request settled on.
|
|
5365
|
+
*/
|
|
5366
|
+
rail?: 'stripe' | 'natural';
|
|
5367
|
+
|
|
5368
|
+
/**
|
|
5369
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5370
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5371
|
+
* `subscription_id`.
|
|
5372
|
+
*/
|
|
5373
|
+
stripe?: Data.Stripe;
|
|
5374
|
+
|
|
5375
|
+
/**
|
|
5376
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
5377
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
5378
|
+
* moved).
|
|
5379
|
+
*/
|
|
5380
|
+
trial_end?: string;
|
|
5381
|
+
|
|
5382
|
+
updated_at?: string;
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
export namespace Data {
|
|
5386
|
+
/**
|
|
5387
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5388
|
+
* Absent when none was applied.
|
|
5389
|
+
*/
|
|
5390
|
+
export interface Discount {
|
|
5391
|
+
coupon?: string;
|
|
5392
|
+
|
|
5393
|
+
/**
|
|
5394
|
+
* Name of the coupon/promo code displayed to customers.
|
|
5395
|
+
*/
|
|
5396
|
+
label?: string;
|
|
5397
|
+
|
|
5398
|
+
promotion_code?: string;
|
|
5399
|
+
}
|
|
5400
|
+
|
|
5401
|
+
/**
|
|
5402
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5403
|
+
*/
|
|
5404
|
+
export interface Natural {
|
|
5405
|
+
/**
|
|
5406
|
+
* The Natural payment request (`prq_...`).
|
|
5407
|
+
*/
|
|
5408
|
+
payment_request_id?: string;
|
|
5409
|
+
|
|
5410
|
+
/**
|
|
5411
|
+
* The settled transaction (`txn_...`).
|
|
5412
|
+
*/
|
|
5413
|
+
transaction_id?: string;
|
|
5414
|
+
}
|
|
5415
|
+
|
|
5416
|
+
/**
|
|
5417
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5418
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5419
|
+
* `subscription_id`.
|
|
5420
|
+
*/
|
|
5421
|
+
export interface Stripe {
|
|
5422
|
+
/**
|
|
5423
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
5424
|
+
* mode; set in payment mode only when the request was created with a
|
|
5425
|
+
* `customer_id`.
|
|
5426
|
+
*/
|
|
5427
|
+
customer_id?: string;
|
|
5428
|
+
|
|
5429
|
+
/**
|
|
5430
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
5431
|
+
*/
|
|
5432
|
+
payment_intent_id?: string;
|
|
5433
|
+
|
|
5434
|
+
/**
|
|
5435
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
5436
|
+
*/
|
|
5437
|
+
subscription_id?: string;
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5442
|
+
export interface PaymentSucceededWebhookEvent {
|
|
5443
|
+
/**
|
|
5444
|
+
* API version for the webhook payload format
|
|
5445
|
+
*/
|
|
5446
|
+
api_version: string;
|
|
5447
|
+
|
|
5448
|
+
/**
|
|
5449
|
+
* When the event was created
|
|
5450
|
+
*/
|
|
5451
|
+
created_at: string;
|
|
5452
|
+
|
|
5453
|
+
/**
|
|
5454
|
+
* The payment request, as returned by
|
|
5455
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
5456
|
+
*/
|
|
5457
|
+
data: PaymentSucceededWebhookEvent.Data;
|
|
5458
|
+
|
|
5459
|
+
/**
|
|
5460
|
+
* Unique identifier for this event (for deduplication)
|
|
5461
|
+
*/
|
|
5462
|
+
event_id: string;
|
|
5463
|
+
|
|
5464
|
+
event_type:
|
|
5465
|
+
| 'payment.succeeded'
|
|
5466
|
+
| 'payment.canceled'
|
|
5467
|
+
| 'payment.expired'
|
|
5468
|
+
| 'message.sent'
|
|
5469
|
+
| 'message.received'
|
|
5470
|
+
| 'message.read'
|
|
5471
|
+
| 'message.delivered'
|
|
5472
|
+
| 'message.failed'
|
|
5473
|
+
| 'message.edited'
|
|
5474
|
+
| 'reaction.added'
|
|
5475
|
+
| 'reaction.removed'
|
|
5476
|
+
| 'poll.received'
|
|
5477
|
+
| 'poll.failed'
|
|
5478
|
+
| 'poll.sent'
|
|
5479
|
+
| 'poll.delivered'
|
|
5480
|
+
| 'poll.read'
|
|
5481
|
+
| 'poll.updated'
|
|
5482
|
+
| 'poll.vote.added'
|
|
5483
|
+
| 'poll.vote.removed'
|
|
5484
|
+
| 'poll.reaction.added'
|
|
5485
|
+
| 'participant.added'
|
|
5486
|
+
| 'participant.removed'
|
|
5487
|
+
| 'chat.created'
|
|
5488
|
+
| 'chat.group_name_updated'
|
|
5489
|
+
| 'chat.group_icon_updated'
|
|
5490
|
+
| 'chat.group_name_update_failed'
|
|
5491
|
+
| 'chat.group_icon_update_failed'
|
|
5492
|
+
| 'chat.background_updated'
|
|
5493
|
+
| 'chat.background_update_failed'
|
|
5494
|
+
| 'chat.typing_indicator.started'
|
|
5495
|
+
| 'chat.typing_indicator.stopped'
|
|
5496
|
+
| 'phone_number.status_updated'
|
|
5497
|
+
| 'contact_card.received'
|
|
5498
|
+
| 'call.initiated'
|
|
5499
|
+
| 'call.ringing'
|
|
5500
|
+
| 'call.answered'
|
|
5501
|
+
| 'call.ended'
|
|
5502
|
+
| 'call.failed'
|
|
5503
|
+
| 'call.declined'
|
|
5504
|
+
| 'call.no_answer'
|
|
5505
|
+
| 'location.sharing.started'
|
|
5506
|
+
| 'location.sharing.stopped'
|
|
5507
|
+
| 'payment.declined'
|
|
5508
|
+
| 'payment.authorized'
|
|
5509
|
+
| 'connection.created'
|
|
5510
|
+
| 'connection.revoked';
|
|
5511
|
+
|
|
5512
|
+
/**
|
|
5513
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
5514
|
+
*/
|
|
5515
|
+
partner_id: string;
|
|
5516
|
+
|
|
5517
|
+
/**
|
|
5518
|
+
* Trace ID for debugging and correlation across systems.
|
|
5519
|
+
*/
|
|
5520
|
+
trace_id: string;
|
|
5521
|
+
|
|
5522
|
+
/**
|
|
5523
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
5524
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
5525
|
+
* specified, defaults based on subscription creation date.
|
|
5526
|
+
*/
|
|
5527
|
+
webhook_version: string;
|
|
5528
|
+
}
|
|
5529
|
+
|
|
5530
|
+
export namespace PaymentSucceededWebhookEvent {
|
|
5531
|
+
/**
|
|
5532
|
+
* The payment request, as returned by
|
|
5533
|
+
* `GET /v3/payment_requests/{paymentRequestId}`.
|
|
5534
|
+
*/
|
|
5535
|
+
export interface Data {
|
|
5536
|
+
/**
|
|
5537
|
+
* The payment request id.
|
|
5538
|
+
*/
|
|
5539
|
+
id: string;
|
|
5540
|
+
|
|
5541
|
+
/**
|
|
5542
|
+
* What was charged at checkout, in the currency's minor units. In `subscription`
|
|
5543
|
+
* mode this is the first invoice's total — all items after any discounts are
|
|
5544
|
+
* applied.
|
|
5545
|
+
*/
|
|
5546
|
+
amount: number;
|
|
5547
|
+
|
|
5548
|
+
/**
|
|
5549
|
+
* URL the recipient opens to pay
|
|
5550
|
+
* (`https://zero.linqapp.com/pay/{slug}?session=...`).
|
|
5551
|
+
*/
|
|
5552
|
+
checkout_url: string;
|
|
5553
|
+
|
|
5554
|
+
created_at: string;
|
|
5555
|
+
|
|
5556
|
+
currency: string;
|
|
5557
|
+
|
|
5558
|
+
object: string;
|
|
5559
|
+
|
|
5560
|
+
status: 'succeeded' | 'failed' | 'canceled' | 'expired';
|
|
5561
|
+
|
|
5562
|
+
description?: string;
|
|
5563
|
+
|
|
5564
|
+
/**
|
|
5565
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5566
|
+
* Absent when none was applied.
|
|
5567
|
+
*/
|
|
5568
|
+
discount?: Data.Discount;
|
|
5569
|
+
|
|
5570
|
+
/**
|
|
5571
|
+
* Subscription mode — how often the subscription renews.
|
|
5572
|
+
*/
|
|
5573
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
5574
|
+
|
|
5575
|
+
/**
|
|
5576
|
+
* Subscription mode — intervals per renewal.
|
|
5577
|
+
*/
|
|
5578
|
+
interval_count?: number;
|
|
5579
|
+
|
|
5580
|
+
metadata?: { [key: string]: string };
|
|
5581
|
+
|
|
5582
|
+
/**
|
|
5583
|
+
* Whether the request collected a one-time charge or started a subscription.
|
|
5584
|
+
*/
|
|
5585
|
+
mode?: 'payment' | 'subscription';
|
|
5586
|
+
|
|
5587
|
+
/**
|
|
5588
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5589
|
+
*/
|
|
5590
|
+
natural?: Data.Natural;
|
|
5591
|
+
|
|
5592
|
+
/**
|
|
5593
|
+
* Subscription mode — the recurring price subscribed to.
|
|
5594
|
+
*/
|
|
5595
|
+
price_id?: string;
|
|
5596
|
+
|
|
5597
|
+
/**
|
|
5598
|
+
* Subscription mode — units of the price subscribed to.
|
|
5599
|
+
*/
|
|
5600
|
+
quantity?: number;
|
|
5601
|
+
|
|
5602
|
+
/**
|
|
5603
|
+
* The rail this request settled on.
|
|
5604
|
+
*/
|
|
5605
|
+
rail?: 'stripe' | 'natural';
|
|
5606
|
+
|
|
5607
|
+
/**
|
|
5608
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5609
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5610
|
+
* `subscription_id`.
|
|
5611
|
+
*/
|
|
5612
|
+
stripe?: Data.Stripe;
|
|
5613
|
+
|
|
5614
|
+
/**
|
|
5615
|
+
* Subscription mode — when the free trial ends and the first charge happens. On a
|
|
5616
|
+
* trial request, `payment.succeeded` means the payment method was collected ($0
|
|
5617
|
+
* moved).
|
|
5618
|
+
*/
|
|
5619
|
+
trial_end?: string;
|
|
5620
|
+
|
|
5621
|
+
updated_at?: string;
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
export namespace Data {
|
|
5625
|
+
/**
|
|
5626
|
+
* Subscription mode — the discount Stripe applied, read back from the coupon.
|
|
5627
|
+
* Absent when none was applied.
|
|
5628
|
+
*/
|
|
5629
|
+
export interface Discount {
|
|
5630
|
+
coupon?: string;
|
|
5631
|
+
|
|
5632
|
+
/**
|
|
5633
|
+
* Name of the coupon/promo code displayed to customers.
|
|
5634
|
+
*/
|
|
5635
|
+
label?: string;
|
|
5636
|
+
|
|
5637
|
+
promotion_code?: string;
|
|
5638
|
+
}
|
|
5639
|
+
|
|
5640
|
+
/**
|
|
5641
|
+
* Natural-rail join keys, present when `rail: natural`.
|
|
5642
|
+
*/
|
|
5643
|
+
export interface Natural {
|
|
5644
|
+
/**
|
|
5645
|
+
* The Natural payment request (`prq_...`).
|
|
5646
|
+
*/
|
|
5647
|
+
payment_request_id?: string;
|
|
5648
|
+
|
|
5649
|
+
/**
|
|
5650
|
+
* The settled transaction (`txn_...`).
|
|
5651
|
+
*/
|
|
5652
|
+
transaction_id?: string;
|
|
5653
|
+
}
|
|
5654
|
+
|
|
5655
|
+
/**
|
|
5656
|
+
* Ids of the Stripe objects on your connected account — join keys into your own
|
|
5657
|
+
* Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
|
|
5658
|
+
* `subscription_id`.
|
|
5659
|
+
*/
|
|
5660
|
+
export interface Stripe {
|
|
5661
|
+
/**
|
|
5662
|
+
* The Customer the request is attached to (`cus_...`). Always set in subscription
|
|
5663
|
+
* mode; set in payment mode only when the request was created with a
|
|
5664
|
+
* `customer_id`.
|
|
5665
|
+
*/
|
|
5666
|
+
customer_id?: string;
|
|
5667
|
+
|
|
5668
|
+
/**
|
|
5669
|
+
* The PaymentIntent collected at checkout (`pi_...`).
|
|
5670
|
+
*/
|
|
5671
|
+
payment_intent_id?: string;
|
|
5672
|
+
|
|
5673
|
+
/**
|
|
5674
|
+
* Subscription mode — the Subscription (`sub_...`).
|
|
5675
|
+
*/
|
|
5676
|
+
subscription_id?: string;
|
|
5677
|
+
}
|
|
5678
|
+
}
|
|
5679
|
+
}
|
|
5680
|
+
|
|
3773
5681
|
/**
|
|
3774
5682
|
* Complete webhook payload for message.sent events (2026-02-03 format)
|
|
3775
5683
|
*/
|
|
@@ -3803,7 +5711,16 @@ export type UnwrapWebhookEvent =
|
|
|
3803
5711
|
| ChatBackgroundUpdatedWebhookEvent
|
|
3804
5712
|
| ChatBackgroundUpdateFailedWebhookEvent
|
|
3805
5713
|
| ContactCardReceivedWebhookEvent
|
|
3806
|
-
| PhoneNumberStatusUpdatedWebhookEvent
|
|
5714
|
+
| PhoneNumberStatusUpdatedWebhookEvent
|
|
5715
|
+
| ConnectionCreatedWebhookEvent
|
|
5716
|
+
| ConnectionRevokedWebhookEvent
|
|
5717
|
+
| LocationSharingStartedWebhookEvent
|
|
5718
|
+
| LocationSharingStoppedWebhookEvent
|
|
5719
|
+
| PaymentAuthorizedWebhookEvent
|
|
5720
|
+
| PaymentCanceledWebhookEvent
|
|
5721
|
+
| PaymentDeclinedWebhookEvent
|
|
5722
|
+
| PaymentExpiredWebhookEvent
|
|
5723
|
+
| PaymentSucceededWebhookEvent;
|
|
3807
5724
|
|
|
3808
5725
|
export declare namespace Webhooks {
|
|
3809
5726
|
export {
|
|
@@ -3843,6 +5760,15 @@ export declare namespace Webhooks {
|
|
|
3843
5760
|
type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent,
|
|
3844
5761
|
type ContactCardReceivedWebhookEvent as ContactCardReceivedWebhookEvent,
|
|
3845
5762
|
type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent,
|
|
5763
|
+
type ConnectionCreatedWebhookEvent as ConnectionCreatedWebhookEvent,
|
|
5764
|
+
type ConnectionRevokedWebhookEvent as ConnectionRevokedWebhookEvent,
|
|
5765
|
+
type LocationSharingStartedWebhookEvent as LocationSharingStartedWebhookEvent,
|
|
5766
|
+
type LocationSharingStoppedWebhookEvent as LocationSharingStoppedWebhookEvent,
|
|
5767
|
+
type PaymentAuthorizedWebhookEvent as PaymentAuthorizedWebhookEvent,
|
|
5768
|
+
type PaymentCanceledWebhookEvent as PaymentCanceledWebhookEvent,
|
|
5769
|
+
type PaymentDeclinedWebhookEvent as PaymentDeclinedWebhookEvent,
|
|
5770
|
+
type PaymentExpiredWebhookEvent as PaymentExpiredWebhookEvent,
|
|
5771
|
+
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
3846
5772
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
3847
5773
|
};
|
|
3848
5774
|
}
|