CreatePaymentInput
Payment creation data including transaction details and payment method information.
Contains all necessary information to create a payment record including amounts, payment method, and optional transaction data. All monetary amounts must be expressed in the smallest currency unit (cents) for precision.
input CreatePaymentInput {
userId: Int
anonymousId: Int
paymentId: String
orderId: Int!
amount: Int!
currency: String!
method: String!
status: PaymentStatuses!
addTransaction: CreateTransactionInput
}
Fields
CreatePaymentInput.userId
● Int
scalar
Authenticated user identifier for payment attribution and history tracking.
Links the payment to a specific authenticated user for user-specific payment history and account management. Must be a positive integer when provided.
CreatePaymentInput.anonymousId
● Int
scalar
Anonymous user session identifier for guest checkout 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.
CreatePaymentInput.paymentId
● String
scalar
External payment identifier provided by the payment service provider for tracking.
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.
CreatePaymentInput.orderId
● Int!
non-null scalar
Order identifier that this payment is intended to fulfill.
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.
CreatePaymentInput.amount
● Int!
non-null scalar
Payment amount in smallest currency unit (cents) for precise financial calculations.
The total amount to be paid expressed in the smallest denomination of the currency (e.g., cents for USD, pence for GBP). Must be a positive integer for precise financial calculations.
CreatePaymentInput.currency
● String!
non-null scalar
ISO 4217 three-letter currency code for international financial transactions.
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.
CreatePaymentInput.method
● String!
non-null scalar
Payment method code used by the payment service provider for transaction processing.
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.
CreatePaymentInput.status
● PaymentStatuses!
non-null enum
Initial payment processing status for the new payment record.
Sets the starting status for the payment lifecycle. Determines the initial state and available actions for the payment processing workflow.
CreatePaymentInput.addTransaction
● CreateTransactionInput
input
Optional transaction to create alongside the payment for immediate processing.
When provided, creates an associated transaction record with the payment for immediate processing and tracking. Enables atomic creation of payment and initial transaction in a single operation.
Member Of
paymentCreate
mutation