@fleetless/contracts 6.5.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 +27 -0
- package/artifacts/openapi.json +5805 -1805
- package/artifacts/routes.json +75 -13
- 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 +33 -60
- package/package.json +1 -1
|
@@ -1,22 +1,536 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"intent_id": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"format": "uuid",
|
|
10
|
+
"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)$",
|
|
11
|
+
"description": "Opaque persisted purchase intent identity."
|
|
12
|
+
},
|
|
13
|
+
"operation_key": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "uuid",
|
|
16
|
+
"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)$",
|
|
17
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
18
|
+
},
|
|
19
|
+
"operation": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": [
|
|
22
|
+
"checkout",
|
|
23
|
+
"paid_change",
|
|
24
|
+
"invoice_payment",
|
|
25
|
+
"payment_method_invoice"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"invoice_id": {
|
|
29
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "uuid",
|
|
32
|
+
"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)$"
|
|
33
|
+
},
|
|
34
|
+
"state": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"const": "awaiting_vies"
|
|
37
|
+
},
|
|
38
|
+
"reason": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"vies_unavailable",
|
|
42
|
+
"vies_unverified",
|
|
43
|
+
"vies_identifier_missing"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"next_attempt_at": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": "date-time",
|
|
49
|
+
"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))$"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"intent_id",
|
|
54
|
+
"operation_key",
|
|
55
|
+
"operation",
|
|
56
|
+
"state",
|
|
57
|
+
"reason",
|
|
58
|
+
"next_attempt_at"
|
|
59
|
+
],
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"intent_id": {
|
|
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
|
+
"description": "Opaque persisted purchase intent identity."
|
|
70
|
+
},
|
|
71
|
+
"operation_key": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"format": "uuid",
|
|
74
|
+
"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)$",
|
|
75
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
76
|
+
},
|
|
77
|
+
"operation": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"enum": [
|
|
80
|
+
"checkout",
|
|
81
|
+
"paid_change",
|
|
82
|
+
"invoice_payment",
|
|
83
|
+
"payment_method_invoice"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"invoice_id": {
|
|
87
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
88
|
+
"type": "string",
|
|
89
|
+
"format": "uuid",
|
|
90
|
+
"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)$"
|
|
91
|
+
},
|
|
92
|
+
"quote_revision": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"maxLength": 200,
|
|
96
|
+
"description": "Opaque revision of the displayed quote; echo it when confirming."
|
|
97
|
+
},
|
|
98
|
+
"buyer_fingerprint": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1,
|
|
101
|
+
"maxLength": 200,
|
|
102
|
+
"description": "Opaque revision of buyer details and email policy; never full VIES evidence."
|
|
103
|
+
},
|
|
104
|
+
"state": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"const": "eligible"
|
|
107
|
+
},
|
|
108
|
+
"quote": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"currency": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"const": "eur",
|
|
114
|
+
"description": "Every new quote is in EUR."
|
|
115
|
+
},
|
|
116
|
+
"net_cents": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"minimum": 0,
|
|
119
|
+
"maximum": 9007199254740991,
|
|
120
|
+
"description": "Current charge excluding VAT, in cents."
|
|
121
|
+
},
|
|
122
|
+
"vat_cents": {
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"minimum": 0,
|
|
125
|
+
"maximum": 9007199254740991,
|
|
126
|
+
"description": "VAT on the current charge, in cents."
|
|
127
|
+
},
|
|
128
|
+
"gross_cents": {
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 0,
|
|
131
|
+
"maximum": 9007199254740991,
|
|
132
|
+
"description": "Total to confirm, including VAT, in cents."
|
|
133
|
+
},
|
|
134
|
+
"rate_percent": {
|
|
135
|
+
"type": "integer",
|
|
136
|
+
"minimum": 0,
|
|
137
|
+
"maximum": 100,
|
|
138
|
+
"description": "VAT rate in whole percent."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": [
|
|
142
|
+
"currency",
|
|
143
|
+
"net_cents",
|
|
144
|
+
"vat_cents",
|
|
145
|
+
"gross_cents",
|
|
146
|
+
"rate_percent"
|
|
147
|
+
],
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"required": [
|
|
152
|
+
"intent_id",
|
|
153
|
+
"operation_key",
|
|
154
|
+
"operation",
|
|
155
|
+
"quote_revision",
|
|
156
|
+
"buyer_fingerprint",
|
|
157
|
+
"state",
|
|
158
|
+
"quote"
|
|
159
|
+
],
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"intent_id": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"format": "uuid",
|
|
168
|
+
"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)$",
|
|
169
|
+
"description": "Opaque persisted purchase intent identity."
|
|
170
|
+
},
|
|
171
|
+
"operation_key": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"format": "uuid",
|
|
174
|
+
"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)$",
|
|
175
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
176
|
+
},
|
|
177
|
+
"operation": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"checkout",
|
|
181
|
+
"paid_change",
|
|
182
|
+
"invoice_payment",
|
|
183
|
+
"payment_method_invoice",
|
|
184
|
+
"mandate_setup"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"invoice_id": {
|
|
188
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
189
|
+
"type": "string",
|
|
190
|
+
"format": "uuid",
|
|
191
|
+
"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)$"
|
|
192
|
+
},
|
|
193
|
+
"state": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"const": "held"
|
|
196
|
+
},
|
|
197
|
+
"reason": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"enum": [
|
|
200
|
+
"legacy_usd_invoice",
|
|
201
|
+
"legacy_payer_unresolved",
|
|
202
|
+
"mandate_policy_unresolved"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"original_amount": {
|
|
206
|
+
"description": "Recorded balance of a held invoice; not a new quote or authorization.",
|
|
207
|
+
"type": "object",
|
|
208
|
+
"properties": {
|
|
209
|
+
"currency": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"enum": [
|
|
212
|
+
"eur",
|
|
213
|
+
"usd"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"gross_cents": {
|
|
217
|
+
"type": "integer",
|
|
218
|
+
"minimum": 0,
|
|
219
|
+
"maximum": 9007199254740991
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [
|
|
223
|
+
"currency",
|
|
224
|
+
"gross_cents"
|
|
225
|
+
],
|
|
226
|
+
"additionalProperties": false
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"required": [
|
|
230
|
+
"intent_id",
|
|
231
|
+
"operation_key",
|
|
232
|
+
"operation",
|
|
233
|
+
"state",
|
|
234
|
+
"reason"
|
|
235
|
+
],
|
|
236
|
+
"additionalProperties": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"intent_id": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"format": "uuid",
|
|
244
|
+
"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)$",
|
|
245
|
+
"description": "Opaque persisted purchase intent identity."
|
|
246
|
+
},
|
|
247
|
+
"operation_key": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"format": "uuid",
|
|
250
|
+
"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)$",
|
|
251
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
252
|
+
},
|
|
253
|
+
"operation": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"enum": [
|
|
256
|
+
"checkout",
|
|
257
|
+
"paid_change",
|
|
258
|
+
"invoice_payment",
|
|
259
|
+
"payment_method_invoice"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"invoice_id": {
|
|
263
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
264
|
+
"type": "string",
|
|
265
|
+
"format": "uuid",
|
|
266
|
+
"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)$"
|
|
267
|
+
},
|
|
268
|
+
"state": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"const": "invalid_vat_id"
|
|
271
|
+
},
|
|
272
|
+
"field": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"const": "billing.vat_id"
|
|
275
|
+
},
|
|
276
|
+
"rule": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"const": "vat_id_invalid"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"required": [
|
|
282
|
+
"intent_id",
|
|
283
|
+
"operation_key",
|
|
284
|
+
"operation",
|
|
285
|
+
"state",
|
|
286
|
+
"field",
|
|
287
|
+
"rule"
|
|
288
|
+
],
|
|
289
|
+
"additionalProperties": false
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"intent_id": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"format": "uuid",
|
|
297
|
+
"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)$",
|
|
298
|
+
"description": "Opaque persisted purchase intent identity."
|
|
299
|
+
},
|
|
300
|
+
"operation_key": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"format": "uuid",
|
|
303
|
+
"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)$",
|
|
304
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
305
|
+
},
|
|
306
|
+
"operation": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"enum": [
|
|
309
|
+
"checkout",
|
|
310
|
+
"paid_change",
|
|
311
|
+
"invoice_payment",
|
|
312
|
+
"payment_method_invoice"
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
"invoice_id": {
|
|
316
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
317
|
+
"type": "string",
|
|
318
|
+
"format": "uuid",
|
|
319
|
+
"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)$"
|
|
320
|
+
},
|
|
321
|
+
"state": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"const": "refused"
|
|
324
|
+
},
|
|
325
|
+
"field": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"minLength": 1
|
|
328
|
+
},
|
|
329
|
+
"rule": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"enum": [
|
|
332
|
+
"company_required",
|
|
333
|
+
"vat_id_required",
|
|
334
|
+
"vat_id_invalid",
|
|
335
|
+
"tax_id_required",
|
|
336
|
+
"us_state_required",
|
|
337
|
+
"public_email_domain",
|
|
338
|
+
"invoice_not_open"
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"required": [
|
|
343
|
+
"intent_id",
|
|
344
|
+
"operation_key",
|
|
345
|
+
"operation",
|
|
346
|
+
"state",
|
|
347
|
+
"field",
|
|
348
|
+
"rule"
|
|
349
|
+
],
|
|
350
|
+
"additionalProperties": false
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"intent_id": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"format": "uuid",
|
|
358
|
+
"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)$",
|
|
359
|
+
"description": "Opaque persisted purchase intent identity."
|
|
360
|
+
},
|
|
361
|
+
"operation_key": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"format": "uuid",
|
|
364
|
+
"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)$",
|
|
365
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
366
|
+
},
|
|
367
|
+
"operation": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"enum": [
|
|
370
|
+
"checkout",
|
|
371
|
+
"paid_change",
|
|
372
|
+
"invoice_payment",
|
|
373
|
+
"payment_method_invoice"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"invoice_id": {
|
|
377
|
+
"description": "The due charge or issued invoice, for invoice-paying operations.",
|
|
378
|
+
"type": "string",
|
|
379
|
+
"format": "uuid",
|
|
380
|
+
"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)$"
|
|
381
|
+
},
|
|
382
|
+
"state": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"const": "payment_started"
|
|
385
|
+
},
|
|
386
|
+
"payment_id": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"format": "uuid",
|
|
389
|
+
"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)$"
|
|
390
|
+
},
|
|
391
|
+
"payment": {
|
|
392
|
+
"oneOf": [
|
|
393
|
+
{
|
|
394
|
+
"type": "object",
|
|
395
|
+
"properties": {
|
|
396
|
+
"kind": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"const": "hosted"
|
|
399
|
+
},
|
|
400
|
+
"checkout_id": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"format": "uuid",
|
|
403
|
+
"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)$"
|
|
404
|
+
},
|
|
405
|
+
"checkout_url": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"format": "uri"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"required": [
|
|
411
|
+
"kind",
|
|
412
|
+
"checkout_id",
|
|
413
|
+
"checkout_url"
|
|
414
|
+
],
|
|
415
|
+
"additionalProperties": false
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"type": "object",
|
|
419
|
+
"properties": {
|
|
420
|
+
"kind": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"const": "mandate"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"required": [
|
|
426
|
+
"kind"
|
|
427
|
+
],
|
|
428
|
+
"additionalProperties": false
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"required": [
|
|
434
|
+
"intent_id",
|
|
435
|
+
"operation_key",
|
|
436
|
+
"operation",
|
|
437
|
+
"state",
|
|
438
|
+
"payment_id",
|
|
439
|
+
"payment"
|
|
440
|
+
],
|
|
441
|
+
"additionalProperties": false
|
|
15
442
|
}
|
|
16
|
-
},
|
|
17
|
-
"required": [
|
|
18
|
-
"checkout_id",
|
|
19
|
-
"checkout_url"
|
|
20
443
|
],
|
|
21
|
-
"
|
|
444
|
+
"allOf": [
|
|
445
|
+
{
|
|
446
|
+
"if": {
|
|
447
|
+
"properties": {
|
|
448
|
+
"operation": {
|
|
449
|
+
"enum": [
|
|
450
|
+
"invoice_payment",
|
|
451
|
+
"payment_method_invoice"
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"required": [
|
|
456
|
+
"operation"
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
"then": {
|
|
460
|
+
"required": [
|
|
461
|
+
"invoice_id"
|
|
462
|
+
]
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"if": {
|
|
467
|
+
"properties": {
|
|
468
|
+
"operation": {
|
|
469
|
+
"const": "mandate_setup"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"required": [
|
|
473
|
+
"operation"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"then": {
|
|
477
|
+
"properties": {
|
|
478
|
+
"state": {
|
|
479
|
+
"const": "held"
|
|
480
|
+
},
|
|
481
|
+
"reason": {
|
|
482
|
+
"const": "mandate_policy_unresolved"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"required": [
|
|
486
|
+
"reason"
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"if": {
|
|
492
|
+
"properties": {
|
|
493
|
+
"reason": {
|
|
494
|
+
"const": "mandate_policy_unresolved"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"required": [
|
|
498
|
+
"reason"
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
"then": {
|
|
502
|
+
"properties": {
|
|
503
|
+
"operation": {
|
|
504
|
+
"const": "mandate_setup"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"if": {
|
|
511
|
+
"properties": {
|
|
512
|
+
"payment": {
|
|
513
|
+
"properties": {
|
|
514
|
+
"kind": {
|
|
515
|
+
"const": "mandate"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"required": [
|
|
519
|
+
"kind"
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"required": [
|
|
524
|
+
"payment"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
"then": {
|
|
528
|
+
"properties": {
|
|
529
|
+
"operation": {
|
|
530
|
+
"const": "paid_change"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
]
|
|
22
536
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"operation_key": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uuid",
|
|
8
|
+
"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)$",
|
|
9
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"operation_key"
|
|
14
|
+
],
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
|
+
"operation_key": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uuid",
|
|
8
|
+
"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)$",
|
|
9
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
10
|
+
},
|
|
5
11
|
"method": {
|
|
6
12
|
"type": "string",
|
|
7
13
|
"enum": [
|
|
@@ -13,6 +19,7 @@
|
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
21
|
"required": [
|
|
22
|
+
"operation_key",
|
|
16
23
|
"method"
|
|
17
24
|
],
|
|
18
25
|
"additionalProperties": false
|
|
@@ -193,30 +193,16 @@
|
|
|
193
193
|
"maximum": 9007199254740991,
|
|
194
194
|
"description": "Per month in euro cents, excluding VAT."
|
|
195
195
|
},
|
|
196
|
-
"usd_month": {
|
|
197
|
-
"type": "integer",
|
|
198
|
-
"minimum": 0,
|
|
199
|
-
"maximum": 9007199254740991,
|
|
200
|
-
"description": "Per month in US dollar cents, excluding VAT: the euro price × 1.15, rounded up to a whole dollar."
|
|
201
|
-
},
|
|
202
196
|
"eur_year": {
|
|
203
197
|
"type": "integer",
|
|
204
198
|
"minimum": 0,
|
|
205
199
|
"maximum": 9007199254740991,
|
|
206
200
|
"description": "Per year in euro cents, excluding VAT: twelve months less 15 %."
|
|
207
|
-
},
|
|
208
|
-
"usd_year": {
|
|
209
|
-
"type": "integer",
|
|
210
|
-
"minimum": 0,
|
|
211
|
-
"maximum": 9007199254740991,
|
|
212
|
-
"description": "Per year in US dollar cents, excluding VAT: the yearly euro price × 1.15, rounded up to a whole dollar."
|
|
213
201
|
}
|
|
214
202
|
},
|
|
215
203
|
"required": [
|
|
216
204
|
"eur_month",
|
|
217
|
-
"
|
|
218
|
-
"eur_year",
|
|
219
|
-
"usd_year"
|
|
205
|
+
"eur_year"
|
|
220
206
|
],
|
|
221
207
|
"additionalProperties": false
|
|
222
208
|
},
|
|
@@ -8,30 +8,16 @@
|
|
|
8
8
|
"maximum": 9007199254740991,
|
|
9
9
|
"description": "Per month in euro cents, excluding VAT."
|
|
10
10
|
},
|
|
11
|
-
"usd_month": {
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"minimum": 0,
|
|
14
|
-
"maximum": 9007199254740991,
|
|
15
|
-
"description": "Per month in US dollar cents, excluding VAT: the euro price × 1.15, rounded up to a whole dollar."
|
|
16
|
-
},
|
|
17
11
|
"eur_year": {
|
|
18
12
|
"type": "integer",
|
|
19
13
|
"minimum": 0,
|
|
20
14
|
"maximum": 9007199254740991,
|
|
21
15
|
"description": "Per year in euro cents, excluding VAT: twelve months less 15 %."
|
|
22
|
-
},
|
|
23
|
-
"usd_year": {
|
|
24
|
-
"type": "integer",
|
|
25
|
-
"minimum": 0,
|
|
26
|
-
"maximum": 9007199254740991,
|
|
27
|
-
"description": "Per year in US dollar cents, excluding VAT: the yearly euro price × 1.15, rounded up to a whole dollar."
|
|
28
16
|
}
|
|
29
17
|
},
|
|
30
18
|
"required": [
|
|
31
19
|
"eur_month",
|
|
32
|
-
"
|
|
33
|
-
"eur_year",
|
|
34
|
-
"usd_year"
|
|
20
|
+
"eur_year"
|
|
35
21
|
],
|
|
36
22
|
"additionalProperties": false
|
|
37
23
|
}
|