{"openapi":"3.1.0","info":{"title":"Credit Card API","version":"1.0.0","description":"A fast, fully-local payment-card toolkit: validate card numbers with the Luhn (mod-10) checksum, detect the brand by IIN/prefix (Visa, Mastercard including the 2-series, American Express, Discover, Diners, JCB, UnionPay, Maestro), format and mask numbers with brand-correct grouping, list supported brands with their valid lengths and CVV length, and generate synthetic Luhn-valid TEST card numbers for QA. Pure server-side compute, no third-party upstream, and inputs are never logged. It is algorithmic only (no real issuer/bank BIN-database lookup). Ideal for checkout forms, payment flows, fraud pre-checks and test fixtures.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/creditcard-api","description":"oanor gateway"}],"tags":[{"name":"Card"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/brands":{"get":{"operationId":"get_v1_brands","tags":["Card"],"summary":"List supported brands","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"brands":[{"brand":"amex","lengths":[15],"cvv_length":4},{"brand":"diners","lengths":[14,16,19],"cvv_length":3},{"brand":"jcb","lengths":[16,17,18,19],"cvv_length":3},{"brand":"discover","lengths":[16,17,18,19],"cvv_length":3},{"brand":"unionpay","lengths":[16,17,18,19],"cvv_length":3},{"brand":"mastercard","lengths":[16],"cvv_length":3},{"brand":"maestro","lengths":[12,13,14,15,16,17,18,19],"cvv_length":3},{"brand":"visa","lengths":[13,16,19],"cvv_length":3}]},"meta":{"timestamp":"2026-05-30T09:00:24.740Z","request_id":"7276e917-e896-4912-a99d-f450aa4ddbf5"},"status":"ok","message":"Brands listed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/format":{"get":{"operationId":"get_v1_format","tags":["Card"],"summary":"Format a card number","description":"","parameters":[{"name":"number","in":"query","required":true,"description":"Card number","schema":{"type":"string"},"example":"378282246310005"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"brand":"amex","masked":"378282*****0005","formatted":"3782 822463 10005"},"meta":{"timestamp":"2026-05-30T09:00:24.816Z","request_id":"2217da31-78b1-444b-98cc-62214fb0bbbd"},"status":"ok","message":"Card formatted","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/generate":{"get":{"operationId":"get_v1_generate","tags":["Card"],"summary":"Generate Luhn-valid TEST numbers","description":"","parameters":[{"name":"brand","in":"query","required":false,"description":"visa, mastercard, amex, discover, diners, jcb, unionpay, maestro","schema":{"type":"string"},"example":"visa"},{"name":"count","in":"query","required":false,"description":"How many 1-50","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Synthetic Luhn-valid test numbers for QA only — not real accounts.","brand":"visa","cards":[{"number":"4590132852799427","formatted":"4590 1328 5279 9427"}],"count":1,"length":16},"meta":{"timestamp":"2026-05-30T09:00:24.887Z","request_id":"39ffb992-7f1d-4a5f-98fb-037c8ebf475a"},"status":"ok","message":"Test cards generated","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/validate":{"get":{"operationId":"get_v1_validate","tags":["Card"],"summary":"Validate a card number","description":"","parameters":[{"name":"number","in":"query","required":true,"description":"Card number (spaces/dashes ok)","schema":{"type":"string"},"example":"4111111111111111"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"brand":"visa","valid":true,"length":16,"formatted":"4111 1111 1111 1111","cvv_length":3,"luhn_valid":true,"length_valid":true,"number_masked":"411111******1111"},"meta":{"timestamp":"2026-05-30T09:00:24.956Z","request_id":"5ca0940a-7df7-4ee7-bae8-4c0ef88cbde4"},"status":"ok","message":"Card validated","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":5000,"rps_limit":2,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":700,"monthly_call_quota":100000,"rps_limit":12,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":700000,"rps_limit":40,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6900,"monthly_call_quota":4000000,"rps_limit":150,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/creditcard-api"}