{"openapi":"3.1.0","info":{"title":"Payment Card Numbers","version":"0.1.0","description":"Payment-card number utilities — Luhn validation, network/brand detection, masking, display formatting and Luhn-valid TEST-number generation. Not a fraud or authorization check.","x-guidance":"Payment-card number utilities — Luhn validation, network/brand detection, masking, display formatting and Luhn-valid TEST-number generation. Not a fraud or authorization check. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://creditcard.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/validate":{"post":{"summary":"Validate a card number","description":"Validate a payment-card number: Luhn check-digit test plus network detection and length check. A syntactically valid number that fails Luhn returns `valid:false` (a 200, not an error). Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["validate credit card","luhn check api","credit card validation","payment card validation","card number lookup","check card number"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":40,"description":"Card number; spaces and hyphens are allowed."}},"required":["number"],"additionalProperties":false},"example":{"number":"4111111111111111"}}}},"responses":{"200":{"description":"`{ valid, luhnValid, lengthValid, network, digits }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ valid, luhnValid, lengthValid, network, digits }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Validate a payment-card number: Luhn check-digit test plus network detection and length check. A syntactically valid number that fails Luhn returns `valid:false` (a 200, not an error).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Validate a payment-card number: Luhn check-digit test plus network detection and length check. A syntactically valid number that fails Luhn returns `valid:false` (a 200, not an error).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Validate a payment-card number: Luhn check-digit test plus network detection and length check. A syntactically valid number that fails Luhn returns `valid:false` (a 200, not an error).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/network":{"post":{"summary":"Detect the card network","description":"Detect the issuing network/brand (Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, Maestro) from the card's IIN prefix, with the network's valid lengths. Returns `network:null` for an unrecognized prefix. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["card network lookup","detect card brand","iin lookup api","bin network detection","credit card issuer network","payment card brand"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":40,"description":"Card number; spaces and hyphens are allowed."}},"required":["number"],"additionalProperties":false},"example":{"number":"4111111111111111"}}}},"responses":{"200":{"description":"`{ network, lengths }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ network, lengths }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Detect the issuing network/brand (Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, Maestro) from the card's IIN prefix, with the network's valid lengths. Returns `network:null` for an unrecognized prefix.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Detect the issuing network/brand (Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, Maestro) from the card's IIN prefix, with the network's valid lengths. Returns `network:null` for an unrecognized prefix.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Detect the issuing network/brand (Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, Maestro) from the card's IIN prefix, with the network's valid lengths. Returns `network:null` for an unrecognized prefix.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/mask":{"post":{"summary":"Mask a card number","description":"Mask a card number for display, keeping the first six and last four digits (the PCI-permitted maximum) and replacing the rest with a mask character (default `*`). Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["mask credit card","redact card number","pan masking api","pci card masking","hide credit card digits","payment card redaction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":40,"description":"Card number; spaces and hyphens are allowed."},"maskChar":{"type":"string","minLength":1,"maxLength":1,"description":"Mask character. Default *."}},"required":["number"],"additionalProperties":false},"example":{"number":"4111111111111111","maskChar":"*"}}}},"responses":{"200":{"description":"`{ masked }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ masked }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Mask a card number for display, keeping the first six and last four digits (the PCI-permitted maximum) and replacing the rest with a mask character (default `*`).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Mask a card number for display, keeping the first six and last four digits (the PCI-permitted maximum) and replacing the rest with a mask character (default `*`).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Mask a card number for display, keeping the first six and last four digits (the PCI-permitted maximum) and replacing the rest with a mask character (default `*`).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/format":{"post":{"summary":"Group a card number","description":"Format a card number into the conventional display groups for its network (4-6-5 for Amex, 4-6-4 for 14-digit Diners, otherwise groups of four). Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["format credit card","group card number","card number formatting","format payment card","credit card display groups","pan formatting"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":40,"description":"Card number; spaces and hyphens are allowed."}},"required":["number"],"additionalProperties":false},"example":{"number":"4111111111111111"}}}},"responses":{"200":{"description":"`{ formatted, network }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ formatted, network }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Format a card number into the conventional display groups for its network (4-6-5 for Amex, 4-6-4 for 14-digit Diners, otherwise groups of four).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Format a card number into the conventional display groups for its network (4-6-5 for Amex, 4-6-4 for 14-digit Diners, otherwise groups of four).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Format a card number into the conventional display groups for its network (4-6-5 for Amex, 4-6-4 for 14-digit Diners, otherwise groups of four).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/generate":{"post":{"summary":"Generate a TEST card number","description":"Generate a random Luhn-valid TEST card number for the given network (default Visa). For testing only — these are not issued cards and cannot be charged. The response is always flagged `test:true`. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["generate test card","test credit card number","luhn valid card generator","fake payment card","credit card test data","generate pan number"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"string","enum":["Visa","Mastercard","American Express","Discover","Diners Club","JCB","UnionPay"],"description":"Card network. Default Visa."},"length":{"type":"integer","minimum":12,"maximum":19,"description":"Number length; must be valid for the network."}},"additionalProperties":false},"example":{"network":"Visa","length":16}}}},"responses":{"200":{"description":"`{ number, network, test }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ number, network, test }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a random Luhn-valid TEST card number for the given network (default Visa). For testing only — these are not issued cards and cannot be charged. The response is always flagged `test:true`.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate a random Luhn-valid TEST card number for the given network (default Visa). For testing only — these are not issued cards and cannot be charged. The response is always flagged `test:true`.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a random Luhn-valid TEST card number for the given network (default Visa). For testing only — these are not issued cards and cannot be charged. The response is always flagged `test:true`.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["validation"],"docs":{"homepage":"https://creditcard.openverbs.com","apiReference":"https://creditcard.openverbs.com/openapi.json"}}}