For the complete documentation index, see llms.txt. This page is also available as Markdown.

getPayment

Fetch a payment by id or token.

Arguments

Argument
Description

id (ID)

token (ID)

Return fields

amountCents (Int!)

Payment amount in cents.

amountWithSymbol (String!)

Payment amount with currency symbol.

createdAt (ISO8601DateTime!)

When the payment record was first created.

currency (String)

Payment currency

failureReason (PaymentFailureReasonEnum)

Why the payment failed. Null when the payment did not fail or when no specific reason is available.

id (ID!)

The database ID of the payment.

invoice (Invoice)

The invoice associated with this payment. The original payment and all its retry attempts are associated with one invoice.

originalPayment (Payment!)

The original payment in this retry chain. Returns this payment when it is not a retry attempt.

paymentId (ID)

The external payment reference from the payment service provider.

paymentStatus (PaymentStatusEnum!)

Status of the payment.

paymentType (PaymentTypeEnum!)

The type of transaction that this payment represents

refunds ([Refund!])

The refunds for this payment.

retriedPayment (Payment)

The original payment this retry attempt belongs to. Null when this payment is not a retry attempt.

retryAttempts ([Payment!]!)

All retry attempts for this original payment, ordered from oldest to newest.

retryPaymentUrl (String)

Send your customer to this URL to allow them to retry the failed payment. Append ?return_url=https://your-url to send the customer back after a successful payment.

status (String)

Deprecated: Use the 'payment_status' field instead.

subscription (Subscription)

The subscription associated with this payment.

token (ID!)

Token to identify the payment with

updatedAt (ISO8601DateTime!)

When the payment record was last updated.

Last updated

Was this helpful?