Skip to content

Retrieval and listing

Use GET /v1/payments/{paymentId} for authoritative status. For support operations, use GET /v1/payments with published filters and process every page until the cursor is exhausted; treat the cursor as ephemeral and do not assume the first page contains everything.

import { createTimbroPayments } from "@timbro/payments";
const secretKey = process.env.TIMBRO_PAYMENTS_SECRET_KEY;
if (!secretKey) throw new Error("Missing TIMBRO_PAYMENTS_SECRET_KEY");
const timbro = createTimbroPayments({ secretKey });
const payment = await timbro.payments.retrieve("payment_123");

After a timeout or lost response, query the same reference and environment. Do not create another payment to “see what happened.”

Webhooks only accelerate notification. Deduplicate by event identifier, tolerate out-of-order delivery, and retrieve the resource before closing an order.