Payment intents

A payment intent represents your intent to take a payment from a customer on your checkout page. A payment intent is associated with a single shopping cart or an individual customer shopping session during the checkout phase. For example, you create a payment intent for a customer's online order. When you create a payment intent, you must include the payment amount and the currency type.

The following procedure is a high-level overview of how to create and confirm a payment intent.

  1. Use your hosted checkout - payment credentials to send a POST request to the /v1/payment-intents endpoint of the payment intents API to create a payment intent.

  2. Send a POST request to the v1/payment-methods endpoint of the payment methods API to create a payment method to attach to the payment intent. This returns a PaymentMethodResponse.

  3. Confirm the payment intent by invoking the confirmIntent SDK function or send a POST request to the /v1/payment-intents/{paymentIntentId}/confirm endpoint of the payment intents API.