UseePay API
  1. Embedded Checkout
UseePay API
  • Introduction
  • Product Overview
  • Authentication
  • Errors
  • Changelog
  • Integration
    • Get started with online payments
    • Get started with subscriptions
  • Payment Intents
    • Create a PaymentIntent
      POST
    • Retrieve a PaymentIntent
      GET
    • Update a PaymentIntent
      POST
    • Confirm a PaymentIntent
      POST
    • Cancel a PaymentIntent
      POST
    • Capture a PaymentIntent
      POST
    • List all payment intents
      GET
  • Customers
    • Create a customer
      POST
    • Retrieves a customer
      GET
    • Update a customer
      POST
    • List all customers
      GET
  • Subscriptions
    • Create a subscription
      POST
    • Retrieves a subscription
      GET
    • Update a subscription
      POST
    • List all subscriptions
      GET
    • Cancel a subscription
      POST
  • Invoices
    • Create a invoice
      POST
    • Retrieves a invoice
      GET
    • Update a invoice
      POST
    • List all invoices
      GET
    • Pay a invoice
      POST
  • Payment Methods
    • Create a payment method
    • Retrieves a payment method
    • Update a payment method
    • List all payment methods
  • Mandates
    • Create a mandate
    • Retrieves a mandate
    • Update a mandate
    • List all mandates
  • Refunds
    • Create a refund
    • Retrieves a refund
    • Update a refund
    • List all refunds
  • Webhooks
    • Webhook envents
    • Create a webhook
    • Retrieves a webhook
    • Update a webhook
    • List all webhooks
  • Payment Links
    • Create a payment link
    • Retrieves a payment link
    • Update a payment link
    • List all payment links
  • Embedded Checkout
    • Payment Elements
  • About Testing
    • Test Cards
    • ApplePay&GooglePay
  1. Embedded Checkout

Payment Elements

🔒 Embedded Checkout#

📷 Product Diagram#

Checkout UI

📝 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:
PK_test_**** → sandbox
PK_**** → production

4. Initialize UseePay Elements:#

⚠️ The clientSecret must follow the format:
clientSecret = PaymentIntent.id + '&' + PaymentIntent.clientSecret
Example:

5. Create the Payment Element:#


6. Mount the Element to the DOM:#


7. Confirm the Payment:#


🔍 Parameters#

ParameterTypeDescription
paymentIntentObjectThe resulting payment intent
errorObjectError object if any occurs

error Object#

FieldTypeDescription
typeStringType of error

Possible error.type Values#

ValueDescription
no_select_payment_methodNo payment method selected
validation_errorForm validation error

✅ Payment Status#

⚠️ When calling confirmPayment, always check the result status and handle accordingly.
📘 Click here to view full result code documentation

🎉 Final Tips#

If you’ve followed all the steps above — congratulations!
You’ve successfully integrated the UseePay Embedded Subscription Checkout.
Modified at 2025-07-15 07:31:31
Previous
List all payment links
Next
Test Cards
Built with