Maps Stripe ID prefixes to API endpoints and validates ID format.
// Source: https://github.com/stripe/stripe-cli | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package requests
import "regexp"
var idURLMap = map[string]string{
"acct": "/v1/accounts/",
"ch": "/v1/charges/",
"cn": "/v1/credit_notes/",
"cs": "/v1/checkout/sessions/",
"cus": "/v1/customers/",
"dp": "/v1/disputes/",
"evt": "/v1/events/",
"fee": "/v1/application_fees/",
"file": "/v1/files/",
"iauth": "/v1/issuing/authorizations/",
"ic": "/v1/issuing/cards/",
"ich": "/v1/issuing/cardholders/",
"idp": "/v1/issuing/disputes/",
"ii": "/v1/invoiceitems/",
"in": "/v1/invoices/",
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key