One-Time Orders
List Completed Orders
Filter by Date Range
Look Up One-Time Order by Your Business Number (orderMerchantExternalId)
Pass the same orderMerchantExternalId you attached at checkout creation.
SDK Example
Subscription Orders
List Active Subscriptions
Filter Canceling Subscriptions
Look Up Subscription Order by Your Business Number (orderMerchantExternalId)
Pass the same orderMerchantExternalId you attached at checkout creation. Every renewal payment that follows inherits the same value, so a single business reference resolves the whole subscription lifecycle.
Which Billing Period a Subscription Is In
The billing period this subscription is in right now, as reported by the payment channel and stored unchanged — Waffo never computes or infers it.1 during the first period, N during the
Nth. 0 means the channel authorized the subscription but has not charged it yet. A failed charge
still advances it, so it is not a count of successful charges. Null until the first channel
notification arrives, and on subscriptions created before this field shipped.
Same concept as the webhook data.periodNumber and Payment.periodNumber, read at a different
anchor — see the field reference. This one moves as the
subscription renews; Payment.periodNumber is frozen to the charge it belongs to.
Payments
List Successful Payments
Filter by Date Range
Look Up Payment by Waffo Payment ID
Look Up Payment by Your Business Number (orderMerchantExternalId)
Pass the same orderMerchantExternalId you attached at checkout creation. Field name mirrors webhook payload data.orderMerchantExternalId.
For subscription orders, every renewal payment inherits the same
orderMerchantExternalId set at checkout. The query above returns the full payment history for the same business reference, ordered by createdAt DESC.Which Billing Period a Charge Paid For
periodNumber is the period that charge belongs to — 1 for the first charge, N for the Nth
renewal — the same value the subscription payment webhook carried for it. A failed charge still
consumes a period, so this is not a count of successful charges. Null on one-time payments and on
payments created before this field shipped.
It is frozen to its charge: a subscription now in period 3 still has periodNumber: 1 on its
first payment. Use SubscriptionOrder.currentPeriodNumber when you want where the subscription is
today.
Aggregations & Sorting
Aggregate Payments by Day
paymentsAggregate returns count plus amount metrics (sum, avg, min, max) over all matching rows, optionally grouped by up to 2 dimensions. Available dimensions: status, currency, payment_method_type, card_brand, store, and the time dimension created_period. granularity (day, week, month, quarter, year; default day) only applies to the time dimension.
Aggregate
amount values are integer strings in minor currency units (e.g. cents). Amounts are summed across whatever rows match the filter, so group or filter by currency when multiple currencies are involved. Groups are sorted by count descending and capped at 100 (isTruncated flags truncation); the top-level count/amount always cover all matching rows. Other entities expose the same shape: refundsAggregate, onetimeOrdersAggregate, subscriptionOrdersAggregate, payoutTicketsAggregate, settlementBatchesAggregate, webhookDeliveriesAggregate, emailDeliveriesAggregate.Sort with orderBy
List queries that support sorting accept orderBy: [XxxOrderBy!] (an enum whitelist), defaulting to created_at DESC. For payments the options are created_at_desc, created_at_asc, amount_desc, amount_asc.
Refunds (executed records)
Refund records (order.refunds) are written after the PSP confirms the refund. They are separate from refund tickets — tickets carry the request lifecycle, refund records carry the executed result.
Look Up Refund by Waffo Refund ID
Refund exposes both business numbers as flat fields (orderMerchantExternalId from the originating order, refundTicketMerchantExternalId from the originating refund ticket) — same naming as the webhook payload.
Refund carries two amounts. amount is a Money object in minor currency units ("4900" for USD 49.00, with display giving "49.00"), while pspAmountDetails.amount is the amount the payment channel actually returned to the buyer, already as a display string ("49.00"). Reconcile against your channel statement with pspAmountDetails; isAmountMismatch is true when the requested and channel amounts differ.Look Up Refunds by Payment (Waffo Payment ID)
Look Up Refunds by Your Business Number
Match by the refund ticket’s business reference (what you attached when creating the refund ticket) — use therefundTicketMerchantExternalId filter: