This endpoint is currently shown as a preview of what’s currently in development and is subject to change.
Response
Payment methods retrieved successfully
Documentation is still being updated. Some content maybe unfinished.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/preview/checkout/payment-methods
{
"stripe": {
"id": "stripe",
"title": "Credit Card (Stripe)",
"description": "Pay securely with your credit card",
"supports": [
"products",
"refunds",
"subscriptions"
],
"has_fields": true,
"order_button_text": "Pay Now",
"method_title": "Stripe",
"method_description": "Accept credit card payments via Stripe",
"config": {
"test_mode": true,
"is_connected": true,
"supports_tokenization": true,
"supports_refunds": true,
"supports_subscriptions": true,
"requires_billing_address": true
}
},
"paypal": {
"id": "paypal",
"title": "PayPal",
"description": "Pay via PayPal",
"supports": [
"products",
"refunds"
],
"has_fields": false,
"order_button_text": "Proceed to PayPal",
"method_title": "PayPal",
"method_description": "Accept payments via PayPal",
"config": {
"test_mode": false,
"is_connected": true,
"supports_tokenization": false,
"supports_refunds": true,
"supports_subscriptions": false,
"requires_billing_address": false
}
}
}
Retrieve all available payment gateways with their configuration hints
{
"stripe": {
"id": "stripe",
"title": "Credit Card (Stripe)",
"description": "Pay securely with your credit card",
"supports": [
"products",
"refunds",
"subscriptions"
],
"has_fields": true,
"order_button_text": "Pay Now",
"method_title": "Stripe",
"method_description": "Accept credit card payments via Stripe",
"config": {
"test_mode": true,
"is_connected": true,
"supports_tokenization": true,
"supports_refunds": true,
"supports_subscriptions": true,
"requires_billing_address": true
}
},
"paypal": {
"id": "paypal",
"title": "PayPal",
"description": "Pay via PayPal",
"supports": [
"products",
"refunds"
],
"has_fields": false,
"order_button_text": "Proceed to PayPal",
"method_title": "PayPal",
"method_description": "Accept payments via PayPal",
"config": {
"test_mode": false,
"is_connected": true,
"supports_tokenization": false,
"supports_refunds": true,
"supports_subscriptions": false,
"requires_billing_address": false
}
}
}
Payment methods retrieved successfully
Show child attributes
Was this page helpful?