@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/dist/billing.js
CHANGED
|
@@ -50,9 +50,35 @@ export const vatTreatment = z.enum(['de_standard', 'reverse_charge', 'outside_eu
|
|
|
50
50
|
/** A refusal of a new paid purchase, never a restriction on free Basic. */
|
|
51
51
|
export const payerRefusalRule = z.enum(['company_required', 'vat_id_required', 'vat_id_invalid']);
|
|
52
52
|
export const viesPendingReason = z.enum(['vies_unavailable', 'vies_unverified', 'vies_identifier_missing']);
|
|
53
|
+
/**
|
|
54
|
+
* **Which side of a VIES check was down** (fleetless/fleetless#1181). VIES is
|
|
55
|
+
* a relay: it asks the VAT register of the member state the VAT ID belongs
|
|
56
|
+
* to. `member_state`: VIES answered, and said that this country's register is
|
|
57
|
+
* down or busy. `vies`: VIES itself did not answer, or answered nothing it
|
|
58
|
+
* can be held to. `country` is the country that was asked for, in both
|
|
59
|
+
* scopes: the billing address's, so Greece is `GR` and never VIES's `EL`.
|
|
60
|
+
*/
|
|
61
|
+
export const viesOutage = z.object({
|
|
62
|
+
scope: z.enum(['member_state', 'vies']).meta({
|
|
63
|
+
description: "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer.",
|
|
64
|
+
}),
|
|
65
|
+
country: countryCode.meta({ description: "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`." }),
|
|
66
|
+
}).strict();
|
|
67
|
+
/**
|
|
68
|
+
* A pending VIES answer in its two halves (fleetless/fleetless#1181):
|
|
69
|
+
* `vies_unavailable` always with `vies_outage`, the other two reasons never
|
|
70
|
+
* with one, since they are no outage. A split union, not a `.refine()`: the
|
|
71
|
+
* union renders to JSON Schema by itself, a refinement says nothing there.
|
|
72
|
+
*/
|
|
73
|
+
function viesPending(shape) {
|
|
74
|
+
return z.discriminatedUnion('reason', [
|
|
75
|
+
z.object({ ...shape, reason: z.literal('vies_unavailable'), vies_outage: viesOutage }).strict(),
|
|
76
|
+
z.object({ ...shape, reason: viesPendingReason.exclude(['vies_unavailable']) }).strict(),
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
53
79
|
export const vatDecision = z.discriminatedUnion('state', [
|
|
54
80
|
z.object({ state: z.literal('eligible'), treatment: vatTreatment, rate_percent: z.number().int().min(0).max(100) }).strict(),
|
|
55
|
-
|
|
81
|
+
viesPending({ state: z.literal('pending') }),
|
|
56
82
|
z.object({ state: z.literal('refused'), rule: payerRefusalRule }).strict(),
|
|
57
83
|
]);
|
|
58
84
|
/**
|
|
@@ -79,7 +105,9 @@ export function vatFor(input) {
|
|
|
79
105
|
? { state: 'eligible', treatment: 'reverse_charge', rate_percent: 0 }
|
|
80
106
|
: { state: 'pending', reason: 'vies_identifier_missing' };
|
|
81
107
|
}
|
|
82
|
-
|
|
108
|
+
if (vies.status === 'unavailable')
|
|
109
|
+
return { state: 'pending', reason: 'vies_unavailable', vies_outage: vies.outage };
|
|
110
|
+
return { state: 'pending', reason: 'vies_unverified' };
|
|
83
111
|
}
|
|
84
112
|
/** VIES's member-state code: `EL` for `GR`, the country otherwise. */
|
|
85
113
|
export function viesCountry(country) {
|
|
@@ -670,25 +698,16 @@ const intentIdentity = {
|
|
|
670
698
|
* Why an intent is held. Lexware never holds a purchase: its contact and
|
|
671
699
|
* invoice follow the payment. A checkout or paid change is held only while an
|
|
672
700
|
* issuer cutover runs (`issuer_cutover_in_progress`, minutes, then try again).
|
|
673
|
-
* `mandate_policy_unresolved` is written no more (fleetless/fleetless#1185): it
|
|
674
|
-
* stays for the method changes stored while they were on hold.
|
|
675
701
|
*/
|
|
676
702
|
export const purchaseHoldReason = z.enum([
|
|
677
703
|
'legacy_usd_invoice', 'legacy_payer_unresolved', 'mandate_policy_unresolved', 'issuer_cutover_in_progress',
|
|
678
704
|
]);
|
|
679
705
|
export const purchaseRefusalRule = z.enum(['company_required', 'vat_id_required', 'vat_id_invalid', 'tax_id_required', 'us_state_required', 'public_email_domain', 'invoice_not_open']);
|
|
680
706
|
// Cross-field invariants also travel in JSON Schema so non-TypeScript callers
|
|
681
|
-
// cannot treat an invoice payment as an unbound checkout or a
|
|
682
|
-
//
|
|
683
|
-
// A mandate setup (fleetless/fleetless#1185) is the 0.00 payment that changes the
|
|
684
|
-
// payment method: it is `payment_started` on the hosted page, never quoted, never
|
|
685
|
-
// waiting for VIES. `held` with `mandate_policy_unresolved` is only a row stored
|
|
686
|
-
// while the change was on hold (2026-10-16 to 17.0.0); the reason still names no
|
|
687
|
-
// other operation.
|
|
707
|
+
// cannot treat an invoice payment as an unbound checkout or a held setup as a charge.
|
|
688
708
|
const intentRules = [
|
|
689
709
|
{ if: { properties: { operation: { enum: ['invoice_payment', 'payment_method_invoice'] } }, required: ['operation'] }, then: { required: ['invoice_id'] } },
|
|
690
|
-
{ if: { properties: { operation: { const: 'mandate_setup' } }, required: ['operation'] }, then: { properties: { state: {
|
|
691
|
-
{ if: { properties: { operation: { const: 'mandate_setup' }, state: { const: 'held' } }, required: ['operation', 'state'] }, then: { properties: { reason: { const: 'mandate_policy_unresolved' } }, required: ['reason'] } },
|
|
710
|
+
{ if: { properties: { operation: { const: 'mandate_setup' } }, required: ['operation'] }, then: { properties: { state: { const: 'held' }, reason: { const: 'mandate_policy_unresolved' } }, required: ['reason'] } },
|
|
692
711
|
{ if: { properties: { reason: { const: 'mandate_policy_unresolved' } }, required: ['reason'] }, then: { properties: { operation: { const: 'mandate_setup' } } } },
|
|
693
712
|
{ if: { properties: { payment: { properties: { kind: { const: 'mandate' } }, required: ['kind'] } }, required: ['payment'] }, then: { properties: { operation: { const: 'paid_change' } } } },
|
|
694
713
|
];
|
|
@@ -696,22 +715,18 @@ function validateIntent(intent, ctx) {
|
|
|
696
715
|
if (['invoice_payment', 'payment_method_invoice'].includes(intent.operation) && !intent.invoice_id) {
|
|
697
716
|
ctx.addIssue({ code: 'custom', path: ['invoice_id'], message: 'An invoice-paying intent must name the invoice or due charge.' });
|
|
698
717
|
}
|
|
699
|
-
if (intent.operation === 'mandate_setup'
|
|
700
|
-
ctx.addIssue({ code: 'custom', path: ['
|
|
701
|
-
}
|
|
702
|
-
if (intent.operation === 'mandate_setup' && intent.state === 'held' && intent.reason !== 'mandate_policy_unresolved') {
|
|
703
|
-
ctx.addIssue({ code: 'custom', path: ['reason'], message: 'A held mandate setup is the stored mandate_policy_unresolved hold.' });
|
|
704
|
-
}
|
|
705
|
-
if (intent.reason === 'mandate_policy_unresolved' && intent.operation !== 'mandate_setup') {
|
|
706
|
-
ctx.addIssue({ code: 'custom', path: ['reason'], message: 'Only a mandate setup was held as mandate_policy_unresolved.' });
|
|
718
|
+
if ((intent.operation === 'mandate_setup') !== (intent.reason === 'mandate_policy_unresolved')) {
|
|
719
|
+
ctx.addIssue({ code: 'custom', path: ['reason'], message: 'Mandate setup remains held until its integration policy is resolved.' });
|
|
707
720
|
}
|
|
708
721
|
if (intent.payment?.kind === 'mandate' && intent.operation !== 'paid_change') {
|
|
709
|
-
ctx.addIssue({ code: 'custom', path: ['payment'], message: 'Owner checkout
|
|
722
|
+
ctx.addIssue({ code: 'custom', path: ['payment'], message: 'Owner checkout and invoice payment require a hosted payment.' });
|
|
710
723
|
}
|
|
711
724
|
}
|
|
725
|
+
/** An intent waiting for the hourly VIES retry; with `vies_unavailable` it says which side was down at the last attempt. */
|
|
726
|
+
const awaitingVies = { ...intentIdentity, state: z.literal('awaiting_vies'), next_attempt_at: z.iso.datetime() };
|
|
712
727
|
/** Unaccepted intents. No draft contains a provider redirect or billing decision. */
|
|
713
728
|
const draftVariants = [
|
|
714
|
-
|
|
729
|
+
viesPending(awaitingVies),
|
|
715
730
|
z.object({ ...intentIdentity, ...quoteIdentity, state: z.literal('eligible'), quote: purchaseQuote }).strict(),
|
|
716
731
|
z.object({
|
|
717
732
|
...intentIdentity, operation: purchaseOperation, state: z.literal('held'), reason: purchaseHoldReason,
|
|
@@ -723,7 +738,7 @@ const draftVariants = [
|
|
|
723
738
|
];
|
|
724
739
|
export const purchaseIntentDraft = z.discriminatedUnion('state', draftVariants).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
725
740
|
const paymentStartedVariant = z.object({
|
|
726
|
-
...intentIdentity,
|
|
741
|
+
...intentIdentity, state: z.literal('payment_started'), payment_id: z.uuid(),
|
|
727
742
|
payment: z.discriminatedUnion('kind', [
|
|
728
743
|
z.object({ kind: z.literal('hosted'), checkout_id: z.uuid(), checkout_url: z.url() }).strict(),
|
|
729
744
|
z.object({ kind: z.literal('mandate') }).strict(),
|
|
@@ -747,15 +762,14 @@ export const purchaseIntent = z.discriminatedUnion('state', [
|
|
|
747
762
|
const nonChangeOperation = purchaseOperation.exclude(['paid_change']);
|
|
748
763
|
const nonChangeChargeOperation = chargeOperation.exclude(['paid_change']);
|
|
749
764
|
const nonChangeDraft = z.discriminatedUnion('state', [
|
|
750
|
-
|
|
765
|
+
viesPending({ ...awaitingVies, operation: nonChangeChargeOperation }),
|
|
751
766
|
draftVariants[1].safeExtend({ operation: nonChangeChargeOperation }),
|
|
752
767
|
draftVariants[2].safeExtend({ operation: nonChangeOperation }),
|
|
753
768
|
draftVariants[3].safeExtend({ operation: nonChangeChargeOperation }),
|
|
754
769
|
draftVariants[4].safeExtend({ operation: nonChangeChargeOperation }),
|
|
755
770
|
]).superRefine(validateIntent).meta({ allOf: intentRules });
|
|
756
|
-
// A method change starts its 0.00 hosted payment at once: `mandate_setup` is `payment_started` here, and in no draft but `held`.
|
|
757
771
|
const nonChangePaymentStarted = paymentStartedVariant
|
|
758
|
-
.safeExtend({ operation:
|
|
772
|
+
.safeExtend({ operation: nonChangeChargeOperation })
|
|
759
773
|
.superRefine(validateIntent).meta({ allOf: intentRules });
|
|
760
774
|
const paidChangeOperation = z.literal('paid_change');
|
|
761
775
|
// A paid change is decided in its request: it never waits for VIES.
|
|
@@ -785,8 +799,8 @@ export const checkoutStartResponse = z.discriminatedUnion('state', [
|
|
|
785
799
|
...checkoutIntentIdentity, state: z.literal('eligible'), ...quoteIdentity, quote: purchaseQuote,
|
|
786
800
|
display: billingDecisionDisplayResponse,
|
|
787
801
|
}).strict().meta({ description: 'Eligible: the price is frozen and the display shown; one click on its button confirms.' }),
|
|
788
|
-
|
|
789
|
-
.meta({ description: 'VIES did not confirm the VAT ID within its retries. Nothing is stored; check again.' }),
|
|
802
|
+
viesPending({ state: z.literal('vies_unavailable'), field: vatIdField })
|
|
803
|
+
.meta({ 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.' }),
|
|
790
804
|
z.object({ state: z.literal('invalid_vat_id'), field: vatIdField, rule: z.literal('vat_id_invalid') }).strict()
|
|
791
805
|
.meta({ description: 'VIES says the VAT ID is invalid. Nothing is stored.' }),
|
|
792
806
|
z.object({ state: z.literal('refused'), field: z.string().min(1), rule: purchaseRefusalRule }).strict()
|
|
@@ -845,12 +859,11 @@ export const checkoutOpenDetails = z.object({
|
|
|
845
859
|
expires_at: z.iso.datetime().nullable().meta({ description: 'When the open payment expires at the provider, or `null` when unknown.' }),
|
|
846
860
|
checkout_url: z.url().nullable().meta({ description: 'Where the open payment continues, or `null` when the provider no longer offers it.' }),
|
|
847
861
|
}).strict();
|
|
848
|
-
/**
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}).strict();
|
|
862
|
+
/**
|
|
863
|
+
* `409 target_state_conflict` details when a paid change needs VIES and VIES did not answer. Nothing is stored.
|
|
864
|
+
* With `reason: vies_unavailable`, `vies_outage` says which side was down.
|
|
865
|
+
*/
|
|
866
|
+
export const viesUnavailableDetails = viesPending({ field: vatIdField, rule: z.literal('vies_unavailable') });
|
|
854
867
|
/** Lookup needs one identity, plus the expected operation; a mismatch discloses nothing. */
|
|
855
868
|
export const purchaseIntentLookupQuery = z.object({
|
|
856
869
|
operation_key: purchaseOperationKey.optional().meta({ description: 'The client operation key; supply this or intent_id, never both.' }),
|
|
@@ -904,7 +917,7 @@ const vatCheckIdentity = { vat_id: z.string(), name: z.string().nullable() };
|
|
|
904
917
|
export const vatIdCheckResponse = z.discriminatedUnion('state', [
|
|
905
918
|
z.object({ ...vatCheckIdentity, state: z.literal('eligible'), status: z.literal('valid') }).strict(),
|
|
906
919
|
z.object({ ...vatCheckIdentity, state: z.literal('refused'), status: z.literal('invalid'), rule: z.literal('vat_id_invalid') }).strict(),
|
|
907
|
-
|
|
920
|
+
viesPending({ ...vatCheckIdentity, state: z.literal('pending'), status: z.enum(['valid', 'unverified', 'unavailable']) }),
|
|
908
921
|
]);
|
|
909
922
|
/**
|
|
910
923
|
* `POST /api/billing/change`'s body: the **absolute** target state, never a
|
|
@@ -937,31 +950,12 @@ export const billingDetailsUpdate = z.object({
|
|
|
937
950
|
description: 'Replaces the VAT ID; `null` clears it. Omitted leaves it as it is. A new ID is re-checked through VIES.',
|
|
938
951
|
}),
|
|
939
952
|
}).strict();
|
|
940
|
-
/**
|
|
941
|
-
* `PATCH /api/billing/details`'s `409 target_state_conflict` details
|
|
942
|
-
* (fleetless/fleetless#1185). Nothing is saved in any of them.
|
|
943
|
-
*
|
|
944
|
-
* - A field a purchase would refuse: `field` as the checkout names it
|
|
945
|
-
* (`billing.kind`, `billing.vat_id`, `billing.tax_id`,
|
|
946
|
-
* `billing.address.state`, `billing.invoice_email`), `rule` the refusal.
|
|
947
|
-
* - `vies_unavailable` (`viesUnavailableDetails`): the country or the VAT ID
|
|
948
|
-
* changed and VIES did not answer; check again.
|
|
949
|
-
* - `buyer_changed`: the billing details changed while this edit was decided;
|
|
950
|
-
* read them again.
|
|
951
|
-
*/
|
|
952
|
-
export const billingDetailsConflictDetails = z.union([
|
|
953
|
-
z.object({ field: z.string().min(1), rule: purchaseRefusalRule }).strict()
|
|
954
|
-
.meta({ description: 'A field a purchase would refuse. Nothing is saved.' }),
|
|
955
|
-
viesUnavailableDetails,
|
|
956
|
-
z.object({ field: z.literal('billing'), rule: z.literal('buyer_changed') }).strict()
|
|
957
|
-
.meta({ description: 'The billing details changed meanwhile. Nothing is saved.' }),
|
|
958
|
-
]);
|
|
959
953
|
/**
|
|
960
954
|
* The payment methods Fleetless takes: card, PayPal and Apple Pay, in EUR and USD, and no others (André, 2026-10-04).
|
|
961
955
|
* Apple Pay is a Mollie method of its own at checkout and for a change, but the mandate it leaves is a card mandate.
|
|
962
956
|
*/
|
|
963
957
|
export const paymentMethodKind = z.enum(['card', 'paypal', 'applepay']);
|
|
964
|
-
/** `POST /api/billing/payment-method`'s body.
|
|
958
|
+
/** `POST /api/billing/payment-method`'s body. */
|
|
965
959
|
export const paymentMethodChangeRequest = z.object({
|
|
966
960
|
operation_key: purchaseOperationKey,
|
|
967
961
|
method: paymentMethodKind.meta({
|
package/dist/index.d.ts
CHANGED
|
@@ -87,12 +87,12 @@ export type { PlanId, PlanLimitKey, PlanLimits, PlanFeature, PlanFeatures, PlanP
|
|
|
87
87
|
export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planChangePrepareRequest, planChangeDecisionLookupQuery, planChangeDecisionStatusResponse, planOverrides, adminPlanChangeRequest, } from './plans.js';
|
|
88
88
|
export type { PlanCurrency, OrgAddons, OrgPlanUsage, PlanChangeKeep, PlanChangeReason, PendingPlanChange, OrgLock, OrgPlan, PlanChangeRequest, PlanChangePrepareRequest, PlanChangeDecisionLookupQuery, PlanChangeDecisionStatusResponse, PlanOverrides, AdminPlanChangeRequest, } from './plans.js';
|
|
89
89
|
export { ianaTimeZones } from './iana-time-zones.js';
|
|
90
|
-
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate,
|
|
91
|
-
export type { PayerKind, BillingCycle, VatTreatment, PayerRefusalRule, VatDecision, ChargeAmounts, BillingState, QuoteLine, CheckoutQuote, BillingAddress, BillingDetails, CheckoutRequest, CheckoutResponse, CheckoutStatus, VatIdStatus, VatIdCheckRequest, VatIdCheckResponse, BillingChangeRequest, BillingCancelRequest, BillingDetailsUpdate,
|
|
90
|
+
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingInvoicePdfQuery, billingAccount, billingView, billingChangeResponse, billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery, billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
|
|
91
|
+
export type { PayerKind, BillingCycle, VatTreatment, PayerRefusalRule, VatDecision, ChargeAmounts, BillingState, QuoteLine, CheckoutQuote, BillingAddress, BillingDetails, CheckoutRequest, CheckoutResponse, CheckoutStatus, VatIdStatus, VatIdCheckRequest, VatIdCheckResponse, BillingChangeRequest, BillingCancelRequest, BillingDetailsUpdate, PaymentMethodKind, PaymentMethodChangeRequest, BillingAccountStatus, PaymentMethod, InvoiceStatus, BillingInvoice, BillingInvoicePdfQuery, BillingAccount, BillingView, BillingChangeResponse, BillingDocumentKind, BillingDocumentStatus, BillingDocumentProfile, BillingDocumentFormat, BillingDocument, BillingDocumentList, BillingDocumentFileRole, BillingDocumentDetail, BillingDocumentFileQuery, BillingIssuer, BillingChargeInvoice, BillingCharge, ChargePayRequest, } from './billing.js';
|
|
92
92
|
export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
|
|
93
93
|
export type { ControllerRegisterWrite, ControllerRegisterOrgResponse } from './controller-register.js';
|
|
94
|
-
export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, formatEur, C4_ACTIONS, C4_TEXT_IDS, c4ActionOf, c4Declaration, storedBillingDecisionSnapshot, checkoutStartResponse, checkoutDraftResponse, checkoutOpenDetails, viesUnavailableDetails, } from './billing.js';
|
|
95
|
-
export type { PurchaseBillingDetails, PurchaseOperation, PurchaseQuote, PurchaseIntent, PurchaseIntentDraft, PurchaseIntentPaymentStarted, PurchaseIntentAcceptedWithoutPayment, BillingDecisionDisplayRequest, ConfirmationProof, BillingDecisionAmounts, BillingDecisionPeriod, BillingDecisionSnapshot, BillingDecisionDisplayResponse, PlanChangePrepareResponse, PurchaseIntentLookupQuery, PurchaseIntentConfirmRequest, PurchaseConflictDetails, InvoicePayRequest, PurchaseIntentResponse, ViesVerdict, ViesPendingReason, C4Action, C4TextId, C4DeclarationText, C4DeclarationValues, C4Decision, C4From, StoredBillingDecisionSnapshot, CheckoutStartResponse, CheckoutDraftResponse, CheckoutOpenDetails, ViesUnavailableDetails, } from './billing.js';
|
|
94
|
+
export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, viesOutage, formatEur, C4_ACTIONS, C4_TEXT_IDS, c4ActionOf, c4Declaration, storedBillingDecisionSnapshot, checkoutStartResponse, checkoutDraftResponse, checkoutOpenDetails, viesUnavailableDetails, } from './billing.js';
|
|
95
|
+
export type { PurchaseBillingDetails, PurchaseOperation, PurchaseQuote, PurchaseIntent, PurchaseIntentDraft, PurchaseIntentPaymentStarted, PurchaseIntentAcceptedWithoutPayment, BillingDecisionDisplayRequest, ConfirmationProof, BillingDecisionAmounts, BillingDecisionPeriod, BillingDecisionSnapshot, BillingDecisionDisplayResponse, PlanChangePrepareResponse, PurchaseIntentLookupQuery, PurchaseIntentConfirmRequest, PurchaseConflictDetails, InvoicePayRequest, PurchaseIntentResponse, ViesVerdict, ViesPendingReason, ViesOutage, C4Action, C4TextId, C4DeclarationText, C4DeclarationValues, C4Decision, C4From, StoredBillingDecisionSnapshot, CheckoutStartResponse, CheckoutDraftResponse, CheckoutOpenDetails, ViesUnavailableDetails, } from './billing.js';
|
|
96
96
|
export { COLLECTIONS_FORMAT_VERSION, COLLECTION_RESERVED_KEYS, COLLECTION_LIMITS, collectionKey, collectionBinding, collectionFieldType, collectionField, collectionAccessValue, collectionAccess, collectionDefinition, collectionsDocument, } from './collections.js';
|
|
97
97
|
export type { CollectionKey, CollectionBinding, CollectionFieldType, CollectionField, CollectionAccessValue, CollectionAccess, CollectionDefinition, CollectionsDocument, } from './collections.js';
|
|
98
98
|
export { roleCollectionRights } from './collections-rights.js';
|
package/dist/index.js
CHANGED
|
@@ -96,13 +96,13 @@ export { planId, PLAN_ORDER, planLimitKey, planLimits, planFeature, planFeatures
|
|
|
96
96
|
export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planChangePrepareRequest, planChangeDecisionLookupQuery, planChangeDecisionStatusResponse, planOverrides, adminPlanChangeRequest, } from './plans.js';
|
|
97
97
|
export { ianaTimeZones } from './iana-time-zones.js';
|
|
98
98
|
// 2026-10-04 — billing through Mollie (#104).
|
|
99
|
-
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate,
|
|
99
|
+
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingInvoicePdfQuery, billingAccount, billingView, billingChangeResponse,
|
|
100
100
|
// 2026-10-19 — Lexware billing documents (fleetless/fleetless#544).
|
|
101
101
|
billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery,
|
|
102
102
|
// 2026-10-19 — the Lexware issuer cutover (fleetless/fleetless#327).
|
|
103
103
|
billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
|
|
104
104
|
export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
|
|
105
|
-
export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, formatEur, C4_ACTIONS, C4_TEXT_IDS, c4ActionOf, c4Declaration, storedBillingDecisionSnapshot, checkoutStartResponse, checkoutDraftResponse, checkoutOpenDetails, viesUnavailableDetails, } from './billing.js';
|
|
105
|
+
export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, viesOutage, formatEur, C4_ACTIONS, C4_TEXT_IDS, c4ActionOf, c4Declaration, storedBillingDecisionSnapshot, checkoutStartResponse, checkoutDraftResponse, checkoutOpenDetails, viesUnavailableDetails, } from './billing.js';
|
|
106
106
|
export { COLLECTIONS_FORMAT_VERSION, COLLECTION_RESERVED_KEYS, COLLECTION_LIMITS, collectionKey, collectionBinding, collectionFieldType, collectionField, collectionAccessValue, collectionAccess, collectionDefinition, collectionsDocument, } from './collections.js';
|
|
107
107
|
export { roleCollectionRights } from './collections-rights.js';
|
|
108
108
|
export { collectionJsonTemplateName, COLLECTION_JSON_TEMPLATES, parseDisplayTemplate } from './collections-templates.js';
|
package/dist/routes.js
CHANGED
|
@@ -3211,6 +3211,9 @@ export const ROUTES = [
|
|
|
3211
3211
|
'Cache-Control: no-store: show `display.snapshot.declaration.text` directly above one button labelled `action_label`; that one ' +
|
|
3212
3212
|
'click is `POST /api/billing/intents/:id/confirm` with the display\'s `confirmation_proof`. `vies_unavailable`, `invalid_vat_id` ' +
|
|
3213
3213
|
'and `refused` answer 200 and nothing is stored but the draft: no intent, no account, no retry in the background; check again. ' +
|
|
3214
|
+
'`vies_unavailable` with `reason: vies_unavailable` carries `vies_outage`: `scope: member_state` when the VAT register of ' +
|
|
3215
|
+
'`country` does not answer VIES (a register VIES reports as down answers at once, not after the 15 seconds), `scope: vies` when ' +
|
|
3216
|
+
'VIES itself does not. ' +
|
|
3214
3217
|
'`held` (`issuer_cutover_in_progress`) only while an issuer cutover runs, for minutes; try again. Lexware never holds a checkout: ' +
|
|
3215
3218
|
'its contact and invoice follow the payment. Use a fresh operation_key per press; the same key and input answer 200 with the same ' +
|
|
3216
3219
|
'intent (`payment_started` with its hosted checkout once confirmed), without another Mollie payment; changed input conflicts. ' +
|
|
@@ -3234,14 +3237,8 @@ export const ROUTES = [
|
|
|
3234
3237
|
summary: 'Recovers a purchase intent by operation key or intent ID.',
|
|
3235
3238
|
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
|
|
3236
3239
|
params: [], query: purchaseIntentLookupQuery, request: null, response: purchaseIntentResponse,
|
|
3237
|
-
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'
|
|
3238
|
-
notes: 'Supply exactly one of operation_key or intent_id and the expected operation. Scope lookup to the authenticated owner and org; '
|
|
3239
|
-
'unknown, foreign-org or mismatched-operation intents return 404 without disclosure. Repeating a lookup after restart or lost ' +
|
|
3240
|
-
'response returns the same intent/payment identity and, for a paid change, its billing result. A proof is never returned here; a ' +
|
|
3241
|
-
'still-eligible decision needs a fresh C.4 display and explicit Owner click. A started hosted payment is read at the provider ' +
|
|
3242
|
-
'first: 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when it is no longer open there (paid, ' +
|
|
3243
|
-
'canceled, expired or failed), and 502 payment_provider_unavailable when the provider does not answer. A `mandate_setup` whose ' +
|
|
3244
|
-
'payment the provider never answered also answers that 502: send its `POST /api/billing/payment-method` again with the same key.',
|
|
3240
|
+
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'], transport: 'http',
|
|
3241
|
+
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.',
|
|
3245
3242
|
},
|
|
3246
3243
|
{
|
|
3247
3244
|
method: 'POST', path: '/api/billing/intents/:id/display', section: 'billing',
|
|
@@ -3299,26 +3296,15 @@ export const ROUTES = [
|
|
|
3299
3296
|
audience: 'developer', auth: 'developer', rateLimited: true, ownerTier: true, status: 200,
|
|
3300
3297
|
params: [], query: null, request: vatIdCheckRequest, response: vatIdCheckResponse,
|
|
3301
3298
|
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'rate_limited'], transport: 'http',
|
|
3302
|
-
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.",
|
|
3299
|
+
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.",
|
|
3303
3300
|
},
|
|
3304
3301
|
{
|
|
3305
3302
|
method: 'PATCH', path: '/api/billing/details', section: 'billing',
|
|
3306
|
-
summary: "Edits
|
|
3303
|
+
summary: "Edits company billing details for revalidation before the next charge.",
|
|
3307
3304
|
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
|
|
3308
3305
|
params: [], query: null, request: billingDetailsUpdate, response: billingView,
|
|
3309
|
-
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'
|
|
3310
|
-
notes:
|
|
3311
|
-
'VAT ID, invoice email. The merged company is decided as a checkout decides its buyer, and saved only when a purchase would ' +
|
|
3312
|
-
'accept it. Every refusal is 409 target_state_conflict with `billingDetailsConflictDetails` and saves nothing: `{ field, rule }` ' +
|
|
3313
|
-
'for a field a purchase refuses (`rule` a `purchaseRefusalRule`; `field` one of `billing.kind`, `billing.vat_id`, ' +
|
|
3314
|
-
'`billing.tax_id`, `billing.address.state`, `billing.invoice_email`), `vat_id_invalid` at `billing.vat_id` when VIES does not ' +
|
|
3315
|
-
'know the VAT ID; `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`) when VIES did not answer within ' +
|
|
3316
|
-
'its 15 seconds: send the same edit again; `{ field: billing, rule: buyer_changed }` when the details changed while the edit was ' +
|
|
3317
|
-
'decided: read `GET /api/billing` and send it again. VIES is asked only when the country or the VAT ID changes, in another EU ' +
|
|
3318
|
-
'country; any other edit keeps the recorded VIES answer and needs none. A saved edit re-prices open due charges, updates the ' +
|
|
3319
|
-
'invoicing contact and invalidates quotes made for the old details. An issued invoice keeps the details it was issued with. An ' +
|
|
3320
|
-
'edit creates no payment, activates no plan, pays no invoice, clears no dunning and lifts no lock. A person account from before ' +
|
|
3321
|
-
'company-only purchases is saved without these checks; it cannot buy.',
|
|
3306
|
+
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'], transport: 'http',
|
|
3307
|
+
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.",
|
|
3322
3308
|
},
|
|
3323
3309
|
{
|
|
3324
3310
|
method: 'POST', path: '/api/billing/change', section: 'billing',
|
|
@@ -3332,7 +3318,9 @@ export const ROUTES = [
|
|
|
3332
3318
|
'acceptance. The change is decided in the request and never waits: no `awaiting_vies`, and Lexware never holds it; `held` ' +
|
|
3333
3319
|
'(`issuer_cutover_in_progress`) only while an issuer cutover runs. VIES runs only when the billing details changed since the last ' +
|
|
3334
3320
|
'decision or the recorded VAT treatment is blocked, and a change that charges nothing never calls it. When VIES does not answer: ' +
|
|
3335
|
-
'409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored
|
|
3321
|
+
'409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored; with ' +
|
|
3322
|
+
'`reason: vies_unavailable` it carries `vies_outage` (`scope: member_state` for the VAT register of `country`, `scope: vies` for ' +
|
|
3323
|
+
'VIES itself). A ' +
|
|
3336
3324
|
'change charging nothing while the recorded VAT treatment is unresolved: 409 target_state_conflict with `{ field: billing.vat_id, ' +
|
|
3337
3325
|
'rule: purchase_eligibility_pending }`. An eligible Owner obtains a C.4 display (`POST /api/billing/intents/:id/display`) and ' +
|
|
3338
3326
|
'confirms with one click on its `action_label`. Confirmation may return accepted_no_payment with charged: null and no provider ' +
|
|
@@ -3342,26 +3330,12 @@ export const ROUTES = [
|
|
|
3342
3330
|
},
|
|
3343
3331
|
{
|
|
3344
3332
|
method: 'POST', path: '/api/billing/payment-method', section: 'billing',
|
|
3345
|
-
summary: "
|
|
3333
|
+
summary: "Records an invoice-paying method intent or a held mandate setup.",
|
|
3346
3334
|
audience: 'developer', auth: 'developer', rateLimited: true, ownerTier: true, status: 201,
|
|
3347
3335
|
params: [], query: null, request: paymentMethodChangeRequest, response: checkoutResponse,
|
|
3348
3336
|
errors: ['target_state_conflict', ...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found', 'rate_limited', ...BILLING_OFF, ...MOLLIE],
|
|
3349
3337
|
transport: 'http',
|
|
3350
|
-
notes:
|
|
3351
|
-
'method: the answer is operation `mandate_setup` in `payment_started` with `payment.kind` hosted at once; redirect to its ' +
|
|
3352
|
-
'`checkout_url`. Nothing is quoted, so there is no `eligible` step, no confirmation and no VIES. It pays no invoice and clears ' +
|
|
3353
|
-
'no dunning or lock: open invoices stay open. When the provider reports it paid, the new mandate is the account\'s and every ' +
|
|
3354
|
-
'other valid mandate of the customer is revoked; canceled, expired or failed, nothing changes. `GET /api/billing/checkout/:id` ' +
|
|
3355
|
-
'with the `checkout_id` reads the outcome (`purpose: payment_method`). Use one operation_key per method until its payment is ' +
|
|
3356
|
-
'finished. The same key again answers 200 with the same `payment_started` while the payment is open. 502 ' +
|
|
3357
|
-
'payment_provider_unavailable when the provider did not answer: the same key again resumes, and sends the same payment again ' +
|
|
3358
|
-
'under the same idempotency key. 409 target_state_conflict with `{ field: billing, rule: checkout_not_open }` when the key\'s ' +
|
|
3359
|
-
'payment is finished or can no longer be sent: start again with a new key. Same key with another method is a typed ' +
|
|
3360
|
-
'operation_key_reused conflict. A change stored while changes were on hold reads `held` with `mandate_policy_unresolved`; start ' +
|
|
3361
|
-
'again with a new key. Apple Pay with zero-amount changes disabled pays an open invoice through operation ' +
|
|
3362
|
-
'payment_method_invoice, with the buyer/VIES gate, current-amount reconfirmation and USD legacy hold of invoices/:id/pay; ' +
|
|
3363
|
-
'without an open invoice, 400 validation_error has field method and rule applepay_needs_open_invoice. An invoice charged back ' +
|
|
3364
|
-
'is never retried automatically. 404 not_found when no billing account is active or past due.',
|
|
3338
|
+
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.",
|
|
3365
3339
|
},
|
|
3366
3340
|
{
|
|
3367
3341
|
method: 'POST', path: '/api/billing/cancel', section: 'billing',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "17.0.0-next.
|
|
3
|
+
"version": "17.0.0-next.2",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"anyOf": [
|
|
4
|
-
{
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"field": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"minLength": 1
|
|
10
|
-
},
|
|
11
|
-
"rule": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"enum": [
|
|
14
|
-
"company_required",
|
|
15
|
-
"vat_id_required",
|
|
16
|
-
"vat_id_invalid",
|
|
17
|
-
"tax_id_required",
|
|
18
|
-
"us_state_required",
|
|
19
|
-
"public_email_domain",
|
|
20
|
-
"invoice_not_open"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"required": [
|
|
25
|
-
"field",
|
|
26
|
-
"rule"
|
|
27
|
-
],
|
|
28
|
-
"additionalProperties": false,
|
|
29
|
-
"description": "A field a purchase would refuse. Nothing is saved."
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"type": "object",
|
|
33
|
-
"properties": {
|
|
34
|
-
"field": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"const": "billing.vat_id"
|
|
37
|
-
},
|
|
38
|
-
"rule": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"const": "vies_unavailable"
|
|
41
|
-
},
|
|
42
|
-
"reason": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"enum": [
|
|
45
|
-
"vies_unavailable",
|
|
46
|
-
"vies_unverified",
|
|
47
|
-
"vies_identifier_missing"
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"required": [
|
|
52
|
-
"field",
|
|
53
|
-
"rule",
|
|
54
|
-
"reason"
|
|
55
|
-
],
|
|
56
|
-
"additionalProperties": false
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"type": "object",
|
|
60
|
-
"properties": {
|
|
61
|
-
"field": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"const": "billing"
|
|
64
|
-
},
|
|
65
|
-
"rule": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"const": "buyer_changed"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"required": [
|
|
71
|
-
"field",
|
|
72
|
-
"rule"
|
|
73
|
-
],
|
|
74
|
-
"additionalProperties": false,
|
|
75
|
-
"description": "The billing details changed meanwhile. Nothing is saved."
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|