Scope
Commerce APIs cover checkout initiation/verification, catalog reads, marketplace listings, KYC session helpers, and balance-aware purchase flows.Endpoint map
- Checkout:
/api/checkout/crypto,/api/checkout/crypto/verify,/api/checkout/dsports-cash.POST /api/checkout/crypto/verifyconfirms pack purchases.PUT /api/packs/{id}/purchaseis410 GONE. - Cash balance:
/api/dsports-cash,/api/dsports-cash/ledger - Public reads:
/api/commerce,/api/packs/{id}/odds,/api/v1/product_entitlement_mapping - Authenticated rate:
GET /api/v1/exchange-rate— CHF ↔ D-Sports Cash for the mobile buy sheet. Requires a Clerk session (401without one). - Catalog:
/api/products(retired Frontline Pack / Frontline Pass rows are hidden even if they remain in the database) - Revenue webhooks (platform integration):
/api/webhooks/revenuecat - Card provenance:
GET /api/v1/cards/{id}/provenance(public; in OpenAPI) - Marketplace:
/api/v1/marketplace/*— published in OpenAPI (Marketplacetag). Use the Endpoints playground for request/response shapes. - Listing PIN:
POST /api/v1/user/set-pin,POST /api/v1/user/verify-pin(returns a short-livedX-Listing-Pin-Token;404 PIN_NOT_SETuntil set) - KYC:
POST /api/v1/kyc/link-token,POST /api/v1/kyc/session/complete,GET /api/v1/user/kyc-status(KYCtag)
Marketplace notes
- Prefer
GET /api/v1/marketplace/me/listings.GET /api/v1/marketplace/listings/mineis a native alias for the same handler. POST /api/v1/marketplace/listingsrequiresx-listing-pin-token. Invalid or missing proof returns401 PIN_TOKEN_INVALID.- Listing a pack that is still
processingreturns409with codePACK_NOT_LISTABLE. - An already-opened pack returns
409with codePACK_ALREADY_OPENED. - Pack-instance status on
GET /api/user/packsis authoritative. Do not use templateisOpenableas a substitute. - Auction listings accept optional
reservePrice(positive integer, at least the starting bid). Ended auctions that miss reserve surface asended-reserve-not-met. - Featured listings (
GET /api/v1/marketplace/featured) are cacheable and public. Team promos areGET /api/v1/marketplace/promos. There is no combined shop featured feed. - List and detail GETs (
/marketplace,/listings, listing by id, collectible listings, listing bids,top-bids) accept an optional Bearer token and personalize when a session is present.featuredandprice-suggestionstay public-only. - Staff-only
POST /featuredandPOST /promosare not in generated OpenAPI.
KYC notes
- These are authenticated session helpers only. They do not expose vendor dashboard URLs or webhook secrets.
POST /api/v1/kyc/link-tokenaccepts optional{ retry }. A retry with no prior session returns404.POST /api/v1/kyc/session/completerequires{ identityVerificationId }and optionallinkSessionId.GET /api/v1/user/kyc-statusreturns{ status, verifiedAt, identityVerificationId }.
Integration notes
- Payment verification flows should be treated as asynchronous and failure-prone.
- Use explicit item identifiers and quantity validation before checkout submission.
