Skip to main content

Payments API

The Payment controller (api/payment.php, base payment) exposes payment gateway and method metadata. It is not where you charge a card — that happens through the Checkout API. Creating a payment directly here is deprecated; the endpoint exists to read payment/gateway data.

Authentication

Mixed, per route:

  • GET /payment and POST /payment — order-scoped: the request must carry a valid order_id resolving to a real order.
  • GET /payment/all — admin (manage_options).
  • GET /payment/<id> — admin (manage_options).

Routes

MethodPathPurposeAuth
GET/paymentPayment/gateway data for a contextOrder-scoped
POST/paymentDeprecated — returns an errorOrder-scoped
GET/payment/allAll gatewaysmanage_options
GET/payment/<id>Payment detail for an ordermanage_options

All paths are relative to /wp-json/storeengine/v1.

GET /payment

GET /wp-json/storeengine/v1/payment?order_id=1187

Returns the payment data for the given order context. The permission check requires the order_id to resolve to an existing order, so this route is usable in the payment flow without full admin rights. The handler resolves the id from any of id, order, order_id, payment, or payment_id; a request with none returns invalid-request (400).

POST /payment

POST /wp-json/storeengine/v1/payment

Deprecated. Returns endpoint_is_deprecated (400) directing you to the checkout workflow. Use POST /checkout/place or POST /checkout/pay-order instead.

GET /payment/all

GET /wp-json/storeengine/v1/payment/all

Admin-only. Returns all registered payment gateways (available and unavailable) with their metadata — useful for building a settings or reporting UI. Supports the standard collection parameters.

curl https://your-store.example/wp-json/storeengine/v1/payment/all \
-u "admin:APPLICATION_PASSWORD"

GET /payment/<id>

GET /wp-json/storeengine/v1/payment/<id>

Admin-only. Returns the payment/order detail for the given id. Accepts the context parameter.