{"openapi":"3.1.0","info":{"title":"Neural AI Pay API","description":"Merchant category classification and dynamic currency conversion rate validation for acquirers and payment facilitators.\n\nAuthenticate with a bearer token — create an API key at https://neuralaipay.com/dashboard/api-keys. Quotas apply per plan and per product; see `/api/mcc/quota` and `/api/dcc/usage`.","version":"0.1.0"},"servers":[{"url":"https://api.neuralaipay.com","description":"Production"}],"paths":{"/api/mcc/suggest-descriptor":{"get":{"tags":["MCC Classification"],"summary":"Suggest an MCC from a descriptor","description":"Given a merchant name, return a suggested business area description\ninferred from the merchant's trading name.\n\nReturns null for suggested_descriptor when confidence is too low to be useful.","operationId":"suggest_descriptor_api_mcc_suggest_descriptor_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"Merchant name to suggest a business area description for","title":"Name"},"description":"Merchant name to suggest a business area description for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestDescriptorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcc/carriers":{"get":{"tags":["MCC Classification"],"summary":"List carrier reference data","description":"List carrier-specific MCC codes (3000-3999 range).\n\nOptionally filter by carrier type or look up a single MCC.\nResults are ordered by MCC ascending.","operationId":"list_carriers_api_mcc_carriers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by carrier type (airline, hotel, car_rental)","title":"Type"},"description":"Filter by carrier type (airline, hotel, car_rental)"},{"name":"mcc","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return details for a specific carrier MCC","title":"Mcc"},"description":"Return details for a specific carrier MCC"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarriersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcc/validate":{"post":{"tags":["MCC Classification"],"summary":"Validate a merchant's MCC","description":"Validate a merchant's submitted MCC against their descriptor and optional\nABR registry data.\n\nReturns the top-3 MCC candidates with confidence scores, a conflict flag\nwhen the submitted MCC is unlikely correct, and a list of compliance flags\ncovering scheme restrictions, risk classification, and EDD requirements.","operationId":"validate_mcc_api_mcc_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/mcc/history":{"get":{"tags":["MCC Classification"],"summary":"List validation history","description":"Return the last 20 validation records for the current org, newest first.","operationId":"list_history_api_mcc_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/mcc/batch/upload":{"post":{"tags":["MCC Classification"],"summary":"Validate a batch of merchants","description":"Validate a CSV portfolio of merchants in bulk.\n\nEach row runs through the same pipeline as the single-merchant endpoint.\nAll successfully processed rows are retained as audit evidence.\nRow-level errors are captured and returned alongside successful results.","operationId":"batch_upload_api_mcc_batch_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_batch_upload_api_mcc_batch_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/mcc/mandates":{"get":{"tags":["MCC Classification"],"summary":"List mandates for a category","description":"List mandates with optional filtering by scheme, region, category, MCC, and country.\nWhen mcc is provided, only mandates that explicitly list that MCC are returned.\nWhen country is provided, results are limited to GLOBAL mandates plus any mandates\nwhose region matches that country code (e.g. country=AU returns GLOBAL + AU).","operationId":"list_mandates_api_mcc_mandates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scheme","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by scheme (visa, mastercard, auspaynet, mas, rbi)","title":"Scheme"},"description":"Filter by scheme (visa, mastercard, auspaynet, mas, rbi)"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by region (AU, SG, IN, APAC, GLOBAL)","title":"Region"},"description":"Filter by region (AU, SG, IN, APAC, GLOBAL)"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category (surcharging, restricted_mcc, contactless, fraud, reporting)","title":"Category"},"description":"Filter by category (surcharging, restricted_mcc, contactless, fraud, reporting)"},{"name":"mcc","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return only mandates where this 4-digit MCC is in the mccs array","title":"Mcc"},"description":"Return only mandates where this 4-digit MCC is in the mccs array"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Merchant country; returns GLOBAL mandates plus any matching country-specific mandates","title":"Country"},"description":"Merchant country; returns GLOBAL mandates plus any matching country-specific mandates"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MandatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcc/quota":{"get":{"tags":["MCC Classification"],"summary":"Check remaining MCC quota","description":"Get current quota usage for the organization.","operationId":"get_quota_api_mcc_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/mcc/reports/validation-pdf":{"post":{"tags":["MCC Classification"],"summary":"Export a validation report (PDF)","description":"Generate a PDF audit report from a completed validation result.\n\nAccepts the merchant details and full validation result.\nApplicable mandates are fetched internally from the database.\nReturns a binary PDF with Content-Disposition: attachment.","operationId":"export_validation_pdf_api_mcc_reports_validation_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/validate":{"post":{"tags":["DCC Validation"],"summary":"Validate a DCC rate","description":"Validate a single DCC transaction against ECB wholesale rate.","operationId":"validate_single_api_dcc_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DCCValidationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DCCValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/batch":{"post":{"tags":["DCC Validation"],"summary":"Validate a batch of DCC transactions","description":"Upload a CSV of DCC transactions for batch validation.","operationId":"validate_batch_api_dcc_batch_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_batch_api_dcc_batch_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResultSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/batch/report":{"post":{"tags":["DCC Validation"],"summary":"Export a batch report (PDF)","description":"Process a CSV batch and return a PDF compliance report.","operationId":"batch_report_api_dcc_batch_report_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_batch_report_api_dcc_batch_report_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/history":{"get":{"tags":["DCC Validation"],"summary":"List DCC validation history","description":"Get validation history for the authenticated user.","operationId":"get_history_api_dcc_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dcc/stats":{"get":{"tags":["DCC Validation"],"summary":"Compliance statistics","description":"Compliance statistics for the authenticated org.","operationId":"get_stats_api_dcc_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/usage":{"get":{"tags":["DCC Validation"],"summary":"Check remaining DCC quota","description":"Get usage stats for the authenticated org.","operationId":"usage_api_dcc_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dcc/currencies":{"get":{"tags":["DCC Validation"],"summary":"List supported currencies","description":"Get list of supported ECB currencies (no auth required).","operationId":"list_currencies_api_dcc_currencies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyListResponse"}}}}}}},"/health":{"get":{"tags":["Service"],"summary":"Service health","description":"Liveness probe. Reports API status and database connectivity.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"BatchResultSummary":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"processed":{"type":"integer","title":"Processed"},"errors":{"type":"integer","title":"Errors"},"visa_non_compliant":{"type":"integer","title":"Visa Non Compliant"},"mastercard_non_compliant":{"type":"integer","title":"Mastercard Non Compliant"},"results":{"items":{"$ref":"#/components/schemas/DCCValidationResponse"},"type":"array","title":"Results"},"error_details":{"items":{"type":"object"},"type":"array","title":"Error Details"}},"type":"object","required":["total_rows","processed","errors","visa_non_compliant","mastercard_non_compliant","results","error_details"],"title":"BatchResultSummary"},"BatchRowResult":{"properties":{"row":{"type":"integer","title":"Row"},"merchant_name":{"type":"string","title":"Merchant Name"},"descriptor":{"type":"string","title":"Descriptor"},"submitted_mcc":{"type":"string","title":"Submitted Mcc"},"suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Mcc"},"confidence":{"type":"number","title":"Confidence"},"conflict":{"type":"boolean","title":"Conflict"},"risk_level":{"type":"string","title":"Risk Level"},"country":{"type":"string","title":"Country"},"flag_count":{"type":"integer","title":"Flag Count"},"flags":{"items":{"$ref":"#/components/schemas/MCCFlag"},"type":"array","title":"Flags"},"alternatives":{"items":{"$ref":"#/components/schemas/MCCAlternative"},"type":"array","title":"Alternatives"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["row","merchant_name","descriptor","submitted_mcc","suggested_mcc","confidence","conflict","risk_level","country","flag_count","flags","alternatives"],"title":"BatchRowResult"},"BatchSummary":{"properties":{"total":{"type":"integer","title":"Total"},"processed":{"type":"integer","title":"Processed"},"conflicts":{"type":"integer","title":"Conflicts"},"high_risk":{"type":"integer","title":"High Risk"},"by_risk_level":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Risk Level"},"results":{"items":{"$ref":"#/components/schemas/BatchRowResult"},"type":"array","title":"Results"}},"type":"object","required":["total","processed","conflicts","high_risk","by_risk_level","results"],"title":"BatchSummary"},"Body_batch_report_api_dcc_batch_report_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_batch_report_api_dcc_batch_report_post"},"Body_batch_upload_api_mcc_batch_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_batch_upload_api_mcc_batch_upload_post"},"Body_validate_batch_api_dcc_batch_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_validate_batch_api_dcc_batch_post"},"CarrierItem":{"properties":{"mcc":{"type":"string","title":"Mcc"},"carrier_name":{"type":"string","title":"Carrier Name"},"carrier_type":{"type":"string","title":"Carrier Type"},"iata_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iata Code"},"parent_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Mcc"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["mcc","carrier_name","carrier_type","iata_code","parent_mcc","region","active"],"title":"CarrierItem"},"CarriersResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CarrierItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CarriersResponse"},"CurrencyListResponse":{"properties":{"currencies":{"items":{"type":"string"},"type":"array","title":"Currencies"}},"type":"object","required":["currencies"],"title":"CurrencyListResponse"},"DCCValidationRequest":{"properties":{"merchant_name":{"type":"string","maxLength":200,"minLength":1,"title":"Merchant Name"},"terminal_id":{"type":"string","maxLength":50,"minLength":1,"title":"Terminal Id"},"transaction_date":{"type":"string","format":"date","title":"Transaction Date"},"cardholder_currency":{"type":"string","maxLength":3,"minLength":3,"title":"Cardholder Currency"},"merchant_currency":{"type":"string","maxLength":3,"minLength":3,"title":"Merchant Currency"},"transaction_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Transaction Amount"},"offered_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Offered Rate"},"local_amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Local Amount"},"foreign_amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Foreign Amount"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"scheme":{"type":"string","title":"Scheme","default":"both"}},"type":"object","required":["merchant_name","terminal_id","transaction_date","cardholder_currency","merchant_currency","transaction_amount","offered_rate"],"title":"DCCValidationRequest"},"DCCValidationResponse":{"properties":{"id":{"type":"string","title":"Id"},"merchant_name":{"type":"string","title":"Merchant Name"},"terminal_id":{"type":"string","title":"Terminal Id"},"transaction_date":{"type":"string","title":"Transaction Date"},"cardholder_currency":{"type":"string","title":"Cardholder Currency"},"merchant_currency":{"type":"string","title":"Merchant Currency"},"transaction_amount":{"type":"number","title":"Transaction Amount"},"offered_rate":{"type":"number","title":"Offered Rate"},"wholesale_rate":{"type":"number","title":"Wholesale Rate"},"margin_pct":{"type":"number","title":"Margin Pct"},"visa_compliant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Visa Compliant"},"mastercard_compliant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mastercard Compliant"},"flag":{"type":"string","title":"Flag"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"rate_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Date"},"local_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Local Amount"},"foreign_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Foreign Amount"}},"type":"object","required":["id","merchant_name","terminal_id","transaction_date","cardholder_currency","merchant_currency","transaction_amount","offered_rate","wholesale_rate","margin_pct","visa_compliant","mastercard_compliant","flag"],"title":"DCCValidationResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoryItem":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"merchant_name":{"type":"string","title":"Merchant Name"},"descriptor":{"type":"string","title":"Descriptor"},"submitted_mcc":{"type":"string","title":"Submitted Mcc"},"suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Mcc"},"confidence":{"type":"number","title":"Confidence"},"conflict":{"type":"boolean","title":"Conflict"},"risk_level":{"type":"string","title":"Risk Level"},"country":{"type":"string","title":"Country"},"flags":{"items":{"type":"object"},"type":"array","title":"Flags"},"alternatives":{"items":{"type":"object"},"type":"array","title":"Alternatives"},"mandates":{"items":{"$ref":"#/components/schemas/MandateEntry"},"type":"array","title":"Mandates","default":[]}},"type":"object","required":["id","created_at","merchant_name","descriptor","submitted_mcc","suggested_mcc","confidence","conflict","risk_level","country","flags","alternatives"],"title":"HistoryItem"},"HistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HistoryItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"HistoryResponse"},"MCCAlternative":{"properties":{"mcc":{"type":"string","title":"Mcc"},"description":{"type":"string","title":"Description"},"confidence":{"type":"number","title":"Confidence"},"signals":{"items":{"type":"string"},"type":"array","title":"Signals"}},"type":"object","required":["mcc","description","confidence","signals"],"title":"MCCAlternative"},"MCCFlag":{"properties":{"code":{"type":"string","title":"Code"},"scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme"},"severity":{"type":"string","enum":["info","warning","critical"],"title":"Severity"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","severity","message"],"title":"MCCFlag"},"MandateEntry":{"properties":{"id":{"type":"string","title":"Id"},"scheme":{"type":"string","title":"Scheme"},"bulletin_ref":{"type":"string","title":"Bulletin Ref"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"effective_date":{"type":"string","format":"date","title":"Effective Date"},"mccs":{"items":{"type":"string"},"type":"array","title":"Mccs"},"region":{"type":"string","title":"Region"},"category":{"type":"string","title":"Category"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["id","scheme","bulletin_ref","title","summary","effective_date","mccs","region","category","source_url"],"title":"MandateEntry"},"MandateItem":{"properties":{"id":{"type":"string","title":"Id"},"scheme":{"type":"string","title":"Scheme"},"bulletin_ref":{"type":"string","title":"Bulletin Ref"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"effective_date":{"type":"string","format":"date","title":"Effective Date"},"mccs":{"items":{"type":"string"},"type":"array","title":"Mccs"},"region":{"type":"string","title":"Region"},"category":{"type":"string","title":"Category"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","scheme","bulletin_ref","title","summary","effective_date","mccs","region","category","source_url","created_at"],"title":"MandateItem"},"MandatesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MandateItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"MandatesResponse"},"PdfReportRequest":{"properties":{"merchant_name":{"type":"string","title":"Merchant Name"},"descriptor":{"type":"string","title":"Descriptor"},"country":{"type":"string","title":"Country"},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn"},"submitted_mcc":{"type":"string","title":"Submitted Mcc"},"submitted_mcc_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted Mcc Description"},"suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Mcc"},"confidence":{"type":"number","title":"Confidence"},"conflict":{"type":"boolean","title":"Conflict"},"conflict_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conflict Reason"},"risk_level":{"type":"string","title":"Risk Level"},"requires_edd":{"type":"boolean","title":"Requires Edd"},"flags":{"items":{"type":"object"},"type":"array","title":"Flags"},"alternatives":{"items":{"type":"object"},"type":"array","title":"Alternatives"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"carrier_iata_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Iata Code"},"carrier_parent_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Parent Mcc"},"carrier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Type"},"abr_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abr Entity Name"},"abr_abn_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abr Abn Status"}},"type":"object","required":["merchant_name","descriptor","country","submitted_mcc","confidence","conflict","risk_level","requires_edd","flags","alternatives"],"title":"PdfReportRequest"},"QuotaResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"calls_this_month":{"type":"integer","title":"Calls This Month"},"monthly_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Limit"},"calls_remaining_this_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Calls Remaining This Month"},"resets_on":{"type":"string","title":"Resets On"},"calls_today":{"type":"integer","title":"Calls Today"},"daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Limit"},"calls_remaining_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Calls Remaining Today"},"day_resets_on":{"type":"string","title":"Day Resets On"}},"type":"object","required":["plan","calls_this_month","monthly_limit","calls_remaining_this_month","resets_on","calls_today","daily_limit","calls_remaining_today","day_resets_on"],"title":"QuotaResponse"},"SuggestDescriptorResponse":{"properties":{"suggested_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Descriptor"},"suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Mcc"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["suggested_descriptor","suggested_mcc","confidence"],"title":"SuggestDescriptorResponse"},"ValidateRequest":{"properties":{"merchant_name":{"type":"string","title":"Merchant Name","examples":["Woolworths Supermarket Pty Ltd"]},"descriptor":{"type":"string","title":"Descriptor","description":"Payment descriptor / trading name used for MCC matching.","examples":["WOOLWORTHS SUPERMARKET"]},"submitted_mcc":{"type":"string","pattern":"^\\d{4}$","title":"Submitted Mcc","description":"The 4-digit MCC submitted at merchant onboarding.","examples":["5411"]},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number (11 digits). Enables ABR registry lookup.","examples":["88000014675"]},"country":{"type":"string","enum":["AU","NZ","SG","HK","IN","MY","TH"],"title":"Country","description":"Merchant country. Determines which jurisdiction-specific flags apply.","default":"AU"}},"type":"object","required":["merchant_name","descriptor","submitted_mcc"],"title":"ValidateRequest"},"ValidateResponse":{"properties":{"submitted_mcc":{"type":"string","title":"Submitted Mcc"},"submitted_mcc_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted Mcc Description"},"suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Mcc"},"confidence":{"type":"number","title":"Confidence"},"conflict":{"type":"boolean","title":"Conflict"},"conflict_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conflict Reason"},"risk_level":{"type":"string","title":"Risk Level"},"requires_edd":{"type":"boolean","title":"Requires Edd"},"flags":{"items":{"$ref":"#/components/schemas/MCCFlag"},"type":"array","title":"Flags"},"alternatives":{"items":{"$ref":"#/components/schemas/MCCAlternative"},"type":"array","title":"Alternatives"},"abr_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abr Entity Name"},"abr_abn_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abr Abn Status"},"abr_suggested_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abr Suggested Mcc"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"carrier_iata_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Iata Code"},"carrier_parent_mcc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Parent Mcc"},"carrier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Type"}},"type":"object","required":["submitted_mcc","submitted_mcc_description","suggested_mcc","confidence","conflict","conflict_reason","risk_level","requires_edd","flags","alternatives"],"title":"ValidateResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"MCC Classification","description":"Validate a merchant's category code against its descriptor and registry record, suggest a code for an unclassified merchant, and retrieve the scheme mandates that follow from a category."},{"name":"DCC Validation","description":"Check dynamic currency conversion rates against the ECB wholesale rate for the transaction date, and against each scheme's published margin cap. Visa and Mastercard are assessed separately."},{"name":"Service","description":"Operational endpoints. No authentication required."}]}