Payment Method API
Use the REST API to interact with EverShop payment methods.
Get available payment methods
Use this endpoint to get available payment methods.
Request Schema (application/json)
No request body requiredGET/api/paymentMethods
- cURL
- JavaScript
curl
-H "Accept: application/json"
https://<your domain>/api/paymentMethods
fetch('https://<your domain>/api/paymentMethods', {
headers: {
'Accept': 'application/json',
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
Sample Of Response
{
"data": {
"methods": [
{
"code": "cod",
"name": "Cash On Delivery"
},
{
"code": "paypal",
"name": "Paypal"
},
{
"code": "stripe",
"name": "Credit Card"
}
]
}
}