TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akibanks/tienda_musica_web/llms.txt
Use this file to discover all available pages before exploring further.
/checkout endpoint is the final step in the VinylVibes purchase flow. It receives the cart items and shipping address from the frontend and creates a sale record in the backend. Prices are calculated server-side — the frontend does not send prices. Authentication is always required; unauthenticated requests are rejected immediately with a 401 response.
POST /checkout
Authentication: Required —Authorization: Bearer <token>
Creates a new order from the current cart contents and shipping address. On success, the backend returns the new order ID and a confirmation message.
Request Body
Array of cart items to purchase. Each element must include the Discogs release ID and the quantity ordered. Prices are not included — the backend looks them up server-side.
Shipping address for the order. All fields except
numero_int and referencias are required.Request Example
cURL Example
Responses
200 — SuccessAfter a successful checkout, the frontend clears
vv_carrito from localStorage and shows a success toast notification. The new order appears in GET /mis-compras immediately.How the Frontend Calls This Endpoint
The following code is taken directly fromscript.js (procesarPago function). Each item includes discogs_id, titulo, artista, cantidad, and precio. The shipping address object (_datosEnvio) is built from the form and uses the field names shown above.
items for a cart checkout is constructed as:
_datosEnvio is assembled from the shipping form as: