API version detection and constants for Stripe v1 and v2 APIs.
Key differences between v1 and v2:
API version detection and constants for Stripe v1 and v2 APIs. Key differences between v1 and v2: - Request encoding: v1 uses form-urlencoded, v2 uses JSON - Pagination: v1 uses cursor-based (starting_after), v2 uses URL-based (next_page_url) - Field expansion: v1 uses 'expand' parameter, v2 uses 'include' parameter - Idempotency: v1 has 24h window, v2 has 30d window
(detect-version endpoint)Auto-detect API version from endpoint path.
Returns :v2 for paths starting with '/v2/', otherwise returns :v1. Returns :v1 for nil or empty endpoints.
Examples: (detect-version "/v1/customers") ; => :v1 (detect-version "/v2/core/events") ; => :v2
Auto-detect API version from endpoint path. Returns :v2 for paths starting with '/v2/', otherwise returns :v1. Returns :v1 for nil or empty endpoints. Examples: (detect-version "/v1/customers") ; => :v1 (detect-version "/v2/core/events") ; => :v2
(v1? version)Returns true if the API version is v1.
Returns true if the API version is v1.
(v2? version)Returns true if the API version is v2.
Returns true if the API version is v2.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |