@fleetless/contracts 6.4.0 → 7.0.0-next.1
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 +42 -0
- package/artifacts/openapi.json +5805 -1805
- package/artifacts/routes.json +104 -17
- package/artifacts/schema/addon-catalogue-entry.schema.json +1 -15
- package/artifacts/schema/billing-address.schema.json +7 -1
- package/artifacts/schema/billing-change-request.schema.json +9 -0
- package/artifacts/schema/billing-change-response.schema.json +2219 -625
- package/artifacts/schema/billing-details-update.schema.json +70 -0
- package/artifacts/schema/billing-details.schema.json +27 -3
- package/artifacts/schema/billing-view.schema.json +56 -24
- package/artifacts/schema/checkout-request.schema.json +90 -154
- package/artifacts/schema/checkout-response.schema.json +531 -17
- package/artifacts/schema/invoice-pay-request.schema.json +16 -0
- package/artifacts/schema/payment-method-change-request.schema.json +7 -0
- package/artifacts/schema/plan-catalogue-entry.schema.json +1 -15
- package/artifacts/schema/plan-prices.schema.json +1 -15
- package/artifacts/schema/purchase-billing-details.schema.json +111 -0
- package/artifacts/schema/purchase-conflict-details.schema.json +582 -0
- package/artifacts/schema/purchase-hold-reason.schema.json +9 -0
- package/artifacts/schema/purchase-intent-confirm-request.schema.json +40 -0
- package/artifacts/schema/purchase-intent-lookup-query.schema.json +56 -0
- package/artifacts/schema/purchase-intent-response.schema.json +1554 -0
- package/artifacts/schema/purchase-operation-key.schema.json +7 -0
- package/artifacts/schema/purchase-operation.schema.json +11 -0
- package/artifacts/schema/purchase-quote.schema.json +43 -0
- package/artifacts/schema/purchase-refusal-rule.schema.json +13 -0
- package/artifacts/schema/vat-decision.schema.json +77 -0
- package/artifacts/schema/vat-id-check-response.schema.json +111 -25
- package/artifacts/schema/vies-pending-reason.schema.json +9 -0
- package/dist/billing.d.ts +1128 -75
- package/dist/billing.js +174 -66
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/plans.d.ts +4 -9
- package/dist/plans.js +4 -7
- package/dist/routes.js +62 -64
- package/package.json +2 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"kind": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "company",
|
|
8
|
+
"description": "Billed as a company."
|
|
9
|
+
},
|
|
10
|
+
"company_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 200,
|
|
14
|
+
"description": "The company's legal name, printed on the invoice."
|
|
15
|
+
},
|
|
16
|
+
"vat_id": {
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{
|
|
19
|
+
"type": "string",
|
|
20
|
+
"maxLength": 20
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "null"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"description": "The company's VAT ID, or `null` for none. Required for a new purchase in another EU country; direct VIES must confirm it with an identifier."
|
|
27
|
+
},
|
|
28
|
+
"tax_id": {
|
|
29
|
+
"description": "Free-text Tax ID. Required for a new non-EU purchase; historical records may omit it.",
|
|
30
|
+
"anyOf": [
|
|
31
|
+
{
|
|
32
|
+
"type": "string",
|
|
33
|
+
"maxLength": 100
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "null"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"address": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"line1": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"maxLength": 200,
|
|
47
|
+
"description": "Street and number, or the first address line."
|
|
48
|
+
},
|
|
49
|
+
"line2": {
|
|
50
|
+
"anyOf": [
|
|
51
|
+
{
|
|
52
|
+
"type": "string",
|
|
53
|
+
"maxLength": 200
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "null"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"description": "A second address line, or `null` when there is none."
|
|
60
|
+
},
|
|
61
|
+
"postal_code": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"maxLength": 20,
|
|
65
|
+
"description": "Postal or ZIP code."
|
|
66
|
+
},
|
|
67
|
+
"city": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1,
|
|
70
|
+
"maxLength": 100,
|
|
71
|
+
"description": "City or town."
|
|
72
|
+
},
|
|
73
|
+
"country": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^[A-Z]{2}$",
|
|
76
|
+
"description": "The billing country, used for purchase eligibility and VAT."
|
|
77
|
+
},
|
|
78
|
+
"state": {
|
|
79
|
+
"description": "State or region. A new US purchase requires a two-letter state code; historical addresses may omit it.",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 100
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [
|
|
86
|
+
"line1",
|
|
87
|
+
"line2",
|
|
88
|
+
"postal_code",
|
|
89
|
+
"city",
|
|
90
|
+
"country"
|
|
91
|
+
],
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"description": "The billing address."
|
|
94
|
+
},
|
|
95
|
+
"invoice_email": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "email",
|
|
98
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
99
|
+
"description": "Where invoices and billing mail are sent."
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"kind",
|
|
104
|
+
"company_name",
|
|
105
|
+
"vat_id",
|
|
106
|
+
"address",
|
|
107
|
+
"invoice_email"
|
|
108
|
+
],
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"description": "New company purchase. Other EU countries require VAT ID; non-EU requires Tax ID; US requires two-letter state. Cloud additionally checks the versioned public-email policy and current VIES evidence."
|
|
111
|
+
}
|
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"field": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "operation_key"
|
|
10
|
+
},
|
|
11
|
+
"rule": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"const": "operation_key_reused"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"field",
|
|
18
|
+
"rule"
|
|
19
|
+
],
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"field": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"const": "intent"
|
|
28
|
+
},
|
|
29
|
+
"rule": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": [
|
|
32
|
+
"stale_quote",
|
|
33
|
+
"buyer_changed",
|
|
34
|
+
"not_eligible",
|
|
35
|
+
"invoice_not_open"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"current_intent": {
|
|
39
|
+
"oneOf": [
|
|
40
|
+
{
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"intent_id": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"format": "uuid",
|
|
46
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
47
|
+
"description": "Opaque persisted purchase intent identity."
|
|
48
|
+
},
|
|
49
|
+
"operation_key": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"format": "uuid",
|
|
52
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
53
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
54
|
+
},
|
|
55
|
+
"operation": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"enum": [
|
|
58
|
+
"checkout",
|
|
59
|
+
"paid_change",
|
|
60
|
+
"invoice_payment",
|
|
61
|
+
"payment_method_invoice"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"invoice_id": {
|
|
65
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "uuid",
|
|
68
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
69
|
+
},
|
|
70
|
+
"state": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"const": "awaiting_vies"
|
|
73
|
+
},
|
|
74
|
+
"reason": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"vies_unavailable",
|
|
78
|
+
"vies_unverified",
|
|
79
|
+
"vies_identifier_missing"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"next_attempt_at": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"format": "date-time",
|
|
85
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"intent_id",
|
|
90
|
+
"operation_key",
|
|
91
|
+
"operation",
|
|
92
|
+
"state",
|
|
93
|
+
"reason",
|
|
94
|
+
"next_attempt_at"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"intent_id": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "uuid",
|
|
104
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
105
|
+
"description": "Opaque persisted purchase intent identity."
|
|
106
|
+
},
|
|
107
|
+
"operation_key": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"format": "uuid",
|
|
110
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
111
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
112
|
+
},
|
|
113
|
+
"operation": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": [
|
|
116
|
+
"checkout",
|
|
117
|
+
"paid_change",
|
|
118
|
+
"invoice_payment",
|
|
119
|
+
"payment_method_invoice"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"invoice_id": {
|
|
123
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"format": "uuid",
|
|
126
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
127
|
+
},
|
|
128
|
+
"quote_revision": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"maxLength": 200,
|
|
132
|
+
"description": "Opaque revision of the displayed quote; echo it when confirming."
|
|
133
|
+
},
|
|
134
|
+
"buyer_fingerprint": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1,
|
|
137
|
+
"maxLength": 200,
|
|
138
|
+
"description": "Opaque revision of buyer details and email policy; never full VIES evidence."
|
|
139
|
+
},
|
|
140
|
+
"state": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"const": "eligible"
|
|
143
|
+
},
|
|
144
|
+
"quote": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"currency": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"const": "eur",
|
|
150
|
+
"description": "Every new quote is in EUR."
|
|
151
|
+
},
|
|
152
|
+
"net_cents": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 0,
|
|
155
|
+
"maximum": 9007199254740991,
|
|
156
|
+
"description": "Current charge excluding VAT, in cents."
|
|
157
|
+
},
|
|
158
|
+
"vat_cents": {
|
|
159
|
+
"type": "integer",
|
|
160
|
+
"minimum": 0,
|
|
161
|
+
"maximum": 9007199254740991,
|
|
162
|
+
"description": "VAT on the current charge, in cents."
|
|
163
|
+
},
|
|
164
|
+
"gross_cents": {
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"minimum": 0,
|
|
167
|
+
"maximum": 9007199254740991,
|
|
168
|
+
"description": "Total to confirm, including VAT, in cents."
|
|
169
|
+
},
|
|
170
|
+
"rate_percent": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 0,
|
|
173
|
+
"maximum": 100,
|
|
174
|
+
"description": "VAT rate in whole percent."
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"currency",
|
|
179
|
+
"net_cents",
|
|
180
|
+
"vat_cents",
|
|
181
|
+
"gross_cents",
|
|
182
|
+
"rate_percent"
|
|
183
|
+
],
|
|
184
|
+
"additionalProperties": false
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"required": [
|
|
188
|
+
"intent_id",
|
|
189
|
+
"operation_key",
|
|
190
|
+
"operation",
|
|
191
|
+
"quote_revision",
|
|
192
|
+
"buyer_fingerprint",
|
|
193
|
+
"state",
|
|
194
|
+
"quote"
|
|
195
|
+
],
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"intent_id": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"format": "uuid",
|
|
204
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
205
|
+
"description": "Opaque persisted purchase intent identity."
|
|
206
|
+
},
|
|
207
|
+
"operation_key": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"format": "uuid",
|
|
210
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
211
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
212
|
+
},
|
|
213
|
+
"operation": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"enum": [
|
|
216
|
+
"checkout",
|
|
217
|
+
"paid_change",
|
|
218
|
+
"invoice_payment",
|
|
219
|
+
"payment_method_invoice",
|
|
220
|
+
"mandate_setup"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"invoice_id": {
|
|
224
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
225
|
+
"type": "string",
|
|
226
|
+
"format": "uuid",
|
|
227
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
228
|
+
},
|
|
229
|
+
"state": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"const": "held"
|
|
232
|
+
},
|
|
233
|
+
"reason": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"enum": [
|
|
236
|
+
"legacy_usd_invoice",
|
|
237
|
+
"legacy_payer_unresolved",
|
|
238
|
+
"mandate_policy_unresolved"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"original_amount": {
|
|
242
|
+
"description": "Recorded balance of a held invoice; not a new quote or authorization.",
|
|
243
|
+
"type": "object",
|
|
244
|
+
"properties": {
|
|
245
|
+
"currency": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"enum": [
|
|
248
|
+
"eur",
|
|
249
|
+
"usd"
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"gross_cents": {
|
|
253
|
+
"type": "integer",
|
|
254
|
+
"minimum": 0,
|
|
255
|
+
"maximum": 9007199254740991
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"currency",
|
|
260
|
+
"gross_cents"
|
|
261
|
+
],
|
|
262
|
+
"additionalProperties": false
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": [
|
|
266
|
+
"intent_id",
|
|
267
|
+
"operation_key",
|
|
268
|
+
"operation",
|
|
269
|
+
"state",
|
|
270
|
+
"reason"
|
|
271
|
+
],
|
|
272
|
+
"additionalProperties": false
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"intent_id": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"format": "uuid",
|
|
280
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
281
|
+
"description": "Opaque persisted purchase intent identity."
|
|
282
|
+
},
|
|
283
|
+
"operation_key": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"format": "uuid",
|
|
286
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
287
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
288
|
+
},
|
|
289
|
+
"operation": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"enum": [
|
|
292
|
+
"checkout",
|
|
293
|
+
"paid_change",
|
|
294
|
+
"invoice_payment",
|
|
295
|
+
"payment_method_invoice"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"invoice_id": {
|
|
299
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
300
|
+
"type": "string",
|
|
301
|
+
"format": "uuid",
|
|
302
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
303
|
+
},
|
|
304
|
+
"state": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"const": "invalid_vat_id"
|
|
307
|
+
},
|
|
308
|
+
"field": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"const": "billing.vat_id"
|
|
311
|
+
},
|
|
312
|
+
"rule": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"const": "vat_id_invalid"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": [
|
|
318
|
+
"intent_id",
|
|
319
|
+
"operation_key",
|
|
320
|
+
"operation",
|
|
321
|
+
"state",
|
|
322
|
+
"field",
|
|
323
|
+
"rule"
|
|
324
|
+
],
|
|
325
|
+
"additionalProperties": false
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"intent_id": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"format": "uuid",
|
|
333
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
334
|
+
"description": "Opaque persisted purchase intent identity."
|
|
335
|
+
},
|
|
336
|
+
"operation_key": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"format": "uuid",
|
|
339
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
340
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
341
|
+
},
|
|
342
|
+
"operation": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"enum": [
|
|
345
|
+
"checkout",
|
|
346
|
+
"paid_change",
|
|
347
|
+
"invoice_payment",
|
|
348
|
+
"payment_method_invoice"
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"invoice_id": {
|
|
352
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
353
|
+
"type": "string",
|
|
354
|
+
"format": "uuid",
|
|
355
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
356
|
+
},
|
|
357
|
+
"state": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"const": "refused"
|
|
360
|
+
},
|
|
361
|
+
"field": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"minLength": 1
|
|
364
|
+
},
|
|
365
|
+
"rule": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"enum": [
|
|
368
|
+
"company_required",
|
|
369
|
+
"vat_id_required",
|
|
370
|
+
"vat_id_invalid",
|
|
371
|
+
"tax_id_required",
|
|
372
|
+
"us_state_required",
|
|
373
|
+
"public_email_domain",
|
|
374
|
+
"invoice_not_open"
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"required": [
|
|
379
|
+
"intent_id",
|
|
380
|
+
"operation_key",
|
|
381
|
+
"operation",
|
|
382
|
+
"state",
|
|
383
|
+
"field",
|
|
384
|
+
"rule"
|
|
385
|
+
],
|
|
386
|
+
"additionalProperties": false
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"intent_id": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"format": "uuid",
|
|
394
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
395
|
+
"description": "Opaque persisted purchase intent identity."
|
|
396
|
+
},
|
|
397
|
+
"operation_key": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"format": "uuid",
|
|
400
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
401
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
402
|
+
},
|
|
403
|
+
"operation": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"enum": [
|
|
406
|
+
"checkout",
|
|
407
|
+
"paid_change",
|
|
408
|
+
"invoice_payment",
|
|
409
|
+
"payment_method_invoice"
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
"invoice_id": {
|
|
413
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
414
|
+
"type": "string",
|
|
415
|
+
"format": "uuid",
|
|
416
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
417
|
+
},
|
|
418
|
+
"state": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"const": "payment_started"
|
|
421
|
+
},
|
|
422
|
+
"payment_id": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"format": "uuid",
|
|
425
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
426
|
+
},
|
|
427
|
+
"payment": {
|
|
428
|
+
"oneOf": [
|
|
429
|
+
{
|
|
430
|
+
"type": "object",
|
|
431
|
+
"properties": {
|
|
432
|
+
"kind": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"const": "hosted"
|
|
435
|
+
},
|
|
436
|
+
"checkout_id": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"format": "uuid",
|
|
439
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
440
|
+
},
|
|
441
|
+
"checkout_url": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"format": "uri"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"required": [
|
|
447
|
+
"kind",
|
|
448
|
+
"checkout_id",
|
|
449
|
+
"checkout_url"
|
|
450
|
+
],
|
|
451
|
+
"additionalProperties": false
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"type": "object",
|
|
455
|
+
"properties": {
|
|
456
|
+
"kind": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"const": "mandate"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"required": [
|
|
462
|
+
"kind"
|
|
463
|
+
],
|
|
464
|
+
"additionalProperties": false
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"required": [
|
|
470
|
+
"intent_id",
|
|
471
|
+
"operation_key",
|
|
472
|
+
"operation",
|
|
473
|
+
"state",
|
|
474
|
+
"payment_id",
|
|
475
|
+
"payment"
|
|
476
|
+
],
|
|
477
|
+
"additionalProperties": false
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"allOf": [
|
|
481
|
+
{
|
|
482
|
+
"if": {
|
|
483
|
+
"properties": {
|
|
484
|
+
"operation": {
|
|
485
|
+
"enum": [
|
|
486
|
+
"invoice_payment",
|
|
487
|
+
"payment_method_invoice"
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"required": [
|
|
492
|
+
"operation"
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
"then": {
|
|
496
|
+
"required": [
|
|
497
|
+
"invoice_id"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"if": {
|
|
503
|
+
"properties": {
|
|
504
|
+
"operation": {
|
|
505
|
+
"const": "mandate_setup"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"required": [
|
|
509
|
+
"operation"
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"then": {
|
|
513
|
+
"properties": {
|
|
514
|
+
"state": {
|
|
515
|
+
"const": "held"
|
|
516
|
+
},
|
|
517
|
+
"reason": {
|
|
518
|
+
"const": "mandate_policy_unresolved"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": [
|
|
522
|
+
"reason"
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"if": {
|
|
528
|
+
"properties": {
|
|
529
|
+
"reason": {
|
|
530
|
+
"const": "mandate_policy_unresolved"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"required": [
|
|
534
|
+
"reason"
|
|
535
|
+
]
|
|
536
|
+
},
|
|
537
|
+
"then": {
|
|
538
|
+
"properties": {
|
|
539
|
+
"operation": {
|
|
540
|
+
"const": "mandate_setup"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"if": {
|
|
547
|
+
"properties": {
|
|
548
|
+
"payment": {
|
|
549
|
+
"properties": {
|
|
550
|
+
"kind": {
|
|
551
|
+
"const": "mandate"
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
"required": [
|
|
555
|
+
"kind"
|
|
556
|
+
]
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"required": [
|
|
560
|
+
"payment"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"then": {
|
|
564
|
+
"properties": {
|
|
565
|
+
"operation": {
|
|
566
|
+
"const": "paid_change"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
"required": [
|
|
575
|
+
"field",
|
|
576
|
+
"rule",
|
|
577
|
+
"current_intent"
|
|
578
|
+
],
|
|
579
|
+
"additionalProperties": false
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|