-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCheckoutResponse.ts
More file actions
84 lines (81 loc) · 2.08 KB
/
Copy pathCheckoutResponse.ts
File metadata and controls
84 lines (81 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
export interface User {
email: string;
first: string;
last: string;
public_key: string;
id: string;
created: string;
/**
* A special tokenized URL where you can send a POST request to re-send the license key to the buyer. The URL is valid for 24 hours only.
*/
resend_email_endpoint?: string;
}
export interface Purchase {
tax_rate?: number;
total_gross?: number;
amount_per_cycle?: number;
initial_amount?: number;
renewal_amount?: number;
renewals_discount?: number | null;
renewals_discount_type?: string | null;
billing_cycle?: number;
outstanding_balance?: number;
failed_payments?: number;
trial_ends?: string | null;
next_payment?: string;
canceled_at?: string | null;
user_id?: string;
install_id?: string | null;
plan_id?: string;
pricing_id?: string;
license_id?: string;
ip?: string;
country_code?: string;
zip_postal_code?: number;
vat_id?: string | null;
coupon_id?: string | null;
user_card_id?: string;
source?: number;
plugin_id?: string;
external_id?: string;
gateway?: string;
environment?: number;
id?: string;
created?: string;
updated?: string | null;
currency?: string;
bound_payment_id?: string | null;
subscription_id?: string | null;
gateway_fee?: number;
gross?: number;
vat?: number;
is_renewal?: boolean;
type?: string;
[key: string]: unknown;
}
export interface Trial {
id: string;
license_id: string;
payment_id: string | null;
plugin_id: string;
subscription_id: string | null;
user_id: string;
canceled_at: string | null;
converted_at: string | null;
created: string;
environment: number;
trial_ends_at: string;
updated: string | null;
with_payment_method: boolean;
}
export interface CheckoutResponse {
/**
* The purchase property is present for premium purchase or paid trials only.
*/
purchase?: Purchase;
user: User;
/**
* The trial property is present for free trials only.
*/
trial?: Trial;
}