π Checkout
Create Payment Intent
There are currently two methods for applying a guest payment method to a cartβ¦
Before submitting your cart, you can use the cartCreatePaymentIntent mutation. This payment intent tracks the total amount that needs to be paid. It will be updated when the user adds or removes products or when shipping methods are updated. The payment can be completed using Apple Pay, Google Pay, or the Stripe Link UI.
After creating the payment intent, the response provides the updated Cart with the associated payment intent details.
Input Parameters for cartCreatePaymentIntent
id
: The ID of the cart for which you want to create a payment intent.
Example:
Types
Cart
- Contains details about the cart, including items, addresses, payment intent details, and other relevant information. You can refer to the Cart type in the schema for a complete list of fields and their descriptions.
PaymentIntent
- Contains details about the payment intent:
id
: The unique identifier for the payment intent.clientSecret
: A secret string used to complete the payment on the client side.externalId
: An external identifier for the payment intent, typically provided by the payment gateway.
You can refer to the PaymentIntent type in the schema for more details.