Make a Payment Through the UI
Let customers complete the payment in your checkout
Create a session, launch the Hosted popup or Embedded widget, then confirm the result. The widget handles payment entry and submission.
Follow the payment stepsIf your server creates the payment without the widget, start with the Payments API guide.
Explore Payments APIBefore you startβ
- Complete merchant onboarding.
- Choose
PAYMENTfor a one-time payment by a guest or wallet customer, orPAYMENT_WITH_WALLETwhen a wallet customer should pay with a saved method. See Widget Modes. - Decide whether to launch the Hosted Experience or Embedded Experience.
Make the paymentβ
1. Create a checkout sessionβ
From your backend, call Create Session with the chosen value in config.modes and the payment details. Follow Create a Session for request fields, authentication, and the response.
Keep the returned checkoutSessionId for Embedded, or hostedUrl for Hosted. Keep the returned session status url for completion checks.
2. Launch the widgetβ
The customer chooses or enters an available payment method and submits the payment in the widget. Available methods and channels depend on your merchant and session configuration.
3. Confirm the outcomeβ
Use the session status URL returned by Create Session to check completion. For Embedded, handle the widget's onSuccess and onError callbacks; see Embedded Experience β callbacks. For Hosted, poll the session status URL as shown in Hosted Experience.
If you need the underlying payment's status or details, use Get Payment by ID when you have the paymentId, or Get Payment by Merchant Transaction ID when you have your merchantTransactionId. See Payment Lifecycle for the meaning of each payment status.
After authorizationβ
If your payment uses an authorization and capture flow, complete it from your backend using Capture a Payment. If the authorized payment should not proceed, use Cancel a Payment. These are separate Payments API operations.
Related documentationβ
- Widget Modes β choose a session mode
- Create a Session β configure and track the session
- Payment Lifecycle β interpret payment status