Alokai

HandlePaymentProperties

Properties for handling the payment flow across Stripe and commercetools platforms.

export interface HandlePaymentProperties {
	buildReturnUrl?: (order: PaymentAndOrder['order']) => string;
	cartId: string;
	elements: StripeElements;
}

Properties

NameRequiredTypeDescription
buildReturnUrlOptional(order: PaymentAndOrder['order']) => stringCallback for building a custom return url for the payment flow.
cartIdRequiredstringID of the cart to handle the payment flow for.
elementsRequiredStripeElementsAn instance of Stripe Elements object. The param is optional because the handlePayment() method uses a copy of the object saved to the SDK context by the mountPaymentElement() method.

Referenced Types

  • PaymentAndOrder
  • StripeElements

On this page