{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://schemas.example.com/payment-verifier/verification-request.schema.json","title":"VerificationRequest","type":"object","additionalProperties":false,"required":["schema_version","request_id","policy_id","supplier","transaction","customer_assertions","payment_destination"],"properties":{"schema_version":{"const":"1.0"},"request_id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","const":"eu-b2b-payment-v1"},"requested_at":{"type":"string","format":"date-time"},"supplier":{"$ref":"#/$defs/supplier"},"transaction":{"$ref":"#/$defs/transaction"},"customer_assertions":{"$ref":"#/$defs/assertions"},"payment_destination":{"$ref":"#/$defs/destination"},"evidence":{"type":"array","maxItems":20,"items":{"$ref":"#/$defs/evidence"}},"callback":{"$ref":"#/$defs/callback"},"metadata":{"type":"object","maxProperties":20,"additionalProperties":{"type":["string","number","boolean"]}}},"$defs":{"supplier":{"type":"object","additionalProperties":false,"required":["claimed_legal_name","country_code"],"properties":{"customer_supplier_id":{"type":"string","maxLength":128},"claimed_legal_name":{"type":"string","minLength":1,"maxLength":300},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"company_registration_number":{"type":"string","maxLength":100},"vat_number":{"type":"string","maxLength":64},"lei":{"type":"string","pattern":"^[A-Z0-9]{20}$"},"claimed_address":{"type":"string","maxLength":500}},"anyOf":[{"required":["company_registration_number"]},{"required":["vat_number"]},{"required":["lei"]}]},"transaction":{"type":"object","additionalProperties":false,"required":["invoice_id","amount","currency"],"properties":{"invoice_id":{"type":"string","minLength":1,"maxLength":128},"purchase_order_id":{"type":"string","maxLength":128},"amount":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]{1,4})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"invoice_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"}}},"assertions":{"type":"object","additionalProperties":false,"required":["supplier_approved","po_matched","amount_within_po","currency_matched"],"properties":{"supplier_approved":{"type":"boolean"},"po_matched":{"type":"boolean"},"amount_within_po":{"type":"boolean"},"currency_matched":{"type":"boolean"},"invoice_supplier_matched":{"type":"boolean"},"assertion_source":{"type":"string","enum":["SAP","D365","ORACLE","NETSUITE","OTHER"]}}},"destination":{"type":"object","additionalProperties":false,"required":["fingerprint","fingerprint_algorithm","country_code"],"properties":{"fingerprint":{"type":"string","minLength":32,"maxLength":256},"fingerprint_algorithm":{"type":"string","enum":["HMAC-SHA-256"]},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"beneficiary_name":{"type":"string","maxLength":300},"is_declared_change":{"type":"boolean","default":false}}},"evidence":{"type":"object","additionalProperties":false,"required":["type","sha256","observed_at"],"properties":{"type":{"type":"string","enum":["INVOICE","PURCHASE_ORDER","SUPPLIER_MASTER","BANK_CHANGE_REQUEST","OTHER"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"observed_at":{"type":"string","format":"date-time"},"content_uri":{"type":"string","format":"uri","maxLength":2048},"media_type":{"type":"string","maxLength":100}}},"callback":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"},"authentication_reference":{"type":"string","maxLength":200}}}}}