Payment Method API
Overview
The Payment Method API provides endpoints for managing payment options in your EverShop store. These endpoints allow you to retrieve available payment methods, which can be presented to customers during the checkout process, enabling them to complete their purchases securely.
Endpoints
List Available Payment Methods
Retrieves all payment methods currently enabled in your EverShop store. Use this endpoint to display payment options to customers during checkout.
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"
}
]
}
}