Query payment history
This query returns payments for one subscription, their original payment and retry attempts, and the associated invoice:hasNextPage is true, pass endCursor as after to retrieve the next page.
Follow retries
originalPaymentreturns the original payment, or the current payment itself when it is not a retry.retriedPaymentreturns the original payment for a retry; it is null for an original payment.- Query
retryAttemptson the original payment to get its attempts from oldest to newest. paymentIdis the payment provider’s reference, whileididentifies the Firmhouse payment.
originalPayment.id when reconciling a payment chain, rather than treating every retry as a separate invoice. Use each attempt’s status to distinguish successful charges from failed or pending attempts.
Read chargeback timestamps
paidAt remains available after an invoice is charged back. chargedBackAt records the most recent chargeback transition; it is not a full chargeback event history. Read invoiceStatus for the invoice’s current status and consult your payment provider for the chargeback reason.
An invoice or timestamp can be null when it does not apply to the payment.
Read Shopify line attributes
Shopify invoice line items can includeshopify_custom_attributes inside their metadata JSON. These are the originating Shopify order line’s custom attributes, useful for preserving external fulfillment or accounting references.
For example: