@fleetless/contracts 17.0.0-next.1 → 17.0.0-next.2
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 +20 -31
- package/artifacts/openapi.json +553 -390
- package/artifacts/routes.json +10 -13
- package/artifacts/schema/billing-change-response.schema.json +1 -24
- package/artifacts/schema/checkout-response.schema.json +136 -103
- package/artifacts/schema/checkout-start-response.schema.json +73 -23
- package/artifacts/schema/purchase-conflict-details.schema.json +137 -80
- package/artifacts/schema/purchase-intent-draft.schema.json +136 -78
- package/artifacts/schema/purchase-intent-payment-started.schema.json +2 -26
- package/artifacts/schema/purchase-intent-response.schema.json +138 -104
- package/artifacts/schema/vat-decision.schema.json +63 -18
- package/artifacts/schema/vat-id-check-response.schema.json +108 -39
- package/artifacts/schema/vies-outage.schema.json +24 -0
- package/artifacts/schema/vies-unavailable-details.schema.json +73 -23
- package/dist/billing.d.ts +237 -115
- package/dist/billing.js +50 -56
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/routes.js +14 -40
- package/package.json +1 -1
- package/artifacts/schema/billing-details-conflict-details.schema.json +0 -78
package/artifacts/routes.json
CHANGED
|
@@ -6870,7 +6870,7 @@
|
|
|
6870
6870
|
"payment_provider_unavailable"
|
|
6871
6871
|
],
|
|
6872
6872
|
"transport": "http",
|
|
6873
|
-
"notes": "Basic stays free for every payer. The start decides in this request, VIES included: a busy VIES is retried for up to 15 seconds before the answer. The body is first saved as the org's checkout draft (`GET /api/billing/checkout-draft`), whatever the answer. `eligible` (201) records the pending billing account and a checkout intent, freezes the EUR quote and carries its C.4 display, Cache-Control: no-store: show `display.snapshot.declaration.text` directly above one button labelled `action_label`; that one click is `POST /api/billing/intents/:id/confirm` with the display's `confirmation_proof`. `vies_unavailable`, `invalid_vat_id` and `refused` answer 200 and nothing is stored but the draft: no intent, no account, no retry in the background; check again. `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs, for minutes; try again. Lexware never holds a checkout: its contact and invoice follow the payment. Use a fresh operation_key per press; the same key and input answer 200 with the same intent (`payment_started` with its hosted checkout once confirmed), without another Mollie payment; changed input conflicts. While another first payment of the org is open, 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. No payment or acceptance occurs at start, and the deprecated `accept_terms` confirms nothing. Hosted payment offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. Rate limited on billing.checkout_start. An active/past_due account uses billing/change."
|
|
6873
|
+
"notes": "Basic stays free for every payer. The start decides in this request, VIES included: a busy VIES is retried for up to 15 seconds before the answer. The body is first saved as the org's checkout draft (`GET /api/billing/checkout-draft`), whatever the answer. `eligible` (201) records the pending billing account and a checkout intent, freezes the EUR quote and carries its C.4 display, Cache-Control: no-store: show `display.snapshot.declaration.text` directly above one button labelled `action_label`; that one click is `POST /api/billing/intents/:id/confirm` with the display's `confirmation_proof`. `vies_unavailable`, `invalid_vat_id` and `refused` answer 200 and nothing is stored but the draft: no intent, no account, no retry in the background; check again. `vies_unavailable` with `reason: vies_unavailable` carries `vies_outage`: `scope: member_state` when the VAT register of `country` does not answer VIES (a register VIES reports as down answers at once, not after the 15 seconds), `scope: vies` when VIES itself does not. `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs, for minutes; try again. Lexware never holds a checkout: its contact and invoice follow the payment. Use a fresh operation_key per press; the same key and input answer 200 with the same intent (`payment_started` with its hosted checkout once confirmed), without another Mollie payment; changed input conflicts. While another first payment of the org is open, 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. No payment or acceptance occurs at start, and the deprecated `accept_terms` confirms nothing. Hosted payment offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. Rate limited on billing.checkout_start. An active/past_due account uses billing/change."
|
|
6874
6874
|
},
|
|
6875
6875
|
{
|
|
6876
6876
|
"method": "GET",
|
|
@@ -6915,12 +6915,10 @@
|
|
|
6915
6915
|
"token_revoked",
|
|
6916
6916
|
"tier_required",
|
|
6917
6917
|
"validation_error",
|
|
6918
|
-
"not_found"
|
|
6919
|
-
"target_state_conflict",
|
|
6920
|
-
"payment_provider_unavailable"
|
|
6918
|
+
"not_found"
|
|
6921
6919
|
],
|
|
6922
6920
|
"transport": "http",
|
|
6923
|
-
"notes": "Supply exactly one of operation_key or intent_id and the expected operation. Scope lookup to the authenticated owner and org; unknown, foreign-org or mismatched-operation intents return 404 without disclosure. Repeating a lookup after restart or lost response returns the same intent/payment identity and, for a paid change, its billing result. A proof is never returned here; a still-eligible decision needs a fresh C.4 display and explicit Owner click.
|
|
6921
|
+
"notes": "Supply exactly one of operation_key or intent_id and the expected operation. Scope lookup to the authenticated owner and org; unknown, foreign-org or mismatched-operation intents return 404 without disclosure. Repeating a lookup after restart or lost response returns the same intent/payment identity and, for a paid change, its billing result. A proof is never returned here; a still-eligible decision needs a fresh C.4 display and explicit Owner click. An `awaiting_vies` intent with `reason: vies_unavailable` carries `vies_outage` as the hourly retry last found it: `scope: member_state` for the VAT register of `country`, `scope: vies` for VIES itself."
|
|
6924
6922
|
},
|
|
6925
6923
|
{
|
|
6926
6924
|
"method": "POST",
|
|
@@ -7042,13 +7040,13 @@
|
|
|
7042
7040
|
"rate_limited"
|
|
7043
7041
|
],
|
|
7044
7042
|
"transport": "http",
|
|
7045
|
-
"notes": "Reports status and optional display name only; full evidence stays in protected Finance storage. valid with a missing identifier remains pending/vies_identifier_missing. unverified or unavailable remains pending without zero rating or payment. A form check never authorizes a later charge; Cloud binds current evidence to the buyer and quote at confirmation. Rate limited on billing.vat_check."
|
|
7043
|
+
"notes": "Reports status and optional display name only; full evidence stays in protected Finance storage. valid with a missing identifier remains pending/vies_identifier_missing. unverified or unavailable remains pending without zero rating or payment. pending/vies_unavailable carries `vies_outage`: `scope: member_state` when the VAT register of `country` does not answer VIES, which answers at once when VIES reports the register as down, and `scope: vies` when VIES itself does not answer within the 15 seconds. A form check never authorizes a later charge; Cloud binds current evidence to the buyer and quote at confirmation. Rate limited on billing.vat_check."
|
|
7046
7044
|
},
|
|
7047
7045
|
{
|
|
7048
7046
|
"method": "PATCH",
|
|
7049
7047
|
"path": "/api/billing/details",
|
|
7050
7048
|
"section": "billing",
|
|
7051
|
-
"summary": "Edits
|
|
7049
|
+
"summary": "Edits company billing details for revalidation before the next charge.",
|
|
7052
7050
|
"audience": "developer",
|
|
7053
7051
|
"auth": "developer",
|
|
7054
7052
|
"rateLimited": false,
|
|
@@ -7064,11 +7062,10 @@
|
|
|
7064
7062
|
"token_revoked",
|
|
7065
7063
|
"tier_required",
|
|
7066
7064
|
"validation_error",
|
|
7067
|
-
"not_found"
|
|
7068
|
-
"target_state_conflict"
|
|
7065
|
+
"not_found"
|
|
7069
7066
|
],
|
|
7070
7067
|
"transport": "http",
|
|
7071
|
-
"notes": "404 not_found when no billing account exists.
|
|
7068
|
+
"notes": "404 not_found when no billing account exists. Edits may change company name, full address/state, Tax ID, VAT ID and invoice email. Validate the merged buyer before a later charge; edits invalidate old evidence and quote revisions. Revalidate the email policy and country requirements. An edit does not create a payment, activate a plan, pay an invoice, clear dunning or lift a lock."
|
|
7072
7069
|
},
|
|
7073
7070
|
{
|
|
7074
7071
|
"method": "POST",
|
|
@@ -7097,13 +7094,13 @@
|
|
|
7097
7094
|
"payment_provider_unavailable"
|
|
7098
7095
|
],
|
|
7099
7096
|
"transport": "http",
|
|
7100
|
-
"notes": "The request names an absolute plan/cycle/add-on target and a fresh operation_key per selection. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. The change is decided in the request and never waits: no `awaiting_vies`, and Lexware never holds it; `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs. VIES runs only when the billing details changed since the last decision or the recorded VAT treatment is blocked, and a change that charges nothing never calls it. When VIES does not answer: 409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored. A change charging nothing while the recorded VAT treatment is unresolved: 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`. An eligible Owner obtains a C.4 display (`POST /api/billing/intents/:id/display`) and confirms with one click on its `action_label`. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts."
|
|
7097
|
+
"notes": "The request names an absolute plan/cycle/add-on target and a fresh operation_key per selection. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. The change is decided in the request and never waits: no `awaiting_vies`, and Lexware never holds it; `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs. VIES runs only when the billing details changed since the last decision or the recorded VAT treatment is blocked, and a change that charges nothing never calls it. When VIES does not answer: 409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored; with `reason: vies_unavailable` it carries `vies_outage` (`scope: member_state` for the VAT register of `country`, `scope: vies` for VIES itself). A change charging nothing while the recorded VAT treatment is unresolved: 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`. An eligible Owner obtains a C.4 display (`POST /api/billing/intents/:id/display`) and confirms with one click on its `action_label`. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts."
|
|
7101
7098
|
},
|
|
7102
7099
|
{
|
|
7103
7100
|
"method": "POST",
|
|
7104
7101
|
"path": "/api/billing/payment-method",
|
|
7105
7102
|
"section": "billing",
|
|
7106
|
-
"summary": "
|
|
7103
|
+
"summary": "Records an invoice-paying method intent or a held mandate setup.",
|
|
7107
7104
|
"audience": "developer",
|
|
7108
7105
|
"auth": "developer",
|
|
7109
7106
|
"rateLimited": true,
|
|
@@ -7126,7 +7123,7 @@
|
|
|
7126
7123
|
"payment_provider_unavailable"
|
|
7127
7124
|
],
|
|
7128
7125
|
"transport": "http",
|
|
7129
|
-
"notes": "
|
|
7126
|
+
"notes": "Use a stable operation_key and owner intent lookup after reload/timeout. Offer payment_method_options. Apple Pay with zero-amount changes disabled pays an open invoice through operation payment_method_invoice; without one, 400 validation_error has field method and rule applepay_needs_open_invoice. Apply the same buyer/VIES gate, current-amount reconfirmation and USD legacy hold as invoices/:id/pay. Pending, eligible and held contain no checkout URL; redirect only on payment_started.payment.kind hosted. A 0.00 mandate-only setup uses operation mandate_setup and held/mandate_policy_unresolved until the integration decision settles eligibility and currency. It pays no invoice and clears no dunning or lock. An invoice charged back is never retried automatically. 404 not_found when no account exists. Same key with changed input is a typed operation_key_reused conflict."
|
|
7130
7127
|
},
|
|
7131
7128
|
{
|
|
7132
7129
|
"method": "POST",
|
|
@@ -311,32 +311,9 @@
|
|
|
311
311
|
},
|
|
312
312
|
"then": {
|
|
313
313
|
"properties": {
|
|
314
|
-
"state": {
|
|
315
|
-
"enum": [
|
|
316
|
-
"held",
|
|
317
|
-
"payment_started"
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"if": {
|
|
325
|
-
"properties": {
|
|
326
|
-
"operation": {
|
|
327
|
-
"const": "mandate_setup"
|
|
328
|
-
},
|
|
329
314
|
"state": {
|
|
330
315
|
"const": "held"
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
"required": [
|
|
334
|
-
"operation",
|
|
335
|
-
"state"
|
|
336
|
-
]
|
|
337
|
-
},
|
|
338
|
-
"then": {
|
|
339
|
-
"properties": {
|
|
316
|
+
},
|
|
340
317
|
"reason": {
|
|
341
318
|
"const": "mandate_policy_unresolved"
|
|
342
319
|
}
|
|
@@ -4,61 +4,141 @@
|
|
|
4
4
|
{
|
|
5
5
|
"oneOf": [
|
|
6
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
|
-
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"intent_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uuid",
|
|
14
|
+
"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)$",
|
|
15
|
+
"description": "Opaque persisted purchase intent identity."
|
|
16
|
+
},
|
|
17
|
+
"operation_key": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "uuid",
|
|
20
|
+
"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)$",
|
|
21
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
22
|
+
},
|
|
23
|
+
"operation": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": [
|
|
26
|
+
"checkout",
|
|
27
|
+
"invoice_payment",
|
|
28
|
+
"payment_method_invoice"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"invoice_id": {
|
|
32
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "uuid",
|
|
35
|
+
"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)$"
|
|
36
|
+
},
|
|
37
|
+
"state": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"const": "awaiting_vies"
|
|
40
|
+
},
|
|
41
|
+
"next_attempt_at": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "date-time",
|
|
44
|
+
"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))$"
|
|
45
|
+
},
|
|
46
|
+
"reason": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"const": "vies_unavailable"
|
|
49
|
+
},
|
|
50
|
+
"vies_outage": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": {
|
|
53
|
+
"scope": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": [
|
|
56
|
+
"member_state",
|
|
57
|
+
"vies"
|
|
58
|
+
],
|
|
59
|
+
"description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
|
|
60
|
+
},
|
|
61
|
+
"country": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[A-Z]{2}$",
|
|
64
|
+
"description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": [
|
|
68
|
+
"scope",
|
|
69
|
+
"country"
|
|
70
|
+
],
|
|
71
|
+
"additionalProperties": false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": [
|
|
75
|
+
"intent_id",
|
|
76
|
+
"operation_key",
|
|
77
|
+
"operation",
|
|
78
|
+
"state",
|
|
79
|
+
"next_attempt_at",
|
|
80
|
+
"reason",
|
|
81
|
+
"vies_outage"
|
|
82
|
+
],
|
|
83
|
+
"additionalProperties": false
|
|
46
84
|
},
|
|
47
|
-
|
|
48
|
-
"type": "
|
|
49
|
-
"
|
|
50
|
-
|
|
85
|
+
{
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"intent_id": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"format": "uuid",
|
|
91
|
+
"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)$",
|
|
92
|
+
"description": "Opaque persisted purchase intent identity."
|
|
93
|
+
},
|
|
94
|
+
"operation_key": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"format": "uuid",
|
|
97
|
+
"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)$",
|
|
98
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
99
|
+
},
|
|
100
|
+
"operation": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": [
|
|
103
|
+
"checkout",
|
|
104
|
+
"invoice_payment",
|
|
105
|
+
"payment_method_invoice"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"invoice_id": {
|
|
109
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"format": "uuid",
|
|
112
|
+
"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)$"
|
|
113
|
+
},
|
|
114
|
+
"state": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "awaiting_vies"
|
|
117
|
+
},
|
|
118
|
+
"next_attempt_at": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"format": "date-time",
|
|
121
|
+
"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))$"
|
|
122
|
+
},
|
|
123
|
+
"reason": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"enum": [
|
|
126
|
+
"vies_unverified",
|
|
127
|
+
"vies_identifier_missing"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": [
|
|
132
|
+
"intent_id",
|
|
133
|
+
"operation_key",
|
|
134
|
+
"operation",
|
|
135
|
+
"state",
|
|
136
|
+
"next_attempt_at",
|
|
137
|
+
"reason"
|
|
138
|
+
],
|
|
139
|
+
"additionalProperties": false
|
|
51
140
|
}
|
|
52
|
-
|
|
53
|
-
"required": [
|
|
54
|
-
"intent_id",
|
|
55
|
-
"operation_key",
|
|
56
|
-
"operation",
|
|
57
|
-
"state",
|
|
58
|
-
"reason",
|
|
59
|
-
"next_attempt_at"
|
|
60
|
-
],
|
|
61
|
-
"additionalProperties": false
|
|
141
|
+
]
|
|
62
142
|
},
|
|
63
143
|
{
|
|
64
144
|
"type": "object",
|
|
@@ -382,32 +462,9 @@
|
|
|
382
462
|
},
|
|
383
463
|
"then": {
|
|
384
464
|
"properties": {
|
|
385
|
-
"state": {
|
|
386
|
-
"enum": [
|
|
387
|
-
"held",
|
|
388
|
-
"payment_started"
|
|
389
|
-
]
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"if": {
|
|
396
|
-
"properties": {
|
|
397
|
-
"operation": {
|
|
398
|
-
"const": "mandate_setup"
|
|
399
|
-
},
|
|
400
465
|
"state": {
|
|
401
466
|
"const": "held"
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
"required": [
|
|
405
|
-
"operation",
|
|
406
|
-
"state"
|
|
407
|
-
]
|
|
408
|
-
},
|
|
409
|
-
"then": {
|
|
410
|
-
"properties": {
|
|
467
|
+
},
|
|
411
468
|
"reason": {
|
|
412
469
|
"const": "mandate_policy_unresolved"
|
|
413
470
|
}
|
|
@@ -484,8 +541,7 @@
|
|
|
484
541
|
"enum": [
|
|
485
542
|
"checkout",
|
|
486
543
|
"invoice_payment",
|
|
487
|
-
"payment_method_invoice"
|
|
488
|
-
"mandate_setup"
|
|
544
|
+
"payment_method_invoice"
|
|
489
545
|
]
|
|
490
546
|
},
|
|
491
547
|
"invoice_id": {
|
|
@@ -588,32 +644,9 @@
|
|
|
588
644
|
},
|
|
589
645
|
"then": {
|
|
590
646
|
"properties": {
|
|
591
|
-
"state": {
|
|
592
|
-
"enum": [
|
|
593
|
-
"held",
|
|
594
|
-
"payment_started"
|
|
595
|
-
]
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
"if": {
|
|
602
|
-
"properties": {
|
|
603
|
-
"operation": {
|
|
604
|
-
"const": "mandate_setup"
|
|
605
|
-
},
|
|
606
647
|
"state": {
|
|
607
648
|
"const": "held"
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
"required": [
|
|
611
|
-
"operation",
|
|
612
|
-
"state"
|
|
613
|
-
]
|
|
614
|
-
},
|
|
615
|
-
"then": {
|
|
616
|
-
"properties": {
|
|
649
|
+
},
|
|
617
650
|
"reason": {
|
|
618
651
|
"const": "mandate_policy_unresolved"
|
|
619
652
|
}
|
|
@@ -3923,32 +3923,82 @@
|
|
|
3923
3923
|
"description": "Eligible: the price is frozen and the display shown; one click on its button confirms."
|
|
3924
3924
|
},
|
|
3925
3925
|
{
|
|
3926
|
-
"
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
"
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3926
|
+
"oneOf": [
|
|
3927
|
+
{
|
|
3928
|
+
"type": "object",
|
|
3929
|
+
"properties": {
|
|
3930
|
+
"state": {
|
|
3931
|
+
"type": "string",
|
|
3932
|
+
"const": "vies_unavailable"
|
|
3933
|
+
},
|
|
3934
|
+
"field": {
|
|
3935
|
+
"type": "string",
|
|
3936
|
+
"const": "billing.vat_id"
|
|
3937
|
+
},
|
|
3938
|
+
"reason": {
|
|
3939
|
+
"type": "string",
|
|
3940
|
+
"const": "vies_unavailable"
|
|
3941
|
+
},
|
|
3942
|
+
"vies_outage": {
|
|
3943
|
+
"type": "object",
|
|
3944
|
+
"properties": {
|
|
3945
|
+
"scope": {
|
|
3946
|
+
"type": "string",
|
|
3947
|
+
"enum": [
|
|
3948
|
+
"member_state",
|
|
3949
|
+
"vies"
|
|
3950
|
+
],
|
|
3951
|
+
"description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
|
|
3952
|
+
},
|
|
3953
|
+
"country": {
|
|
3954
|
+
"type": "string",
|
|
3955
|
+
"pattern": "^[A-Z]{2}$",
|
|
3956
|
+
"description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
|
|
3957
|
+
}
|
|
3958
|
+
},
|
|
3959
|
+
"required": [
|
|
3960
|
+
"scope",
|
|
3961
|
+
"country"
|
|
3962
|
+
],
|
|
3963
|
+
"additionalProperties": false
|
|
3964
|
+
}
|
|
3965
|
+
},
|
|
3966
|
+
"required": [
|
|
3967
|
+
"state",
|
|
3968
|
+
"field",
|
|
3969
|
+
"reason",
|
|
3970
|
+
"vies_outage"
|
|
3971
|
+
],
|
|
3972
|
+
"additionalProperties": false
|
|
3935
3973
|
},
|
|
3936
|
-
|
|
3937
|
-
"type": "
|
|
3938
|
-
"
|
|
3939
|
-
"
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3974
|
+
{
|
|
3975
|
+
"type": "object",
|
|
3976
|
+
"properties": {
|
|
3977
|
+
"state": {
|
|
3978
|
+
"type": "string",
|
|
3979
|
+
"const": "vies_unavailable"
|
|
3980
|
+
},
|
|
3981
|
+
"field": {
|
|
3982
|
+
"type": "string",
|
|
3983
|
+
"const": "billing.vat_id"
|
|
3984
|
+
},
|
|
3985
|
+
"reason": {
|
|
3986
|
+
"type": "string",
|
|
3987
|
+
"enum": [
|
|
3988
|
+
"vies_unverified",
|
|
3989
|
+
"vies_identifier_missing"
|
|
3990
|
+
]
|
|
3991
|
+
}
|
|
3992
|
+
},
|
|
3993
|
+
"required": [
|
|
3994
|
+
"state",
|
|
3995
|
+
"field",
|
|
3996
|
+
"reason"
|
|
3997
|
+
],
|
|
3998
|
+
"additionalProperties": false
|
|
3943
3999
|
}
|
|
3944
|
-
},
|
|
3945
|
-
"required": [
|
|
3946
|
-
"state",
|
|
3947
|
-
"field",
|
|
3948
|
-
"reason"
|
|
3949
4000
|
],
|
|
3950
|
-
"
|
|
3951
|
-
"description": "VIES did not confirm the VAT ID within its retries. Nothing is stored; check again."
|
|
4001
|
+
"description": "VIES did not confirm the VAT ID within its retries; with `vies_unavailable`, `vies_outage` says which side was down. Nothing is stored; check again."
|
|
3952
4002
|
},
|
|
3953
4003
|
{
|
|
3954
4004
|
"type": "object",
|