Skip to Content

CartPaymentMethod

Describes a cart payment method, including its type, status, fees, and additional information.

Type Definition

type CartPaymentMethod { type: String title: String status: String isPaid: Boolean currency: Currency info: String description: String fee: Float netFee: Float tax: Float paidAmount: Float rate: Float ratePercentage: Float giftCard: GiftCard }

Fields

FieldTypeNullableDescriptionRelationship
typeStringYesReturns the type of the payment method.
titleStringYesReturns the title of the payment method.
statusStringYesReturns the status of the payment method.
isPaidBooleanYesReturns true if this payment method status is paid.
currencyCurrencyYesReturns the payment method currency. See Currency for details.Related to Currency
infoStringYesReturns additional information about the payment method.
descriptionStringYesReturns the payment method description.
feeFloatYesReturns the payment fee in the customer’s currency.
netFeeFloatYesReturns the payment fee without tax in the customer’s currency.
taxFloatYesReturns the tax amount in the customer’s currency.
paidAmountFloatYesReturns the paid amount in the customer’s currency.
rateFloatYesReturns the tax rate in decimals (e.g., 0.20 for 20%).
ratePercentageFloatYesReturns the tax rate as a percentage (e.g., 20 for 20%).
giftCardGiftCardYesIf the payment method type is gift_card, returns a GiftCard object with information about the gift card used.Related to GiftCard

Relationships

  • currency: Links to the Currency object type, representing the currency used for the payment method. This allows querying currency code, symbol, and formatting details.
  • giftCard: When the payment method type is gift_card, this field links to the GiftCard object type, providing detailed information about the gift card used for payment.

Usage Examples

Basic Query

Fetch basic details about a cart payment method including its type, status, and payment state:

{ cartPaymentMethod { type title status isPaid } }

Field Selection

Retrieve detailed financial information about the payment method including fees, taxes, and paid amount:

{ cartPaymentMethod { fee netFee tax paidAmount rate ratePercentage } }

Nested Queries

Access nested related objects such as the currency details and gift card information (if applicable):

{ cartPaymentMethod { currency { code symbol name } giftCard { id balance lastCharacters expiryDate } } }

Filtering and Sorting

While CartPaymentMethod itself does not support direct filtering or sorting fields, it is typically part of larger queries (e.g., cart or order queries) where filtering and sorting can be applied on those parent objects.

Example: Querying multiple payment methods within a cart and sorting them by status (assuming the parent query supports it):

{ cart(id: 12345) { paymentMethods(sortBy: STATUS_ASC) { type status isPaid } } }

Implements

This type does not implement any interfaces.

Connections

CartPaymentMethod is commonly connected to cart or order objects as part of their payment details. It references related types:

  • Currency — for currency information
  • GiftCard — for gift card payment details when applicable
  • Currency: Represents currency details such as code, symbol, and formatting.
  • GiftCard: Represents gift card details including balance and expiry.

Best Practices

  • Always check the isPaid field to confirm if the payment method has been successfully paid.
  • Use the currency field to format monetary values correctly in your UI.
  • When handling gift card payments, access the giftCard field to display relevant gift card information securely.
  • Avoid querying all fields if only a subset is needed to reduce response size and improve performance.
  • Use nested queries to fetch related objects in a single request, minimizing round-trips.

Notes

  • All fields in CartPaymentMethod are optional and may return null if data is not available.
  • Monetary fields (fee, netFee, tax, paidAmount) are returned in the customer’s currency as indicated by the currency field.
  • Tax rates are provided both as decimal (rate) and percentage (ratePercentage) for flexibility.
  • The giftCard field is only populated when the payment method type is gift_card.
  • This API currently requires no authentication; however, this may change in future versions. Ensure your implementation can handle authentication if introduced later.
  • Consider caching payment method data carefully, especially if payment status or fees may change during the checkout process. Always fetch fresh data before finalizing orders.
Last updated on