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
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
}
}
}Payment methods retrieved successfully
Show child attributes
Payment method ID
Payment method title
Payment method description
Supported features
Whether method has input fields
Order button text
Method title
Method description
Customer's saved payment tokens for this gateway
Show child attributes
Payment token ID
Token display name (e.g., "Visa ending in 4242")
Token type
cc, echeck Payment gateway ID
Whether this is the default payment method
Expiration date (MM/YYYY format)
"12/2025"
Whether this gateway supports saving payment methods
Show child attributes
Whether gateway is in test mode
Whether gateway is properly configured
Whether gateway supports tokenization
Whether gateway supports refunds
Whether gateway supports subscriptions
Whether gateway requires billing address
Was this page helpful?