SafeCommerce API

API Gateway for fast WooCommerce experiences.

Welcome to api.safecommerce.net — a lightweight backend that powers cart, checkout and event workflows. Built for speed, protection and clean integrations across your landing page and WooCommerce store.

✅ JSON REST 🔐 Auth-ready 🚀 Cache-friendly 🧩 Store API compatible
Heads up: This is an API subdomain. If you’re a customer, please use the main website for orders & support.

If you’re testing from a frontend domain (e.g., safecommerce.net), make sure your CORS allowlist and credentials settings are configured properly in your API server.

Connection info
Base URL
https://api.safecommerce.net
Store API
/wp-json/wc/store/v1/
Health check
/wp-json/
CORS
Allowlist + Credentials
curl -I https://api.safecommerce.net/wp-json/wc/store/v1/cart # For authenticated requests (example) # Authorization: Bearer <token>
Cart

Create and maintain a real WooCommerce cart from your landing page.

Checkout

Trigger InitiateCheckout + place orders (COD flow supported).

Events

Send PageView / AddToCart / Purchase events from server-side if needed.

Core Endpoints

🛒 Cart API

Use WooCommerce Store API cart endpoints to add/remove items and read totals. Common path: /wp-json/wc/store/v1/cart

📦 Products API

Fetch product details by ID, price, images and variations using Store API or REST API.

✅ Checkout Flow

Validate user data → create order → redirect to success page (COD supported).

Quickstart

Typical flow for a landing page on safecommerce.net using this API:

  1. Page loads → create/get cart session from Store API.
  2. User clicks order button → add product ID to cart.
  3. User scrolls to checkout form → fire InitiateCheckout event.
  4. Place COD order → show success page → fire Purchase.
fetch("https://api.safecommerce.net/wp-json/wc/store/v1/cart", { method: "GET", credentials: "include" }) .then(r => r.json()) .then(data => console.log("Cart:", data)) .catch(console.error);

Security Notes

🔐 CORS

Allowlist the frontend domain(s) and enable credentials only when required.

🧾 Authentication

Use JWT/OAuth/session cookies as appropriate. Avoid exposing private keys in frontend.

🧯 Rate Limit

Protect sensitive endpoints with throttling and logging for abuse prevention.

Contact

For integration support or access requests, contact the SafeCommerce team. If you want, tell me what text/email/WhatsApp number you want here—আমি বসিয়ে দিবো।