🔒 Embedded Checkout#
📷 Product Diagram#
📝 Overview#
This is an SDK designed to integrate UseePay’s embedded checkout experience. It allows developers to easily and securely accept subscription payments.
💳 Supported Payment Methods#
(Refer to the official documentation for the latest list.)
🚀 Quick Start#
Create a PaymentIntent#
On your server, create a PaymentIntent to manage the full lifecycle of the customer’s payment.
In the response, return the clientSecret and id. These will be used on the frontend to complete the payment.
Click to view API docs
1. Include UseePay SDK:#
2. Verify SDK Availability:#
3. Initialize UseePay with your OpenAPI Public Key:#
🧠 Note:
You do not need to manually specify whether you’re using sandbox or production.
UseePay SDK will automatically detect the environment based on the prefix of your public key:
4. Initialize UseePay Elements:#
5. Create the Payment Element:#
6. Mount the Element to the DOM:#
7. Confirm the Payment:#
🔍 Parameters#
| Parameter | Type | Description |
|---|
paymentIntent | Object | The resulting payment intent |
error | Object | Error object if any occurs |
error Object#
| Field | Type | Description |
|---|
| type | String | Type of error |
Possible error.type Values#
| Value | Description |
|---|
no_select_payment_method | No payment method selected |
validation_error | Form validation error |
✅ Payment Status#
If you’ve followed all the steps above — congratulations!
You’ve successfully integrated the UseePay Embedded Subscription Checkout.🎉 Tips#
If you want to use a specific payment method, you should set payment_method_types when creating the paymentIntent.Video Demo#