Quick start

API
Web
HTML
Java
Create a smooth online automatic deduction process by using Antom’s Tokenized Payment product. Antom provides client and server-side sample code for API-only integration, helping you easily build a payment experience that accepts various payment methods.
1
Set up the server

Install 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

Initiate an authorization consult request

On your server, add an endpoint to call the consult API. When sending the request, specify authState, customerBelongsTo, scopes, and other required information for this consult.
Server

Specify the consult redirection URL

Set up the consult redirection URL. After completing the authorization, the buyer will be redirected to this URL, carrying authState and authCode parameters. These parameters are used for subsequent token applications.
Server

Save the payment information

Save the payment information that used for calling the API for subsequent payments. In actual development, you need to save the payment information to your database.
Server

Obtain the authorization result

You can obtain the authorization result by two ways:
Redirection URL
Authorization notification

Apply for the token

Add an endpoint on your server to call the applyToken API. When receiving a request token from the front end, you need to specify parameters such as authState, authCode, grantType, and customerBelongsTo. In actual development, please save the obtained accessToken to your database for subsequent payments.
Server

Initiate a payment request

On your server, add an endpoint to call the pay (Tokenized Payment) API. When sending the payment request, specify accessToken, payment method, payment amount, currency, payment request ID, order information, and other required information for this payment.
Server

Inquire about the payment result

On your server, add an endpoint to get the payment result by calling the inquiryPayment API and display the payment result when needed.
Server
2
Build a tokenized payment page on the client

Build the tokenized payment page

Display the payment methods that you offer to buyers on the tokenized payment page.
Client
After the buyer selects the payment method to authorize, you send an authorization request with the corresponding payment method information, and then get the authorization continuation URL from the response.
Client

Handle the authorization redirection

Redirect the buyer to the authorization continuation URL to complete the authorization.
Client

Obtain and process authorization information

If you use the redirection URL to obtain the authorization result, the client needs to send the received authorization information to the server for token applications.
Client

Query the payment result

After obtaining the token, the back end calls the pay API directly. You can obtain payment results from the information returned by the pay API or by calling the inquiryPayment API.
Client
Download