Antom APIs
Designed to be clear, concise, and easy to integrate, Antom APIs aim to reduce the complexity of high-availability applications and shorten development time. Antom APIs are based on the HTTP protocol and are POST APIs, which use SHA256 and RSA algorithms to create digital signatures, accept JSON-encoded request bodies, and return JSON-encoded responses. The API request includes the API URL in the path, identity and signature information in the request header, and request parameters in the request body.
Call an API
To integrate with Antom, you need to first make preparations in the Antom Dashboard and get your client ID. You can then improve the integration by using Antom APIs in a test mode, which does not affect your live data. We encourage testing the API call in the sandbox environment before launching your project and going live.
You can use Antom-provided open SDKs to integrate with Antom. If the programming language you use is Java, PHP, or Python, you can complete the process of assembling, signing, calling and checking the result of the HTTP request through the SDK provided by Antom. Antom SDKs encapsulate the process of integration, including adding and validating signatures for calling Antomy APIs.
The request address for the production and sandbox environments is only different in the path part of the request. You can first test Antom APIs in the sandbox environment, which does not affect your data in the production environment. Once you have finished testing, migrate to the production environment by changing the request URL and other configurations.
Environment | Request URL |
---|---|
Sandbox | https://<domain_name>/ams/sandbox/api/<endpoint> (Online payments) https://<domain_name>/ams/api/<endpoint> (In-store payments) |
Production | https://<domain_name>/ams/api/<endpoint> (Online payments) https://<domain_name>/ams/api/<endpoint> (In-store payments) |
The domain name can be obtained from Antom, and you can select one of the supported domain names listed below according to your region. If you are not sure which domain to use, contact Technical Support at AlipayGlobalTechService@service.alipay.com for help.
Location | Domain Name |
---|---|
North America | https://open-na-global.alipay.com (recommended) or https://open-na.alipay.com |
Asia | https://open-sea-global.alipay.com (recommended) or https://open-sea.alipay.com |
Europe | https://open-de-global.alipay.com (recommended) or https://open-eu.alipay.com (only for in-store payments) |
The following section shows samples of a typical Antom API request and response:
POST /ams/api/v1/payments/inquiryPayment HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json; charset=UTF-8
Request-Time: 1685599933871
client-id: 5J5XSU7Y2Y182W01981
Signature: algorithm=RSA256,keyVersion=1,signature=***
{"paymentId":"20200429114010800100188850266791455"}
{
"actualPaymentAmount": {
"currency": "PHP",
"value": "1314"
},
"paymentAmount": {
"currency": "PHP",
"value": "1314"
},
"paymentId": "20200513114010800100188770269589293",
"paymentRequestId": "REQUEST_20200513161204",
"paymentResultCode": "SUCCESS",
"paymentResultMessage": "success",
"paymentStatus": "SUCCESS",
"paymentTime": "2020-05-13T01:12:52-07:00",
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
}
}
Antom provides developer tools and resources to help you integrate quickly and efficiently. Make use of these tools to streamline your development process.
Explore more about Antom APIs
- Overview Before you make any payments, it is important to understand how Antom APIs works and how requests and responses are structured. This section presents general information (such as message structure and message transmission workflow) of online messages between your system and Antom.
- Sign a request and validate the signature To guarantee that data has not been altered in transmission, digital signatures can be adopted. A digital signature is mandatory for all messages.
- Message encoding To prevent errors or ambiguity caused by special characters enclosed in a message, encode the message properly before transmitting it.