Quick start
Payment Element
Web
HTML
Java
Antom Payment Element is an SDK-based payment component designed to provide you with a seamless payment experience, thereby enhancing conversion rates. You can also use the appearance parameter to customize the visual style and layout of the payment interface, ensuring it matches your website's design.
1
Set up the serverInstall the Antom Java library
Maven
GitHub
Server
Get integration resources
Get integration resources from the Developer section in Antom Dashboard. Configure the obtained integration resources in your application and these resources are to be further used when sending requests to the Antom server.
Server
Create a payment session
Add an endpoint on your server to call the createPaymentSession API. When sending the request, specify the payment amount, currency, payment request ID, order information, and other required information for this payment.
Server
Specify the payment redirection URL
Set the payment redirection URL, where the buyer is to be redirected after completing the payment. You can guide the buyer with further actions on this page.
Server
Inquire about the payment result
Add an endpoint on your server to get the payment result by calling the inquiryPayment API. Display the payment result when needed.
Server
Receive payment notifications
Add an endpoint on your server to receive notifications from Antom's notifyPayment API, including payment results, payment time and payment amount, etc. You can update the payment status and save the information to your database for subsequent queries.
Server
2
Build the checkout page on the clientInstall Antom SDK
Install the SDK resource package via CDN:
<script src="https://js.antom.com/v2/ams-checkout.js"></script>Note: Antom SDK complies with PCI guidelines and guarantees that the buyer's payment information goes straight to Antom without passing through your server.
Client
Embed the Payment Element component
Create a DOM node on your checkout page to embed the Payment Element component.
Client
Get a payment session
After the buyer selects the corresponding payment method, you send a createPaymentSession request with the corresponding payment method information and get a payment session.
Client
Initialize and instantiate the SDK
Create the SDK instance and specify basic configurations. You can use the method to configure the appearance parameter to customize the visual style and layout of the payment interface, including theme selection, layout configuration, and CSS styling.
Client
Render the Payment Element component
Render the configured Payment Element component to the client page.
Client
Invoke the SDK to submit payment
After the Payment Element component is rendered, invoke the method to submit payment. Payment Element will handle processes such as displaying QR codes, redirecting to payment method pages, 3DS authentication, and returning to the merchant result page based on the specific payment method. It will also return event codes, you can perform corresponding handling based on these event codes.
Client
Download