Order lifecycle: create, process, capture, refund, cancel, and search.
These endpoints are the Checkout API via Orders, which MercadoPago
documents separately from Checkout Pro. If you want the hosted flow where the
buyer is redirected to MercadoPago, you want Mercadopago.Preference instead —
the similar shape of the two payloads makes them easy to confuse.
Summary
Functions
Cancels an order.
Captures an authorized order.
Creates an order from order_data.
Deprecated alias for create_online/3.
Creates an online order processed in stages (Checkout API via Orders).
Fetches an order by id.
Processes a previously created order.
Refunds an order, fully or partially via refund_data.
Searches orders matching filters (query-string parameters).
Functions
@spec cancel(Mercadopago.Client.t(), Mercadopago.HTTP.id(), keyword()) :: Mercadopago.HTTP.response()
Cancels an order.
@spec capture(Mercadopago.Client.t(), Mercadopago.HTTP.id(), keyword()) :: Mercadopago.HTTP.response()
Captures an authorized order.
@spec create(Mercadopago.Client.t(), map(), keyword()) :: Mercadopago.HTTP.response()
Creates an order from order_data.
@spec create_checkout_pro(Mercadopago.Client.t(), map(), keyword()) :: Mercadopago.HTTP.response()
Deprecated alias for create_online/3.
The name is inherited from the Ruby SDK but is a misnomer: POST /v1/orders
with type: "online" is the Checkout API (via Orders), which MercadoPago
documents separately from Checkout Pro. Checkout Pro lives in
Mercadopago.Preference.
@spec create_online(Mercadopago.Client.t(), map(), keyword()) :: Mercadopago.HTTP.response()
Creates an online order processed in stages (Checkout API via Orders).
Convenience wrapper over create/3 that applies the two-step defaults:
type "online" and processing_mode "manual" when omitted. Follow it with
process/3 to settle the order. If those fields are provided (atom or string
key), they must already match this flow; otherwise an ArgumentError is raised.
This is not Checkout Pro. For the hosted Checkout Pro flow, create a payment
preference with Mercadopago.Preference.create/3 instead.
@spec get(Mercadopago.Client.t(), Mercadopago.HTTP.id(), keyword()) :: Mercadopago.HTTP.response()
Fetches an order by id.
@spec process(Mercadopago.Client.t(), Mercadopago.HTTP.id(), keyword()) :: Mercadopago.HTTP.response()
Processes a previously created order.
@spec refund(Mercadopago.Client.t(), Mercadopago.HTTP.id(), map() | nil, keyword()) :: Mercadopago.HTTP.response()
Refunds an order, fully or partially via refund_data.
@spec search(Mercadopago.Client.t(), map() | nil, keyword()) :: Mercadopago.HTTP.response()
Searches orders matching filters (query-string parameters).