{"uid":"cap_xeSLDS2aQr0brU3eGZNKG","slug":"agentshield-luhn-check-digit-0fbc5e6f","name":"AgentShield Luhn Check Digit","description":"Call when an agent needs a generic Luhn check digit for a digit string. Not a card brand and not an account.","url":"https://agentshield.live/luhn?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"2 to 32 digits. Spaces and hyphens allowed. Not a card number lookup."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"known":true,"valid":true,"length":11,"check_digit":"4"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KD8Ru_t3cFG06xu7fwonJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Luhn algorithm check digit for a given digit string (not a card brand lookup or account validation)","exampleAgentPrompt":"Can you calculate the Luhn check digit for the digit string 4532015112830366? I need the raw checksum result, not a card brand lookup.","exampleUseCases":[{"title":"Generating a valid ID number suffix","prompt":"I'm building a synthetic ID generator and need the Luhn check digit for the string 7992739871 — can you compute it for me?"},{"title":"Validating a custom barcode digit","prompt":"What's the Luhn check digit for the digit sequence 123456789012? I need to append it to complete the code."},{"title":"Verifying a loyalty card number format","prompt":"Can you run the Luhn algorithm on the digit string 49927398716 and tell me what check digit it produces?"}],"resultDescription":"Returns the computed Luhn algorithm check digit (a single digit, 0–9) for the submitted digit string. No card brand identification or account lookup is performed — purely the mathematical checksum result.","failureModes":["Input string shorter than 2 digits or longer than 32 digits returns an error","Non-digit characters other than spaces or hyphens cause a validation error","Empty or missing 'code' query parameter returns a 400 bad request","Network timeout or service unavailability returns a 5xx error"],"whenToPreferThis":"Use this endpoint when you need the raw Luhn algorithm check digit computation for any arbitrary digit string — not when you need to validate a specific card brand, look up account details, or use a different checksum algorithm (e.g. Verhoeff, Damm, or mod-97). Prefer this for generic numeric code integrity checks where Luhn (mod-10) is the required standard.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:06:22.367Z","isFirstParty":false,"canonicalSlug":"agentshield-luhn-check-digit-0fbc5e6f"}