Payment
Payment record representing a financial transaction for order processing.
Manages payment lifecycle from creation through completion, including amount tracking, currency handling, and payment method processing. Supports multiple payment states and transaction history for comprehensive financial management.
type Payment {
id: ID!
userId: Int
anonymousId: Int
paymentId: String
orderId: Int!
amount: Int!
currency: String!
method: String!
status: PaymentStatuses!
transactions: [Transaction!]
createdAt: DateTime!
createdBy: String
lastModifiedAt: DateTime!
lastModifiedBy: String
}
Fields
Payment.id
● ID!
non-null scalar
Unique system identifier for the payment record.
Primary key used to reference this payment throughout the system and for payment tracking operations.
Payment.userId
● Int
scalar
Authenticated user identifier for the payment.
References the logged-in user who initiated this payment. Used for user-specific payment history and account management. Must be a positive integer when provided.
Payment.anonymousId
● Int
scalar
Anonymous user identifier for guest payments.
References the guest user session for payments made without authentication. Used for guest checkout tracking and order management. Must be a positive integer when provided.
Payment.paymentId
● String
scalar
External payment service provider identifier.
Unique payment reference provided by the Payment Service Provider (PSP) for tracking and reconciliation. Used for payment status updates and transaction matching. Maximum length of 255 characters. Must be unique across all payments.
Payment.orderId
● Int!
non-null scalar
Order identifier associated with this payment.
References the specific order that this payment is intended to fulfill. Used for order-payment relationship tracking and fulfillment processing. Must be a positive integer.
Payment.amount
● Int!
non-null scalar
Payment amount in smallest currency unit (cents).
The total amount to be paid expressed in the smallest denomination of the currency (e.g., cents for USD, pence for GBP). Used for precise financial calculations. Must be a positive integer.
Payment.currency
● String!
non-null scalar
Payment currency code in ISO 4217 format.
Three-letter currency code (e.g., USD, EUR, GBP) following ISO 4217 standard. Used for currency conversion and financial reporting. Must be exactly 3 uppercase letters.
Payment.method
● String!
non-null scalar
Payment method identifier used by the payment processor.
Specific payment method code used by the Payment Service Provider for processing this transaction (e.g., 'credit_card', 'paypal', 'bank_transfer'). Maximum length of 100 characters.
Payment.status
● PaymentStatuses!
non-null enum
Current payment processing status
Payment.transactions
● [Transaction!]
list object
Collection of transactions associated with this payment for detailed financial tracking
Payment.createdAt
● DateTime!
non-null scalar
Timestamp when the payment record was initially created
Payment.createdBy
● String
scalar
Identifier of the user who created the payment record
Payment.lastModifiedAt
● DateTime!
non-null scalar
Timestamp when the payment record was last modified
Payment.lastModifiedBy
● String
scalar
Identifier of the user who last modified the payment record
Returned By
payment
query ● paymentCreate
mutation ● paymentDelete
mutation ● paymentUpdate
mutation
Member Of
PaymentsResponse
object