TEST SERVER

How can we help?

checkout

payments_checkout(
    Order $order
)

This action is called when a user starts the checkout process. All information is passed as part of the $order.

All instance properties are read-only.

The Order instance has the following properties:

  • id: The ID of the order (same as the payment intent).
  • email: The customer email.
  • cart: The cart serialized as an array (see below)

Note that customer_id and user_id are not set yet.

The cart is a ShoppingCart instance with the following (at least):

  • get_items(): Getter for the cart items
  • metadata: An associative array of metadata for the cart, e.g. payment ID, subscription ID, etc.

The get_items() returns an array of CartItem instances with the following properties:

  • price: The Stripe Price object.
  • product: The Stripe Product object.
  • quantity: The item quantity.
  • metadata: The metadata of the item itself, e.g. payment item ID, subscription item ID, etc.