Custom Integration APIs and Webhook
Integrate the APIs from AXpay for Business into your own apps!
Last updated
Integrate the APIs from AXpay for Business into your own apps!
Last updated
A private key will be provided to you when you create a new app in AXpay for Business. This private key should be kept securely. You can generate or regenerate your private key anytime by clicking the Regenerate Private Key button in the platform portal. Once you regenerate a new private key, the old one will be disabled.
APIs are authenticated using dynamic API keys that are generated by signing a piece of data using the private key generated in the previous step. You will need both your private key and Client ID associated with your the App to generate the API key.
Once you have generated your own API key, you can call the following API into your own backend without the need for web token authentication:
GET
https://axpay-api.axiacoin.com/api/appClient/:appClientId/transaction
appClientId*
String
Client ID of app, can be found in web page
limit
Number
Limit the number of records returned for pagination
offset
Number
Return record with an offset for pagination
orderId
String
Filter transactions by orderId
rewardType
String
Filter transactions by rewardType, CASH_BACK or LOYALTY_POINT
webhookStatus
String
Filter transactions by webhookStatus
amountGte
Number
Amount greater than or equal to
amountLte
Number
Amount less than or equal to
rewardRateGte
Number
Reward rate greater than or equal to
rewardRateLte
Number
Reward rate less than or equal to
createdAtGte
Number
Created at greater than or equal to in Unix timestamp millisecond
createdAtLte
Number
Created at less than or equal to in Unix timestamp millisecond
fromEmail
String
Filter transactions by fromEmail
orderBy
String
Order the returned transaction by fields of createdAt, amount or rewardRate
order
String
asc or desc
api-key*
String
api key of app generated by the method above
You can generate an instant payment link through the AXpay for Business platform. To integrate this function into your own app, you need to use the app-specific private key to create the signature. The supported currencies include: "AXC", "CAD", "USD", "EUR", "CNY", "AUD", "JPY", "HKD", "GBP", "INR". The user will be deducted equivalent amount of AXC when they create the transaction.
For each app, you can define a Webhook URL and a corresponding API key through the AXpay for Business portal. Once a transaction is completed for the corresponding app, the system will call the Webhook URL to notify you through your own customized application.
The following example shows how a Webhook URL is called by AXpay for Business:
AXpay for Business will call the Webhook URL through 5 attempts (5 seconds per attempt until successful) for each transaction. If a status code of 200 is received, the Webhook status will be COMPLETED. If it does not succeed within 5 attempts, the Webhook status will show that it has FAILED. The "webhookStatusCode" field records the response status code for each attempt.