# Additional APIs
A set of endpoints which could help you integrate with XanPay REST API.
# Payment methods
Returns the list of supported payment methods with their currencies.
Endpoint GET /methods
Request example
curl
-H "Content-Type: application/json"
-u {API_KEY}:{API_SECRET}
"https://api.xanpay.com/methods"
Response example
[
{
"country": "SG",
"currency": "SGD",
"methods": [
{
"method": "paynow",
"max": 500,
"name": "Paynow",
"icon": "cdn path"
},
...
]
},
...
]
# Available currencies
Returns the list of supported currencies
Endpoint GET /currencies
Request example
curl
-H "Content-Type: application/json"
-u {API_KEY}:{API_SECRET}
"https://api.xanpay.com/currencies"
Response example
[
"SGD",
"USD",
"HKD",
"THB",
...
]
# FX Conversion
Executes conversion between currencies based on XanPay rates.
Endpoint GET /forex
Url parameters
Parameter | Default | Description |
---|---|---|
sourceCurrency | none | Source currency |
sourceAmount | none | Amount of being converted |
destinationCurrency | none | Final currency |
Request example
curl
-H "Content-Type: application/json"
-u {API_KEY}:{API_SECRET}
"https://api.xanpay.com/forex?sourceCurrency=HKD&sourceAmount=150&destinationCurrency=SGD"
Response example
{
"amount": 26.25,
"rate": 0.18
}