Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

transactionInitialize Mutation

Initializes a transaction session. It triggers the webhook TRANSACTION_INITIALIZE_SESSION, to the requested paymentGateways. There is a limit of 100 transaction items per checkout / order.

transactionInitialize(action: TransactionFlowStrategyEnum, amount: PositiveDecimal, customerIpAddress: String, id: ID!, idempotencyKey: String, paymentGateway: PaymentGatewayToInitialize!): TransactionInitialize

Returns

TransactionInitialize

Show return type
type TransactionInitialize {
  transaction: TransactionItem
  transactionEvent: TransactionEvent
  data: JSON
  errors: [TransactionInitializeError!]!
}

Arguments

action

action · TransactionFlowStrategyEnum

The expected action called for the transaction. By default, the channel.paymentSettings.defaultTransactionFlowStrategy will be used.The field can be used only by app that has HANDLE_PAYMENTS permission.

amount

amount · PositiveDecimal

The amount requested for initializing the payment gateway. If not provided, the difference between checkout.total - transactions that are already processed will be send.

customerIpAddress

customerIpAddress · String

The customer’s IP address. If not provided Saleor will try to determine the customer’s IP address on its own. The customer’s IP address will be passed to the payment app. The IP should be in ipv4 or ipv6 format. The field can be used only by an app that has HANDLE_PAYMENTS permission.

id

id · ID!

The ID of the checkout or order.

idempotencyKey

idempotencyKey · String

The idempotency key assigned to the action. It will be passed to the payment app to discover potential duplicate actions. If not provided, the default one will be generated. If empty string provided, INVALID error code will be raised.

paymentGateway

paymentGateway · PaymentGatewayToInitialize!

Payment gateway used to initialize the transaction.


Schema: Saleor 3.23.43. Download SDL.

Last updated on April 13, 2026

Was this page helpful?