One-Time Orders
List Completed Orders
query($storeId: String!) {
onetimeOrders(
storeId: $storeId
filter: { status: { eq: "paid" } }
limit: 50
) {
id
buyerEmail
currency
priceSnapshot {
currency
subtotal
taxAmount
total
taxCategory
}
status
createdAt
}
onetimeOrdersCount(storeId: $storeId)
}
Variables:
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx" }
Filter by Date Range
query($storeId: String!) {
onetimeOrders(
storeId: $storeId
filter: {
createdAt: {
gte: "2026-01-01T00:00:00.000Z"
lte: "2026-03-31T23:59:59.999Z"
}
}
) {
id
buyerEmail
status
createdAt
}
}
Look Up One-Time Order by Your Business Number (orderMerchantExternalId)
Pass the same orderMerchantExternalId you attached at checkout creation.
query($storeId: String!, $ref: String!) {
onetimeOrders(
storeId: $storeId
filter: { orderMerchantExternalId: { eq: $ref } }
) {
id
buyerEmail
status
orderMerchantExternalId
createdAt
}
}
Variables:
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx", "ref": "ORDER-2026-00891" }
SDK Example
const result = await client.graphql.query<{
onetimeOrders: Array<{
id: string;
buyerEmail: string;
priceSnapshot: { total: number; currency: string };
status: string;
}>;
}>({
query: `query($storeId: String!) {
onetimeOrders(storeId: $storeId, filter: { status: { eq: "paid" } }) {
id buyerEmail priceSnapshot { total currency } status
}
}`,
variables: { storeId: "STO_3bVzrkD0FJjFdZNLk8Ualx" },
});
Subscription Orders
List Active Subscriptions
query($storeId: String!) {
subscriptionOrders(
storeId: $storeId
filter: { status: { in: ["active", "trialing"] } }
) {
id
buyerEmail
status
billingPeriod
createdAt
}
subscriptionOrdersCount(storeId: $storeId)
}
Filter Canceling Subscriptions
query($storeId: String!) {
subscriptionOrders(
storeId: $storeId
filter: { status: { eq: "canceling" } }
) {
id
buyerEmail
status
createdAt
}
}
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.
query($storeId: String!, $ref: String!) {
subscriptionOrders(
storeId: $storeId
filter: { orderMerchantExternalId: { eq: $ref } }
) {
id
buyerEmail
status
billingPeriod
orderMerchantExternalId
createdAt
}
}
Variables:
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx", "ref": "SUB-2026-01045" }
Payments
List Successful Payments
query {
payments(
filter: { status: { eq: "succeeded" } }
limit: 100
) {
id
orderId
status
refundStatus
snapshotAmountDetails {
subtotal
taxAmount
total
currency
}
createdAt
}
paymentsCount(filter: { status: { eq: "succeeded" } })
}
Filter by Date Range
query {
payments(
filter: {
status: { eq: "succeeded" }
createdAt: {
gte: "2026-01-01T00:00:00.000Z"
lte: "2026-03-31T23:59:59.999Z"
}
}
) {
id
orderId
snapshotAmountDetails {
subtotal
taxAmount
total
currency
}
createdAt
}
}
Look Up Payment by Waffo Payment ID
query($paymentId: String!) {
payment(id: $paymentId) {
id
orderId
status
refundStatus
orderMerchantExternalId
snapshotAmountDetails { total currency }
}
}
Variables:
{ "paymentId": "PAY_6eYCunG3IMmIgcQOnaXdoA" }
Look Up Payment by Your Business Number (orderMerchantExternalId)
Pass the same orderMerchantExternalId you attached at checkout creation. Field name mirrors webhook payload data.orderMerchantExternalId.
query($ref: String!) {
payments(filter: { orderMerchantExternalId: { eq: $ref } }) {
id
orderId
status
refundStatus
orderMerchantExternalId
createdAt
}
}
Variables:
{ "ref": "ORDER-2026-00891" }
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.
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.
query($refundId: String!) {
refund(id: $refundId) {
id
paymentId
ticketId
status
orderMerchantExternalId
refundTicketMerchantExternalId
pspAmountDetails { amount currency }
createdAt
}
}
Variables:
{ "refundId": "RFD_8aHbCcDdEeFfGgHhIiJjKk" }
Look Up Refunds by Payment (Waffo Payment ID)
query($paymentId: String!) {
refunds(filter: { paymentId: { eq: $paymentId } }) {
id
status
orderMerchantExternalId
refundTicketMerchantExternalId
pspAmountDetails { amount currency }
createdAt
}
}
Look Up Refunds by Your Business Number
Match by the refund ticket’s business reference (what you attached when creating the refund ticket) — use the refundTicketMerchantExternalId filter:
query($ref: String!) {
refunds(filter: { refundTicketMerchantExternalId: { eq: $ref } }) {
id
paymentId
ticketId
status
orderMerchantExternalId
refundTicketMerchantExternalId
pspAmountDetails { amount currency }
createdAt
}
}
Or match by the order’s business reference (returns all refunds against any payment carrying that reference, useful for subscription renewals) — filter at the payment layer and read its nested refunds:
query($paymentRef: String!) {
payments(filter: { orderMerchantExternalId: { eq: $paymentRef } }) {
id
orderMerchantExternalId
refunds {
id
status
refundTicketMerchantExternalId
pspAmountDetails { amount currency }
createdAt
}
}
}
Refund Tickets
List All Refund Tickets
query {
refundTickets {
id
paymentId
status
requestedAmount
reason
createdAt
}
refundTicketsCount
}
Filter Pending Refunds
query {
refundTickets(filter: { status: { eq: "pending" } }) {
id
paymentId
requestedAmount
reason
createdAt
}
}
Refunds for a Specific Payment
query($paymentId: String!) {
refundTickets(filter: { subjectId: { eq: $paymentId } }) {
id
status
refundTicketMerchantExternalId
versionData {
reason
requestedAmount { amount currency }
}
createdAt
}
}
Variables:
{ "paymentId": "PAY_6eYCunG3IMmIgcQOnaXdoA" }
Look Up Refund Tickets by Your Business Number (refundTicketMerchantExternalId)
query($ref: String!) {
refundTickets(filter: { refundTicketMerchantExternalId: { eq: $ref } }) {
id
status
refundTicketMerchantExternalId
versionData {
reason
requestedAmount { amount currency }
}
reviewNote
rejectReason
executedAt
createdAt
}
}
Variables:
{ "ref": "REF-2026-00891" }
RefundTicket (the request) and Refund (the executed record) are two different GraphQL types, but their business-side identifiers share the same flat names as the webhook payload: refundTicketMerchantExternalId on both RefundTicket and Refund; orderMerchantExternalId is additionally exposed on Refund (inherited from the originating order). Webhook payloads carry the same two values as data.orderMerchantExternalId and data.refundTicketMerchantExternalId.
Checkout Sessions
Query Session Details
query($sessionId: ID!) {
checkoutSession(id: $sessionId) {
id
productType
currency
status
expiresAt
createdAt
}
}
Variables:
{ "sessionId": "cs_550e8400-e29b-41d4-a716-446655440000" }