Quickstart

Read a real finished order in one call.

This order is a finished case from the live sandbox: a careless agent bought shoes in size 10.5 when the shopper signed for 10. The money had already been captured when the shopper pressed Undo. The fault check found the agent at fault, so the shopper got a full refund and the agent's operator paid the merchant back through PayPal Payouts.

Read the order

curl
curl -s https://undo-1c56.onrender.com/api/orders/edd288bc-42d0-41d3-9b87-14915f3ff2c6
TypeScript
import { UndoApiClient } from "undo-api";

const client = new UndoApiClient();
const { order, undoWindow, chain } = await client.orders.getOrder({
  orderId: "edd288bc-42d0-41d3-9b87-14915f3ff2c6",
});

console.log(order.status, order.amount); // REFUNDED 116.97
console.log(chain.intact, chain.events.length); // true 12
Python
from undo_api import UndoApiClient

view = UndoApiClient().orders.get_order("edd288bc-42d0-41d3-9b87-14915f3ff2c6")
print(view.order.status, view.order.amount)  # REFUNDED 116.97
print(view.chain.intact, len(view.chain.events))  # True 12

What comes back

FieldWhat it tells you
order.statusWhere the purchase stands. AUTHORIZED means the money is only held and Undo is a free void.
order.paypalThe PayPal order, authorization and capture ids behind it.
order.resolutionThe verdict, the evidence, what happened to the money, and any payout from the agent's operator.
undoWindowHow long the window is, why, and whether it's still open.
chain.eventsEvery step, oldest first. Each one carries a proof saying how it was decided and which PayPal call backs it.

Next

On this page