Routes
Every endpoint Merx registers, with its parameters and an example response.
- GET shop/cart Returns the visitor’s cart.
- POST shop/cart Adds an item to the cart.
- PATCH shop/cart Changes the quantity or data of an item in the cart.
- DELETE shop/cart Removes an item from the cart.
- POST shop/checkout Validates the submitted data and starts the payment.
- POST shop/hooks/stripe Receives Stripe webhooks and marks delayed payments as paid.
- GET shop/stripe-client-secret Creates a Stripe payment intent for the current cart and returns its client secret.
- GET shop/success Completes the payment after the provider sends the customer back, and writes the order page.