@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.
@@ -10179,7 +10179,7 @@
10179
10179
  }
10180
10180
  }
10181
10181
  },
10182
- "description": "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.",
10182
+ "description": "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.",
10183
10183
  "requestBody": {
10184
10184
  "required": true,
10185
10185
  "content": {
@@ -10294,7 +10294,7 @@
10294
10294
  }
10295
10295
  },
10296
10296
  "default": {
10297
- "description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `tier_required`, `validation_error`, `not_found`, `target_state_conflict`, `payment_provider_unavailable`.",
10297
+ "description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `tier_required`, `validation_error`, `not_found`.",
10298
10298
  "content": {
10299
10299
  "application/json": {
10300
10300
  "schema": {
@@ -10304,7 +10304,7 @@
10304
10304
  }
10305
10305
  }
10306
10306
  },
10307
- "description": "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. A started hosted payment is read at the provider first: 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when it is no longer open there (paid, canceled, expired or failed), and 502 payment_provider_unavailable when the provider does not answer. A `mandate_setup` whose payment the provider never answered also answers that 502: send its `POST /api/billing/payment-method` again with the same key."
10307
+ "description": "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."
10308
10308
  }
10309
10309
  },
10310
10310
  "/api/billing/intents/{id}/display": {
@@ -10506,7 +10506,7 @@
10506
10506
  }
10507
10507
  }
10508
10508
  },
10509
- "description": "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.",
10509
+ "description": "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.",
10510
10510
  "requestBody": {
10511
10511
  "required": true,
10512
10512
  "content": {
@@ -10522,7 +10522,7 @@
10522
10522
  "/api/billing/details": {
10523
10523
  "patch": {
10524
10524
  "operationId": "patch_api_billing_details",
10525
- "summary": "Edits the company's billing details; details a purchase would refuse are not saved.",
10525
+ "summary": "Edits company billing details for revalidation before the next charge.",
10526
10526
  "tags": [
10527
10527
  "billing"
10528
10528
  ],
@@ -10544,7 +10544,7 @@
10544
10544
  }
10545
10545
  },
10546
10546
  "default": {
10547
- "description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `tier_required`, `validation_error`, `not_found`, `target_state_conflict`.",
10547
+ "description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `tier_required`, `validation_error`, `not_found`.",
10548
10548
  "content": {
10549
10549
  "application/json": {
10550
10550
  "schema": {
@@ -10554,7 +10554,7 @@
10554
10554
  }
10555
10555
  }
10556
10556
  },
10557
- "description": "404 not_found when no billing account exists. Send only the fields that change: company name, full address with state, Tax ID, VAT ID, invoice email. The merged company is decided as a checkout decides its buyer, and saved only when a purchase would accept it. Every refusal is 409 target_state_conflict with `billingDetailsConflictDetails` and saves nothing: `{ field, rule }` for a field a purchase refuses (`rule` a `purchaseRefusalRule`; `field` one of `billing.kind`, `billing.vat_id`, `billing.tax_id`, `billing.address.state`, `billing.invoice_email`), `vat_id_invalid` at `billing.vat_id` when VIES does not know the VAT ID; `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`) when VIES did not answer within its 15 seconds: send the same edit again; `{ field: billing, rule: buyer_changed }` when the details changed while the edit was decided: read `GET /api/billing` and send it again. VIES is asked only when the country or the VAT ID changes, in another EU country; any other edit keeps the recorded VIES answer and needs none. A saved edit re-prices open due charges, updates the invoicing contact and invalidates quotes made for the old details. An issued invoice keeps the details it was issued with. An edit creates no payment, activates no plan, pays no invoice, clears no dunning and lifts no lock. A person account from before company-only purchases is saved without these checks; it cannot buy.",
10557
+ "description": "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.",
10558
10558
  "requestBody": {
10559
10559
  "required": true,
10560
10560
  "content": {
@@ -10602,7 +10602,7 @@
10602
10602
  }
10603
10603
  }
10604
10604
  },
10605
- "description": "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.",
10605
+ "description": "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.",
10606
10606
  "requestBody": {
10607
10607
  "required": true,
10608
10608
  "content": {
@@ -10618,7 +10618,7 @@
10618
10618
  "/api/billing/payment-method": {
10619
10619
  "post": {
10620
10620
  "operationId": "post_api_billing_payment_method",
10621
- "summary": "Starts a payment-method change: a hosted payment of 0.00 for a new mandate.",
10621
+ "summary": "Records an invoice-paying method intent or a held mandate setup.",
10622
10622
  "tags": [
10623
10623
  "billing"
10624
10624
  ],
@@ -10650,7 +10650,7 @@
10650
10650
  }
10651
10651
  }
10652
10652
  },
10653
- "description": "Offer `payment_method_options`. A change is a 0.00 `first` payment on the provider's hosted page, restricted to the chosen method: the answer is operation `mandate_setup` in `payment_started` with `payment.kind` hosted at once; redirect to its `checkout_url`. Nothing is quoted, so there is no `eligible` step, no confirmation and no VIES. It pays no invoice and clears no dunning or lock: open invoices stay open. When the provider reports it paid, the new mandate is the account's and every other valid mandate of the customer is revoked; canceled, expired or failed, nothing changes. `GET /api/billing/checkout/:id` with the `checkout_id` reads the outcome (`purpose: payment_method`). Use one operation_key per method until its payment is finished. The same key again answers 200 with the same `payment_started` while the payment is open. 502 payment_provider_unavailable when the provider did not answer: the same key again resumes, and sends the same payment again under the same idempotency key. 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when the key's payment is finished or can no longer be sent: start again with a new key. Same key with another method is a typed operation_key_reused conflict. A change stored while changes were on hold reads `held` with `mandate_policy_unresolved`; start again with a new key. Apple Pay with zero-amount changes disabled pays an open invoice through operation payment_method_invoice, with the buyer/VIES gate, current-amount reconfirmation and USD legacy hold of invoices/:id/pay; without an open invoice, 400 validation_error has field method and rule applepay_needs_open_invoice. An invoice charged back is never retried automatically. 404 not_found when no billing account is active or past due.",
10653
+ "description": "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.",
10654
10654
  "requestBody": {
10655
10655
  "required": true,
10656
10656
  "content": {
@@ -16609,32 +16609,9 @@
16609
16609
  },
16610
16610
  "then": {
16611
16611
  "properties": {
16612
- "state": {
16613
- "enum": [
16614
- "held",
16615
- "payment_started"
16616
- ]
16617
- }
16618
- }
16619
- }
16620
- },
16621
- {
16622
- "if": {
16623
- "properties": {
16624
- "operation": {
16625
- "const": "mandate_setup"
16626
- },
16627
16612
  "state": {
16628
16613
  "const": "held"
16629
- }
16630
- },
16631
- "required": [
16632
- "operation",
16633
- "state"
16634
- ]
16635
- },
16636
- "then": {
16637
- "properties": {
16614
+ },
16638
16615
  "reason": {
16639
16616
  "const": "mandate_policy_unresolved"
16640
16617
  }
@@ -24774,160 +24751,240 @@
24774
24751
  {
24775
24752
  "oneOf": [
24776
24753
  {
24777
- "type": "object",
24778
- "properties": {
24779
- "intent_id": {
24780
- "type": "string",
24781
- "format": "uuid",
24782
- "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)$",
24783
- "description": "Opaque persisted purchase intent identity."
24784
- },
24785
- "operation_key": {
24786
- "type": "string",
24787
- "format": "uuid",
24788
- "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)$",
24789
- "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
24790
- },
24791
- "operation": {
24792
- "type": "string",
24793
- "enum": [
24794
- "checkout",
24795
- "invoice_payment",
24796
- "payment_method_invoice"
24797
- ]
24798
- },
24799
- "invoice_id": {
24800
- "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.",
24801
- "type": "string",
24802
- "format": "uuid",
24803
- "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)$"
24804
- },
24805
- "state": {
24806
- "type": "string",
24807
- "const": "awaiting_vies"
24808
- },
24809
- "reason": {
24810
- "type": "string",
24811
- "enum": [
24812
- "vies_unavailable",
24813
- "vies_unverified",
24814
- "vies_identifier_missing"
24815
- ]
24816
- },
24817
- "next_attempt_at": {
24818
- "type": "string",
24819
- "format": "date-time",
24820
- "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))$"
24821
- }
24822
- },
24823
- "required": [
24824
- "intent_id",
24825
- "operation_key",
24826
- "operation",
24827
- "state",
24828
- "reason",
24829
- "next_attempt_at"
24830
- ],
24831
- "additionalProperties": false
24832
- },
24833
- {
24834
- "type": "object",
24835
- "properties": {
24836
- "intent_id": {
24837
- "type": "string",
24838
- "format": "uuid",
24839
- "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)$",
24840
- "description": "Opaque persisted purchase intent identity."
24841
- },
24842
- "operation_key": {
24843
- "type": "string",
24844
- "format": "uuid",
24845
- "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)$",
24846
- "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
24847
- },
24848
- "operation": {
24849
- "type": "string",
24850
- "enum": [
24851
- "checkout",
24852
- "invoice_payment",
24853
- "payment_method_invoice"
24854
- ]
24855
- },
24856
- "invoice_id": {
24857
- "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.",
24858
- "type": "string",
24859
- "format": "uuid",
24860
- "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)$"
24861
- },
24862
- "quote_revision": {
24863
- "type": "string",
24864
- "minLength": 1,
24865
- "maxLength": 200,
24866
- "description": "Opaque revision of the displayed quote; echo it when confirming."
24867
- },
24868
- "buyer_fingerprint": {
24869
- "type": "string",
24870
- "minLength": 1,
24871
- "maxLength": 200,
24872
- "description": "Opaque revision of buyer details and email policy; never full VIES evidence."
24873
- },
24874
- "state": {
24875
- "type": "string",
24876
- "const": "eligible"
24754
+ "oneOf": [
24755
+ {
24756
+ "type": "object",
24757
+ "properties": {
24758
+ "intent_id": {
24759
+ "type": "string",
24760
+ "format": "uuid",
24761
+ "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)$",
24762
+ "description": "Opaque persisted purchase intent identity."
24763
+ },
24764
+ "operation_key": {
24765
+ "type": "string",
24766
+ "format": "uuid",
24767
+ "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)$",
24768
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
24769
+ },
24770
+ "operation": {
24771
+ "type": "string",
24772
+ "enum": [
24773
+ "checkout",
24774
+ "invoice_payment",
24775
+ "payment_method_invoice"
24776
+ ]
24777
+ },
24778
+ "invoice_id": {
24779
+ "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.",
24780
+ "type": "string",
24781
+ "format": "uuid",
24782
+ "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)$"
24783
+ },
24784
+ "state": {
24785
+ "type": "string",
24786
+ "const": "awaiting_vies"
24787
+ },
24788
+ "next_attempt_at": {
24789
+ "type": "string",
24790
+ "format": "date-time",
24791
+ "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))$"
24792
+ },
24793
+ "reason": {
24794
+ "type": "string",
24795
+ "const": "vies_unavailable"
24796
+ },
24797
+ "vies_outage": {
24798
+ "type": "object",
24799
+ "properties": {
24800
+ "scope": {
24801
+ "type": "string",
24802
+ "enum": [
24803
+ "member_state",
24804
+ "vies"
24805
+ ],
24806
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
24807
+ },
24808
+ "country": {
24809
+ "type": "string",
24810
+ "pattern": "^[A-Z]{2}$",
24811
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
24812
+ }
24813
+ },
24814
+ "required": [
24815
+ "scope",
24816
+ "country"
24817
+ ],
24818
+ "additionalProperties": false
24819
+ }
24820
+ },
24821
+ "required": [
24822
+ "intent_id",
24823
+ "operation_key",
24824
+ "operation",
24825
+ "state",
24826
+ "next_attempt_at",
24827
+ "reason",
24828
+ "vies_outage"
24829
+ ],
24830
+ "additionalProperties": false
24877
24831
  },
24878
- "quote": {
24832
+ {
24879
24833
  "type": "object",
24880
24834
  "properties": {
24881
- "currency": {
24835
+ "intent_id": {
24882
24836
  "type": "string",
24883
- "const": "eur",
24884
- "description": "Every new quote is in EUR."
24837
+ "format": "uuid",
24838
+ "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)$",
24839
+ "description": "Opaque persisted purchase intent identity."
24885
24840
  },
24886
- "net_cents": {
24887
- "type": "integer",
24888
- "minimum": 0,
24889
- "maximum": 9007199254740991,
24890
- "description": "Current charge excluding VAT, in cents."
24841
+ "operation_key": {
24842
+ "type": "string",
24843
+ "format": "uuid",
24844
+ "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)$",
24845
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
24891
24846
  },
24892
- "vat_cents": {
24893
- "type": "integer",
24894
- "minimum": 0,
24895
- "maximum": 9007199254740991,
24896
- "description": "VAT on the current charge, in cents."
24847
+ "operation": {
24848
+ "type": "string",
24849
+ "enum": [
24850
+ "checkout",
24851
+ "invoice_payment",
24852
+ "payment_method_invoice"
24853
+ ]
24897
24854
  },
24898
- "gross_cents": {
24899
- "type": "integer",
24900
- "minimum": 0,
24901
- "maximum": 9007199254740991,
24902
- "description": "Total to confirm, including VAT, in cents."
24855
+ "invoice_id": {
24856
+ "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.",
24857
+ "type": "string",
24858
+ "format": "uuid",
24859
+ "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)$"
24903
24860
  },
24904
- "rate_percent": {
24905
- "type": "integer",
24906
- "minimum": 0,
24907
- "maximum": 100,
24908
- "description": "VAT rate in whole percent."
24861
+ "state": {
24862
+ "type": "string",
24863
+ "const": "awaiting_vies"
24864
+ },
24865
+ "next_attempt_at": {
24866
+ "type": "string",
24867
+ "format": "date-time",
24868
+ "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))$"
24869
+ },
24870
+ "reason": {
24871
+ "type": "string",
24872
+ "enum": [
24873
+ "vies_unverified",
24874
+ "vies_identifier_missing"
24875
+ ]
24909
24876
  }
24910
24877
  },
24911
24878
  "required": [
24912
- "currency",
24913
- "net_cents",
24914
- "vat_cents",
24915
- "gross_cents",
24916
- "rate_percent"
24879
+ "intent_id",
24880
+ "operation_key",
24881
+ "operation",
24882
+ "state",
24883
+ "next_attempt_at",
24884
+ "reason"
24917
24885
  ],
24918
24886
  "additionalProperties": false
24919
24887
  }
24920
- },
24921
- "required": [
24922
- "intent_id",
24923
- "operation_key",
24924
- "operation",
24925
- "quote_revision",
24926
- "buyer_fingerprint",
24927
- "state",
24928
- "quote"
24929
- ],
24930
- "additionalProperties": false
24888
+ ]
24889
+ },
24890
+ {
24891
+ "type": "object",
24892
+ "properties": {
24893
+ "intent_id": {
24894
+ "type": "string",
24895
+ "format": "uuid",
24896
+ "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)$",
24897
+ "description": "Opaque persisted purchase intent identity."
24898
+ },
24899
+ "operation_key": {
24900
+ "type": "string",
24901
+ "format": "uuid",
24902
+ "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)$",
24903
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
24904
+ },
24905
+ "operation": {
24906
+ "type": "string",
24907
+ "enum": [
24908
+ "checkout",
24909
+ "invoice_payment",
24910
+ "payment_method_invoice"
24911
+ ]
24912
+ },
24913
+ "invoice_id": {
24914
+ "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.",
24915
+ "type": "string",
24916
+ "format": "uuid",
24917
+ "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)$"
24918
+ },
24919
+ "quote_revision": {
24920
+ "type": "string",
24921
+ "minLength": 1,
24922
+ "maxLength": 200,
24923
+ "description": "Opaque revision of the displayed quote; echo it when confirming."
24924
+ },
24925
+ "buyer_fingerprint": {
24926
+ "type": "string",
24927
+ "minLength": 1,
24928
+ "maxLength": 200,
24929
+ "description": "Opaque revision of buyer details and email policy; never full VIES evidence."
24930
+ },
24931
+ "state": {
24932
+ "type": "string",
24933
+ "const": "eligible"
24934
+ },
24935
+ "quote": {
24936
+ "type": "object",
24937
+ "properties": {
24938
+ "currency": {
24939
+ "type": "string",
24940
+ "const": "eur",
24941
+ "description": "Every new quote is in EUR."
24942
+ },
24943
+ "net_cents": {
24944
+ "type": "integer",
24945
+ "minimum": 0,
24946
+ "maximum": 9007199254740991,
24947
+ "description": "Current charge excluding VAT, in cents."
24948
+ },
24949
+ "vat_cents": {
24950
+ "type": "integer",
24951
+ "minimum": 0,
24952
+ "maximum": 9007199254740991,
24953
+ "description": "VAT on the current charge, in cents."
24954
+ },
24955
+ "gross_cents": {
24956
+ "type": "integer",
24957
+ "minimum": 0,
24958
+ "maximum": 9007199254740991,
24959
+ "description": "Total to confirm, including VAT, in cents."
24960
+ },
24961
+ "rate_percent": {
24962
+ "type": "integer",
24963
+ "minimum": 0,
24964
+ "maximum": 100,
24965
+ "description": "VAT rate in whole percent."
24966
+ }
24967
+ },
24968
+ "required": [
24969
+ "currency",
24970
+ "net_cents",
24971
+ "vat_cents",
24972
+ "gross_cents",
24973
+ "rate_percent"
24974
+ ],
24975
+ "additionalProperties": false
24976
+ }
24977
+ },
24978
+ "required": [
24979
+ "intent_id",
24980
+ "operation_key",
24981
+ "operation",
24982
+ "quote_revision",
24983
+ "buyer_fingerprint",
24984
+ "state",
24985
+ "quote"
24986
+ ],
24987
+ "additionalProperties": false
24931
24988
  },
24932
24989
  {
24933
24990
  "type": "object",
@@ -25152,32 +25209,9 @@
25152
25209
  },
25153
25210
  "then": {
25154
25211
  "properties": {
25155
- "state": {
25156
- "enum": [
25157
- "held",
25158
- "payment_started"
25159
- ]
25160
- }
25161
- }
25162
- }
25163
- },
25164
- {
25165
- "if": {
25166
- "properties": {
25167
- "operation": {
25168
- "const": "mandate_setup"
25169
- },
25170
25212
  "state": {
25171
25213
  "const": "held"
25172
- }
25173
- },
25174
- "required": [
25175
- "operation",
25176
- "state"
25177
- ]
25178
- },
25179
- "then": {
25180
- "properties": {
25214
+ },
25181
25215
  "reason": {
25182
25216
  "const": "mandate_policy_unresolved"
25183
25217
  }
@@ -25254,8 +25288,7 @@
25254
25288
  "enum": [
25255
25289
  "checkout",
25256
25290
  "invoice_payment",
25257
- "payment_method_invoice",
25258
- "mandate_setup"
25291
+ "payment_method_invoice"
25259
25292
  ]
25260
25293
  },
25261
25294
  "invoice_id": {
@@ -25358,32 +25391,9 @@
25358
25391
  },
25359
25392
  "then": {
25360
25393
  "properties": {
25361
- "state": {
25362
- "enum": [
25363
- "held",
25364
- "payment_started"
25365
- ]
25366
- }
25367
- }
25368
- }
25369
- },
25370
- {
25371
- "if": {
25372
- "properties": {
25373
- "operation": {
25374
- "const": "mandate_setup"
25375
- },
25376
25394
  "state": {
25377
25395
  "const": "held"
25378
- }
25379
- },
25380
- "required": [
25381
- "operation",
25382
- "state"
25383
- ]
25384
- },
25385
- "then": {
25386
- "properties": {
25396
+ },
25387
25397
  "reason": {
25388
25398
  "const": "mandate_policy_unresolved"
25389
25399
  }
@@ -29366,32 +29376,82 @@
29366
29376
  "description": "Eligible: the price is frozen and the display shown; one click on its button confirms."
29367
29377
  },
29368
29378
  {
29369
- "type": "object",
29370
- "properties": {
29371
- "state": {
29372
- "type": "string",
29373
- "const": "vies_unavailable"
29374
- },
29375
- "field": {
29376
- "type": "string",
29377
- "const": "billing.vat_id"
29379
+ "oneOf": [
29380
+ {
29381
+ "type": "object",
29382
+ "properties": {
29383
+ "state": {
29384
+ "type": "string",
29385
+ "const": "vies_unavailable"
29386
+ },
29387
+ "field": {
29388
+ "type": "string",
29389
+ "const": "billing.vat_id"
29390
+ },
29391
+ "reason": {
29392
+ "type": "string",
29393
+ "const": "vies_unavailable"
29394
+ },
29395
+ "vies_outage": {
29396
+ "type": "object",
29397
+ "properties": {
29398
+ "scope": {
29399
+ "type": "string",
29400
+ "enum": [
29401
+ "member_state",
29402
+ "vies"
29403
+ ],
29404
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
29405
+ },
29406
+ "country": {
29407
+ "type": "string",
29408
+ "pattern": "^[A-Z]{2}$",
29409
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
29410
+ }
29411
+ },
29412
+ "required": [
29413
+ "scope",
29414
+ "country"
29415
+ ],
29416
+ "additionalProperties": false
29417
+ }
29418
+ },
29419
+ "required": [
29420
+ "state",
29421
+ "field",
29422
+ "reason",
29423
+ "vies_outage"
29424
+ ],
29425
+ "additionalProperties": false
29378
29426
  },
29379
- "reason": {
29380
- "type": "string",
29381
- "enum": [
29382
- "vies_unavailable",
29383
- "vies_unverified",
29384
- "vies_identifier_missing"
29385
- ]
29427
+ {
29428
+ "type": "object",
29429
+ "properties": {
29430
+ "state": {
29431
+ "type": "string",
29432
+ "const": "vies_unavailable"
29433
+ },
29434
+ "field": {
29435
+ "type": "string",
29436
+ "const": "billing.vat_id"
29437
+ },
29438
+ "reason": {
29439
+ "type": "string",
29440
+ "enum": [
29441
+ "vies_unverified",
29442
+ "vies_identifier_missing"
29443
+ ]
29444
+ }
29445
+ },
29446
+ "required": [
29447
+ "state",
29448
+ "field",
29449
+ "reason"
29450
+ ],
29451
+ "additionalProperties": false
29386
29452
  }
29387
- },
29388
- "required": [
29389
- "state",
29390
- "field",
29391
- "reason"
29392
29453
  ],
29393
- "additionalProperties": false,
29394
- "description": "VIES did not confirm the VAT ID within its retries. Nothing is stored; check again."
29454
+ "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."
29395
29455
  },
29396
29456
  {
29397
29457
  "type": "object",
@@ -50856,62 +50916,143 @@
50856
50916
  {
50857
50917
  "oneOf": [
50858
50918
  {
50859
- "type": "object",
50860
- "properties": {
50861
- "intent_id": {
50862
- "type": "string",
50863
- "format": "uuid",
50864
- "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)$",
50865
- "description": "Opaque persisted purchase intent identity."
50866
- },
50867
- "operation_key": {
50868
- "type": "string",
50869
- "format": "uuid",
50870
- "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)$",
50871
- "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
50872
- },
50873
- "operation": {
50874
- "type": "string",
50875
- "enum": [
50876
- "checkout",
50877
- "paid_change",
50878
- "invoice_payment",
50879
- "payment_method_invoice"
50880
- ]
50881
- },
50882
- "invoice_id": {
50883
- "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.",
50884
- "type": "string",
50885
- "format": "uuid",
50886
- "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)$"
50887
- },
50888
- "state": {
50889
- "type": "string",
50890
- "const": "awaiting_vies"
50891
- },
50892
- "reason": {
50893
- "type": "string",
50894
- "enum": [
50895
- "vies_unavailable",
50896
- "vies_unverified",
50897
- "vies_identifier_missing"
50898
- ]
50919
+ "oneOf": [
50920
+ {
50921
+ "type": "object",
50922
+ "properties": {
50923
+ "intent_id": {
50924
+ "type": "string",
50925
+ "format": "uuid",
50926
+ "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)$",
50927
+ "description": "Opaque persisted purchase intent identity."
50928
+ },
50929
+ "operation_key": {
50930
+ "type": "string",
50931
+ "format": "uuid",
50932
+ "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)$",
50933
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
50934
+ },
50935
+ "operation": {
50936
+ "type": "string",
50937
+ "enum": [
50938
+ "checkout",
50939
+ "paid_change",
50940
+ "invoice_payment",
50941
+ "payment_method_invoice"
50942
+ ]
50943
+ },
50944
+ "invoice_id": {
50945
+ "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.",
50946
+ "type": "string",
50947
+ "format": "uuid",
50948
+ "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)$"
50949
+ },
50950
+ "state": {
50951
+ "type": "string",
50952
+ "const": "awaiting_vies"
50953
+ },
50954
+ "next_attempt_at": {
50955
+ "type": "string",
50956
+ "format": "date-time",
50957
+ "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))$"
50958
+ },
50959
+ "reason": {
50960
+ "type": "string",
50961
+ "const": "vies_unavailable"
50962
+ },
50963
+ "vies_outage": {
50964
+ "type": "object",
50965
+ "properties": {
50966
+ "scope": {
50967
+ "type": "string",
50968
+ "enum": [
50969
+ "member_state",
50970
+ "vies"
50971
+ ],
50972
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
50973
+ },
50974
+ "country": {
50975
+ "type": "string",
50976
+ "pattern": "^[A-Z]{2}$",
50977
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
50978
+ }
50979
+ },
50980
+ "required": [
50981
+ "scope",
50982
+ "country"
50983
+ ],
50984
+ "additionalProperties": false
50985
+ }
50986
+ },
50987
+ "required": [
50988
+ "intent_id",
50989
+ "operation_key",
50990
+ "operation",
50991
+ "state",
50992
+ "next_attempt_at",
50993
+ "reason",
50994
+ "vies_outage"
50995
+ ],
50996
+ "additionalProperties": false
50899
50997
  },
50900
- "next_attempt_at": {
50901
- "type": "string",
50902
- "format": "date-time",
50903
- "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))$"
50998
+ {
50999
+ "type": "object",
51000
+ "properties": {
51001
+ "intent_id": {
51002
+ "type": "string",
51003
+ "format": "uuid",
51004
+ "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)$",
51005
+ "description": "Opaque persisted purchase intent identity."
51006
+ },
51007
+ "operation_key": {
51008
+ "type": "string",
51009
+ "format": "uuid",
51010
+ "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)$",
51011
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
51012
+ },
51013
+ "operation": {
51014
+ "type": "string",
51015
+ "enum": [
51016
+ "checkout",
51017
+ "paid_change",
51018
+ "invoice_payment",
51019
+ "payment_method_invoice"
51020
+ ]
51021
+ },
51022
+ "invoice_id": {
51023
+ "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.",
51024
+ "type": "string",
51025
+ "format": "uuid",
51026
+ "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)$"
51027
+ },
51028
+ "state": {
51029
+ "type": "string",
51030
+ "const": "awaiting_vies"
51031
+ },
51032
+ "next_attempt_at": {
51033
+ "type": "string",
51034
+ "format": "date-time",
51035
+ "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))$"
51036
+ },
51037
+ "reason": {
51038
+ "type": "string",
51039
+ "enum": [
51040
+ "vies_unverified",
51041
+ "vies_identifier_missing"
51042
+ ]
51043
+ }
51044
+ },
51045
+ "required": [
51046
+ "intent_id",
51047
+ "operation_key",
51048
+ "operation",
51049
+ "state",
51050
+ "next_attempt_at",
51051
+ "reason"
51052
+ ],
51053
+ "additionalProperties": false
50904
51054
  }
50905
- },
50906
- "required": [
50907
- "intent_id",
50908
- "operation_key",
50909
- "operation",
50910
- "state",
50911
- "reason",
50912
- "next_attempt_at"
50913
- ],
50914
- "additionalProperties": false
51055
+ ]
50915
51056
  },
50916
51057
  {
50917
51058
  "type": "object",
@@ -51239,32 +51380,9 @@
51239
51380
  },
51240
51381
  "then": {
51241
51382
  "properties": {
51242
- "state": {
51243
- "enum": [
51244
- "held",
51245
- "payment_started"
51246
- ]
51247
- }
51248
- }
51249
- }
51250
- },
51251
- {
51252
- "if": {
51253
- "properties": {
51254
- "operation": {
51255
- "const": "mandate_setup"
51256
- },
51257
51383
  "state": {
51258
51384
  "const": "held"
51259
- }
51260
- },
51261
- "required": [
51262
- "operation",
51263
- "state"
51264
- ]
51265
- },
51266
- "then": {
51267
- "properties": {
51385
+ },
51268
51386
  "reason": {
51269
51387
  "const": "mandate_policy_unresolved"
51270
51388
  }
@@ -51341,8 +51459,7 @@
51341
51459
  "enum": [
51342
51460
  "checkout",
51343
51461
  "invoice_payment",
51344
- "payment_method_invoice",
51345
- "mandate_setup"
51462
+ "payment_method_invoice"
51346
51463
  ]
51347
51464
  },
51348
51465
  "invoice_id": {
@@ -51445,32 +51562,9 @@
51445
51562
  },
51446
51563
  "then": {
51447
51564
  "properties": {
51448
- "state": {
51449
- "enum": [
51450
- "held",
51451
- "payment_started"
51452
- ]
51453
- }
51454
- }
51455
- }
51456
- },
51457
- {
51458
- "if": {
51459
- "properties": {
51460
- "operation": {
51461
- "const": "mandate_setup"
51462
- },
51463
51565
  "state": {
51464
51566
  "const": "held"
51465
- }
51466
- },
51467
- "required": [
51468
- "operation",
51469
- "state"
51470
- ]
51471
- },
51472
- "then": {
51473
- "properties": {
51567
+ },
51474
51568
  "reason": {
51475
51569
  "const": "mandate_policy_unresolved"
51476
51570
  }
@@ -55868,50 +55962,119 @@
55868
55962
  "additionalProperties": false
55869
55963
  },
55870
55964
  {
55871
- "type": "object",
55872
- "properties": {
55873
- "vat_id": {
55874
- "type": "string"
55875
- },
55876
- "name": {
55877
- "anyOf": [
55878
- {
55965
+ "oneOf": [
55966
+ {
55967
+ "type": "object",
55968
+ "properties": {
55969
+ "vat_id": {
55879
55970
  "type": "string"
55880
55971
  },
55881
- {
55882
- "type": "null"
55972
+ "name": {
55973
+ "anyOf": [
55974
+ {
55975
+ "type": "string"
55976
+ },
55977
+ {
55978
+ "type": "null"
55979
+ }
55980
+ ]
55981
+ },
55982
+ "state": {
55983
+ "type": "string",
55984
+ "const": "pending"
55985
+ },
55986
+ "status": {
55987
+ "type": "string",
55988
+ "enum": [
55989
+ "valid",
55990
+ "unverified",
55991
+ "unavailable"
55992
+ ]
55993
+ },
55994
+ "reason": {
55995
+ "type": "string",
55996
+ "const": "vies_unavailable"
55997
+ },
55998
+ "vies_outage": {
55999
+ "type": "object",
56000
+ "properties": {
56001
+ "scope": {
56002
+ "type": "string",
56003
+ "enum": [
56004
+ "member_state",
56005
+ "vies"
56006
+ ],
56007
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
56008
+ },
56009
+ "country": {
56010
+ "type": "string",
56011
+ "pattern": "^[A-Z]{2}$",
56012
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
56013
+ }
56014
+ },
56015
+ "required": [
56016
+ "scope",
56017
+ "country"
56018
+ ],
56019
+ "additionalProperties": false
55883
56020
  }
55884
- ]
55885
- },
55886
- "state": {
55887
- "type": "string",
55888
- "const": "pending"
55889
- },
55890
- "status": {
55891
- "type": "string",
55892
- "enum": [
55893
- "valid",
55894
- "unverified",
55895
- "unavailable"
55896
- ]
56021
+ },
56022
+ "required": [
56023
+ "vat_id",
56024
+ "name",
56025
+ "state",
56026
+ "status",
56027
+ "reason",
56028
+ "vies_outage"
56029
+ ],
56030
+ "additionalProperties": false
55897
56031
  },
55898
- "reason": {
55899
- "type": "string",
55900
- "enum": [
55901
- "vies_unavailable",
55902
- "vies_unverified",
55903
- "vies_identifier_missing"
55904
- ]
56032
+ {
56033
+ "type": "object",
56034
+ "properties": {
56035
+ "vat_id": {
56036
+ "type": "string"
56037
+ },
56038
+ "name": {
56039
+ "anyOf": [
56040
+ {
56041
+ "type": "string"
56042
+ },
56043
+ {
56044
+ "type": "null"
56045
+ }
56046
+ ]
56047
+ },
56048
+ "state": {
56049
+ "type": "string",
56050
+ "const": "pending"
56051
+ },
56052
+ "status": {
56053
+ "type": "string",
56054
+ "enum": [
56055
+ "valid",
56056
+ "unverified",
56057
+ "unavailable"
56058
+ ]
56059
+ },
56060
+ "reason": {
56061
+ "type": "string",
56062
+ "enum": [
56063
+ "vies_unverified",
56064
+ "vies_identifier_missing"
56065
+ ]
56066
+ }
56067
+ },
56068
+ "required": [
56069
+ "vat_id",
56070
+ "name",
56071
+ "state",
56072
+ "status",
56073
+ "reason"
56074
+ ],
56075
+ "additionalProperties": false
55905
56076
  }
55906
- },
55907
- "required": [
55908
- "vat_id",
55909
- "name",
55910
- "state",
55911
- "status",
55912
- "reason"
55913
- ],
55914
- "additionalProperties": false
56077
+ ]
55915
56078
  }
55916
56079
  ]
55917
56080
  },