Skip to main content

transactionInitialize

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.

Added in Saleor 3.13
This API is currently in Feature Preview and can be subject to changes at later point.
transactionInitialize(
action: TransactionFlowStrategyEnum
amount: PositiveDecimal
customerIpAddress: String
id: ID!
idempotencyKey: String
paymentGateway: PaymentGatewayToInitialize!
): TransactionInitialize

Arguments

transactionInitialize.action ● TransactionFlowStrategyEnum enum payments

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.

transactionInitialize.amount ● PositiveDecimal scalar miscellaneous

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

transactionInitialize.customerIpAddress ● String scalar miscellaneous

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.

Added in Saleor 3.16

transactionInitialize.id ● ID! non-null scalar miscellaneous

The ID of the checkout or order.

transactionInitialize.idempotencyKey ● String scalar miscellaneous

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.

Added in Saleor 3.14

transactionInitialize.paymentGateway ● PaymentGatewayToInitialize! non-null input payments

Payment gateway used to initialize the transaction.

Type

TransactionInitialize object payments

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.

Added in Saleor 3.13
This API is currently in Feature Preview and can be subject to changes at later point.