Use Emacron Store with your own website
Your website can use the same published native products, variants, stock reservations, discount codes, delivery/tax calculation and order engine as the hosted Emacron shop. An external Shopify or WooCommerce store is not required.
What is available today
Customer sign-in requires the relevant Email or WhatsApp package and an authorised connected sender. Store access alone does not enable code delivery.
This integration supports guest shopping, merchant-enabled Email or WhatsApp verification, Store customer profiles, saved addresses, account carts with explicit merge and 30-day expiry, owned order history and reviewed reorder, alongside private order receipts. Cancellation requests for eligible unpaid, unshipped whole native orders are supported when enabled in the order’s saved policy. Owned return and refund-review requests now follow the policy saved on each order, with private photos, status/history and withdrawal where eligible. Whole-order exchange requests link an eligible original physical return to a separately reviewed exact replacement order. Actual prices, refunds and replacement payments remain separate; no store credit or automatic net charge is inferred. Owned order complaints use private customer threads linked to the Store’s authorised CRM Support queue where the required modules and permissions are active. Internal staff notes never appear in customer threads. Signed native Store events are available through scoped endpoint administration and durable at-least-once delivery; your receiver must verify signatures and deduplicate event IDs. Product reviews use separate /products/PRODUCT_ID/reviews and /customer/product-reviews routes; the bare /reviews paths below mean checkout price reviews. A CRM API key does not add these missing capabilities and must never be included in a public website.
Delivery services and pickup capacity
When delivery_policy_enabled is true, call deliveryChoices() with the actual cart, fulfillment method and delivery country/state/postal code. Display only the returned services and payment methods. These are merchant rules unless the merchant explicitly enables carrier-priced checkout. In that case, show the selected service’s returned carrier_quotes, actual fee_minor, currency, permitted payment methods, tax uncertainty and expires_at. Pass the selected quote’s UUID as carrier_quote_id with service_id to prepareReview(). Changing cart, address or payment choice requires a fresh matching estimate; an expired estimate cannot be used. A quote creates no carrier booking or physical pickup. Prices, tax, discounts and COD limits are evaluated by the server. Missing product weight cannot qualify for a weight rate.
For a service with requires_pickup_slot, call pickupSlots(serviceId) and select an offered available window. Include service_id and pickup_slot: { id, start } in prepareReview(). The review holds stock and pickup capacity; selecting a window alone does not. Keep the original prepared draft after an unknown response. Final placement rechecks the saved service, postal destination, rules, actual item shipping facts and capacity. Changed rules require a new review. Existing placed orders keep their accepted terms. With rules off, existing delivery/payment choices continue to apply.
Return requests and review photos
Read returnPolicy() and returnEligibility(customerToken, orderId) before preparing a request. Use prepareReturnRequest(), show the exact lines and terms, then explicitly confirm submitReturnRequest(). Retain the prepared request across an uncertain response. customerReturnRequests() and customerReturnRequest() provide owned status and history; retain asOf when paging. Withdrawal requires the saved version and a retained operation identity. Approval never arranges shipping, restores stock or refunds money.
Use prepareReturnRequestPhoto() and uploadReturnRequestPhoto() for private still-image evidence. Product reviews separately use reviewPhotos(), prepareReviewPhoto() and uploadReviewPhoto(). Photos are limited to three JPEG, PNG or WebP images per record,2MiB each. Load bytes only after an explicit customer action, keep them in a local Blob URL and revoke it when closing. Every review-photo addition or removal returns that review to moderation. publicReviewPhotos() and publicReviewPhoto() expose only currently approved reviews for published products; they may become unavailable after moderation or unpublishing. Full versioned request and response shapes are in the linked API contract.
Try an independent frontend
The framework-independent Store example runs the public/customer SDK without a CRM employee key. Enter your own API origin and published Store slug, and approve the exact origin serving the example before testing. Test checkout creates actual orders in the connected Store; use a disposable merchant-authorised test Store. The example demonstrates COD/manual checkout, customer sign-in, wishlist/account cart, owned orders, cancellation, return/refund-review requests and private photos where configured; it includes explicit online payment request/status/reconciliation, whole-order exchange and private complaint tools; real payment capture/refund and carrier acceptance remain separate. Review the included README and supported capability limits before adapting it.
1. Enable your website
In Store → Storefront, save your Store web address and real business policies, choose visible native products, then publish. Under Connect your own website, enable access and add exact HTTPS origins. Add www and non-www separately where needed. Local HTTP development accepts localhost or127.0.0.1. Server-to-server clients do not use browser CORS; every actual new request still checks publication and the Store package. An approved origin is not authentication.
2. Read products and prepare a review
The API base is https://api.crm.emacronai.com/api/shop/YOUR_SAVED_STORE_SLUG. No CRM token, secret key or customer-list access is needed. Use browser requests with credentials omitted. GET the base for actual policies, countries, states and enabled payment choices. Products and exact options are paginated; respect has_more, current availability and requires_review. The SDK provides product(id) for exact published-product lookup, categories() for the complete flat category list, and products({ page, search, category }) for browsing. The legacy categories() list contains category strings. The products response also exposes facets.taxonomy with stable IDs, kinds, parent_id links and counts for hierarchical categories, brands, collections and reusable attribute values. Guest carts stay in your frontend. Signed-in customers can explicitly save or restore an account cart; saving never reserves stock or fixes prices. Recheck every item during checkout. Contact the merchant for products that require review; do not create a guessed-price checkout.
GET /products?page=0&search=…&category=… (add product_id=PRODUCT_ID for exact lookup); GET /products/PRODUCT_ID/options?page=0&search=…. Match the Store currency. Delivery destination is { country, province, gst_state_code, zip }; choose valid country/state values from settings. Pickup uses the configured business location. The server calculates all prices, tax, delivery and discount facts. A review holds available native stock for15minutes.
Catalog filters and stable pages
Use SDK products({ page: 0, search, categoryId, brandId, collectionId, available: true, sort, tags, attributes }). Direct query names are category_id, brand_id and collection_id; use saved UUIDs from the returned facets. A category filter includes active descendant categories. The legacy category string filter remains supported. Only published active native products in this Store and currency are exposed.
sort accepts featured, name_asc, name_desc, price_asc, price_desc or newest. Price sorting uses current effective prices. Pages start at zero, contain at most24 products and return page, page_size, total and has_more; stable ID tie-breaks prevent equal names or prices from changing order. A new filter/search resets page to zero. Availability is a current indication, not a reservation.
Direct tags is a comma-separated list of up to12 distinct exact tags, all required. Direct attributes is URL-encoded JSON mapping up to12 attribute UUIDs to arrays of1–20 distinct value UUIDs: values within an attribute are OR; different attributes are AND. The SDK encodes these for you. Use available=true or omit it; false is not a separate availability filter. Render returned facets and keep selected filter labels visible even when their current count is zero. Unsupported or malformed filters return a visible error.
3. Keep retries and customer data safe
Generate a32-byte random checkout token and a stable request UUID before POST /reviews. Send the token as X-Store-Checkout. Keep it and the exact submitted draft privately so a timeout can be recovered without another reservation. Never log it or send it to analytics. The SDK separates preparation from submission for this reason.
Show the server review before customer confirmation. POST /reviews/REVIEW_ID/place with { customer, confirmed: true }. Customer needs name and a phone including its international code; delivery also needs address1, city, zip, country and the reviewed province/gst_state_code. Email is optional. After an uncertain response, GET the same review before retrying placement. POST /reviews/REVIEW_ID/release with the same bearer to release an unplaced review.
The returned tracking_url has a private read-only token in its fragment. GET /reviews/REVIEW_ID or /reviews/REVIEW_ID/shipments accepts that token as X-Store-Tracking. It cannot place, release or change an order. Shipment history uses page=0,1,… and has_more. Use shipments(draft, reviewId, { page }) with the original checkout draft, or track(reviewId, readToken, { shipments: true, page }) for the private read-only receipt. trackedPaymentStatus(reviewId, readToken) reads saved payment status without authorising a new charge. Delivery status reflects merchant-recorded shipments; live courier tracking integration is not yet available. Hosted tracking remains a recovery option if the merchant unpublishes or disables its external website. Your website must set a restrictive referrer policy and keep checkout/receipt pages out of third-party logging and caches.
Customer sign-in and account APIs
The merchant chooses Email code, WhatsApp code, both, or disabled in Storefront settings. Email requires their authorised connected mailbox; WhatsApp requires their connected business number and approved Copy Code authentication template. Codes never silently switch to platform mail or an unrelated number. The merchant can disable guest checkout only while a sign-in method is configured. A disconnected method fails closed; do not bypass the sign-in requirement.
Read /customer/auth/methods before offering a method. Prepare and privately retain { method, destination, request_key, flow_token } with prepareSignIn(method, destination). Use startSignIn(draft), then verifySignIn(draft, challengeId, code). Keep the same request and flow for an uncertain send; a fresh code is a deliberate action after the one-minute wait. Codes expire after five minutes and lock after five incorrect attempts. Email and WhatsApp are separate verified identities; entering another identifier does not link accounts or historic guest orders.
Verification returns a one-hour access token and a rotating seven-day refresh token. Keep these private and out of URLs, logs and analytics. Send the access token only as X-Store-Customer to this Store’s customer routes. This is separate from CRM staff authentication and private checkout/receipt tokens. The SDK requires explicit refreshCustomer(refreshToken); replace both tokens atomically, serialize concurrent refreshes and never replay an old refresh after a successful rotation. Reuse revokes that session. signOut(token, { allSessions: true }) revokes all sessions for that Store customer; remove local tokens even if sign-out cannot be confirmed.
The SDK exposes customerProfile, saveCustomerProfile, customerAddresses, saveCustomerAddress, removeCustomerAddress, customerCart, saveCustomerCart, customerOrders and customerOrder. Profiles, addresses and carts require their current saved version on changes; reload and review a conflict instead of silently overwriting it. Address country/state choices are returned by the profile API. Cart writes include only product/option IDs and whole quantities. Order pages use zero-based page numbers and has_more; order detail returns an owned private tracking URL. Customers cannot submit a customer ID to access somebody else’s resources.
Saved addresses have purpose: delivery | billing, defaulting to delivery for older clients. Read with customerAddresses(token, { purpose: "billing" }), or omit purpose to read both. Pass purpose with saveCustomerAddress; defaults are independent per purpose. An existing address cannot change purpose. Use its exact current version for edit/remove and refresh after a conflict. Countries use supported ISO codes; Indian states and six-digit postal codes and US postal codes are validated.
An optional billing_address in prepareReview is a validated address snapshot. It is copied into the reviewed pricing/order and never changes when the saved address is edited later. Billing countries are independent of delivery eligibility; billing details do not change the delivery destination or tax calculation. Follow the actual shop settings for delivery and payment choices.
Connected providers may not expose remaining sending quota. Store applies its enforced admission limits and allows one attempt while provider capacity is unknown. A confirmed provider-limit response pauses new codes for that exact sender; issued codes remain verifiable. Do not automatically resend or change senders after a timeout or rejection.
Pass { customerToken: accessToken } as the optional final argument to review and place. Keep the original checkout draft/token unchanged. Only an order newly placed while signed in is linked to that customer; existing guest receipts require the separate explicit two-proof claim below. Account reads remain available after unpublishing, but new sign-ins and purchases still require a published Store and active Store package.
Link a previous guest order
Guest orders are never linked by matching typed contact details alone. Retain the original private checkout draft securely. After the customer verifies a matching order email or WhatsApp identity, use a sign-in created in the last10 minutes and prepare prepareGuestOrderClaim(reviewId, originalDraft.token). Keep that prepared request private, show explicit confirmation, then call claimGuestOrder(customerToken, prepared, true). After a lost response retry the same request. The read-only receipt token cannot claim an order. Do not put checkout proof in links, analytics, logs or public website code.
The direct endpoint is POST /customer/orders/claim with X-Store-Customer and { request_key, review_id, checkout_token, confirmed: true }. Only an unowned placed order with both proofs can be linked; another customer’s order cannot transfer. Expired sign-in requires fresh verification. A claim changes only account linkage and records an audit entry, leaving original order/payment/stock snapshots unchanged. Without original proof, use the merchant’s reviewed support process; there is no proof-free recovery endpoint.
Identity changes and recovery
Recover an account by signing in again through a currently verified, enabled method. A new email or WhatsApp identifier does not claim an old account. When all verified methods are unavailable, use the merchant’s reviewed support process; this API provides no proof-free recovery or account merge.
Changing account access requires a successful existing sign-in from the last 10 minutes; refreshing a session does not renew this proof. Use prepareIdentityChange(method, destination, { replaceIdentityId }), retain that private request, call startIdentityChange(token, prepared), then verifyIdentityChange(token, prepared, challengeId, code). Without replaceIdentityId it adds the other verified method. Existing-account collisions need review and never merge customers. Change and removal revoke other sessions.
For removal, explicitly review the effect, retain prepareIdentityRemoval(identityId), and pass it to removeCustomerIdentity(token, prepared). Keep another verified, enabled and connected method. customerSessions(token) lists only owned active sessions without secrets; revokeCustomerSession(token, sessionId) is an explicit confirmed action. Never auto-run identity changes or session revocations during page loading.
Browser and backend-for-frontend security
Hosted shopping keeps shopper tokens in private tab session storage. A merchant backend-for-frontend may hold these server-side and issue a Secure, HttpOnly, SameSite session cookie to its own origin; that backend must implement CSRF protection, exact-origin checks, server-side per-customer storage and serialized refresh rotation. Do not forward an employee token or CRM API key to shoppers. The Store API accepts the separate shopper header rather than browser cookies, and CORS does not establish identity. Redact destinations, codes, tokens and proof flows from analytics and application logs.
Saved carts and reorder
Use prepareCustomerCart(items, version, { mode: "merge" }) to prepare an explicit merge, then retain that object for updateCustomerCart(customerToken, prepared) and any response-loss retry. Use mode replace to replace the saved cart. Matching exact product/option quantities add during merge. Saved account carts expire after 30 days and never reserve inventory. Read the current saved version before a new change; a conflict requires review, not automatic overwriting.
customerReorder(customerToken, orderId) returns only an owned order’s current eligible items, current prices and excluded-line reasons. Ask the customer to review before updating their account cart. Never reuse historical totals, discounts, payment attempts or delivery facts to place another order.
Customer cancellation requests
Read cancellationPolicy() before ordering. The merchant may enable a1–720 hour request window and exclude products. Each new order saves its policy; later settings do not rewrite old orders. Saving a policy invalidates unplaced checkout reviews. Legacy orders without a snapshot require manual support.
After verified sign-in, call cancellationEligibility(token, orderId) and customerCancellationRequests(token, { orderId, page: 0 }). Eligibility requires ownership through the account/order binding, a saved enabled policy, an open window, no excluded line, and unpaid/unshipped status. A chargeable or uncertain online payment blocks cancellation until reviewed. A typed customer phone or read-only receipt token is not sufficient.
Prepare and privately retain prepareCancellationRequest(orderId, reasonCode, message); after explicit confirmation call submitCancellationRequest(token, prepared, true). Retry the same prepared request after response loss, or read its status. Submission creates only a review request. Approval separately rechecks order/version/payment/shipping and uses the existing atomic cancellation/stock-restoration operation. It never issues a refund.
To withdraw an open request, retain prepareCancellationWithdrawal(requestId, version), explicitly confirm, then call withdrawCancellationRequest(token, prepared, true). Approval/withdrawal are mutually exclusive; withdrawal cannot reopen a cancelled order. Requests and decision messages are private in the customer account and scoped staff queue. The request message is text; private still-photo evidence can be added afterward when configured. Staff internal notes stay separate and never appear in customer history. Decisions are recorded in history and do not themselves send a notification.
Private request evidence photos
After submitting a cancellation request, use SDK requestEvidence, prepareRequestPhoto, uploadRequestPhoto and requestPhoto. Keep the same prepared File and request UUID on uncertain retries. Upload requires explicit confirmation and a current customer session; maximum 3 still JPEG/PNG/WebP photos per request, 2 MiB and 4096 × 4096 pixels each. The server re-encodes JPEG pixels and removes original filenames and metadata.
Customer endpoints are /customer/cancellation-requests/REQUEST_ID/evidence for GET metadata and POST multipart upload, and /customer/cancellation-requests/REQUEST_ID/evidence/PHOTO_ID for an authenticated JPEG Blob read. Multipart fields are photo, request_key and confirmed=true; never add a staff key or a customer/workspace authority field. Photos have no public URLs and must load only after a customer chooses to view them. A closed request accepts no new photo identity; an already admitted upload can finish recovery. After reload, use the pending photo ID as the third argument of prepareRequestPhoto(requestId, originalFile, pendingPhotoId) and upload the exact same original file. The server rejects changed bytes under an existing identity.
Dedicated private Store object storage and existing workspace quota are required. If unavailable, text requests remain usable; metadata reports upload_enabled=false. Generic attachments, PDFs, videos, deletion and internal-note attachments are unsupported. Original photos/filenames are not persisted, and normalised evidence is retained with its request.
Product reviews & wishlists
Product feedback is separate from checkout price reviews. Read published feedback with productReviews(productId, { page: 0, rating: null }); the response contains approved purchase reviews, total and average_rating for the selected rating filter (null means all ratings; 1–5 selects one rating). A null average means no published reviews. Do not create sample stars or expose customer, order or contact identifiers in a public review. Eligible owned reviews support up to three private JPEG, PNG or WebP photos, 2 MiB each, through the separate review-photo APIs. Approved photos are publicly readable only while both the review and product remain published.
After sign-in, use customerReviewEligibility(token, orderId) before offering a review form, and customerProductReviews(token, { page: 0 }) for owned submissions. Call saveProductReview(token, input) with the exact owned order_id, line_id, rating, title, body, current version and a retained request_key. Creation uses version 0; editing uses the saved version and returns the review to pending moderation. Retry the identical request after an uncertain response. Publication is a separate merchant decision. The merchant can disable review submission; purchases never imply automatic public endorsement.
Signed-in customers can report inappropriate published feedback through reportProductReview(token, reviewId, { reason, request_key }). Reports are private and do not send a customer message. The merchant reviews reports and decision history under Store → Product reviews. Customer feedback is not a sales/support conversation.
Use customerWishlist(token, { page: 0 }), addToWishlist(token, productId, { variantId }) and removeFromWishlist(token, wishlistId). Choose the exact option for variant products. Wishlist writes are naturally idempotent; saving reserves no inventory and fixes no price. Lists are capped at 200 saved items. Unavailable products return no private product details, remain removable, and must be checked against the current catalog before checkout. Read/remove access remains private when the shop is paused; adding requires an active published shop.
Browser SDK example
Download the SDK and host it on your own website. The relative import below assumes you copied it to your website’s root. Names such as selectedProductId represent actual selections, not built-in test data.
import { EmacronStore } from '/emacron-store.js';
const store = new EmacronStore({ slug: 'YOUR_SAVED_STORE_SLUG' });
const settings = await store.settings();
const catalog = await store.products({ page: 0 });
const categories = await store.categories();
// For a product detail URL, use its saved product ID:
// const product = await store.product(selectedProductId);
// Display actual products/options and collect a cart first.
const draft = store.prepareReview({
items: [{ product_id: selectedProductId, variant_id: selectedVariantId, quantity: 1 }],
delivery_method: selectedDeliveryMethod,
destination: selectedDestination,
payment_method: selectedPaymentMethod,
accepted_policies: true,
discount_code: enteredCode || undefined
});
// Retain this draft privately before submitting. Retry this same draft after a timeout.
const review = await store.review(draft);
// Display review.pricing and policies; get explicit customer confirmation.
const placed = await store.place(draft, review.id, customer, true);
// If placement response is lost, check first: await store.status(draft, review.id).
// Abandon an unplaced review: await store.release(draft, review.id).
// Receipt URL contains a private read-only token. Keep it out of analytics/logs.Download the SDKFramework-free starter
Open the vanilla JavaScript checkout example. Its setup and scope notes and step-by-step frontend connection guide explain copying the files to your approved origin. It uses real Store API requests; confirming an order creates an actual order. It demonstrates guest or verified Email/WhatsApp checkout, optional billing details, owned order reads and post-order complaints, return/refund-review requests, eligible product reviews, account notices, stable response-loss recovery and payment reconciliation through the same SDK. It is a developer starting point, not a complete merchant website.
Private server access keys
In Storefront settings, open Server access keys. This is separate from the browser SDK and generic CRM API keys. Only an unrestricted owner/admin with Store, Settings, Integration and Export access can manage these keys. The Store package and the issuing employee’s current grants, active membership, record scope and module access are checked on every server request. Removing access stops future requests; a read already in progress may finish.
Select only the native read scopes your server needs: products:read for product identities/publication state; orders:read for order identities/status without buyer details or payment data; inventory:read for product/variant on-hand quantities. These read APIs do not edit products, place orders, change inventory, process payments/refunds or administer WooCommerce/Shopify. Use the separate shopper-owned flow for a current checkout quote; base stock is not available-to-promise.
For your own shipping system, explicitly select shipping:write on a new or replacement key. Your current fulfillment grant is required at issuance and on each write. Existing keys stay unchanged. Add orders:read to read current shipping facts. GET /api/v1/store/merchant/orders/ORDER_ID/shipping returns the order version, exact remaining line IDs and paged fulfillment/tracking history without buyer details.
POST the same path with request_key (a retained UUID), version, confirmed: true, and action: fulfill plus exact lines and optional tracking (carrier, number, HTTPS url). After dispatch, use action: tracking, saved fulfillment_id, status (in_transit, out_for_delivery, delivered, exception or returned), and occurred_at with an explicit timezone. Tracking is merchant-reported and visible on the private receipt. It cannot confirm payment, restock returns, book carriers or schedule pickup. Retain the same request UUID after a lost response; reusing it with changed contents fails.
# Run only on a trusted server. Set STORE_SERVER_KEY in its secret manager.
curl 'https://api.crm.emacronai.com/api/v1/store/merchant/products?limit=50' -H "Authorization: Bearer $STORE_SERVER_KEY"GET /api/v1/store/merchant/products, /orders, /inventory and /variants return version:1, source:emacron, items, has_more and next_cursor. Pass next_cursor as after; limit is 1–100 (default 50). Pagination sorts UUIDs ascending and is not a point-in-time snapshot. Variant reads require inventory:read. Only the key’s native Store is selected; arbitrary workspace/provider filters are rejected. GET /capabilities, under the same prefix, describes the exact supported scope, limits and exclusions for any valid key. POST is supported only for the explicitly scoped shipping fulfillment/tracking operations described above. Other merchant writes, PUT, PATCH, DELETE and HEAD are unsupported.
A key expires after 1–90 days; at most 10 active keys are allowed. It has a durable 60 admissions/minute and 1,000 per conservative minute-bucket rolling hour, plus a shared 120 attempts/minute per IP guard.429 includes Retry-After. Each successful admission and scope denial is recorded; repeated limit events are bounded to one per minute. Admission history retains up to 90 days and does not prove that the later staff-access check or data read succeeded. Management operations have a separate audit. Neither audit contains secrets or customer payloads.
A raw key is displayed once and only its SHA-256 hash is stored. Keep it in your server’s secret manager, never browser code, localStorage, URLs, logs or customer SDK headers. Requests carrying Origin or X-API-Key are rejected; send only Authorization: Bearer esm_… from your server. Browser-origin rejection is a precaution, not proof of a trusted client: treat the key as a secret.
Rotation immediately revokes the old key and displays one replacement. Revoke stops new reads without deleting store data. Creation/rotation/revocation use a retained request_key and confirmation. After an uncertain response, retry that same operation or inspect the key list. A saved operation will not disclose its secret again; if the original secret was lost, revoke its listed key and create a replacement. Do not keep generating new keys automatically.401 means invalid/expired/revoked key,403 means scope or current issuer/package access,400 means unsupported pagination,404 means unsupported endpoint/method, and503 means verification or database availability could not be confirmed. Errors return a JSON error message; retry reads visibly and never bypass a denial.
Versioned API contract and failure handling
The supported shopper and server-key contract is version1; SDK1.3.1 publishes structured StoreApiError fields for HTTP, network, invalid-response and timeout failures. GET retryability is advisory metadata; the SDK never automatically retries any request. Keep existing write operation IDs and inspect saved facts before deliberate retry. Honor Retry-After where supplied; unknown provider quota is not unlimited. No deprecation is scheduled; an incompatible contract will require a new major and a published migration/sunset notice.
Download version1 OpenAPI contractThis contract covers supported public/customer/checkout/server-key interfaces and inventories internal staff/provider routes separately. It does not turn internal staff routes into merchant-key authority. Financial, stock, customer and source guards remain on the actual endpoints. Full typed private staff contracts are still being completed.
Authentication, ownership and server examples
Every operation in the versioned contract declares its audience and ownership boundary. A request UUID identifies an operation; it never authenticates a caller. Exact same-Store customer/checkout/receipt proof remains required. New account notifications and exchange methods retain these checks.
The server example requires your own authenticated session store and CSRF protection. It does not implement login or expose a generic proxy. Keep merchant keys and employee credentials on your server.
Current scope
Manual payment, cash on delivery, and merchant-enabled INR Razorpay are supported. After placing an online-payment order, explicitly confirm its total and POST /reviews/REVIEW_ID/payment with { request_key, confirmed: true } using the original checkout bearer. Retain that UUID before calling. GET the same payment path for saved status, or POST its /reconcile child with { attempt_id } for provider read-back. The SDK exposes paymentStatus, requestPayment and reconcilePayment. Open only the returned secure link; a browser callback never proves payment. An uncertain attempt must be reconciled, not submitted as a fresh charge. Read-only tracking cannot create payment links. Guarded merchant refund controls exist in the Store admin; Fresh Razorpay test capture, signed-webhook and refund acceptance has passed for the QA merchant. This is not a guarantee that another merchant’s credentials or live payment setup is ready. Customers may request refund review through owned eligible request routes; they cannot execute or approve provider refunds. Structured saved cancellation/return/exchange policies determine eligibility; policy prose alone never grants a refund. Store administration, employee access, buyer lists and refund approval remain in CRM. Provider-owned products stay with their own store; a matching SKU never merges inventories automatically. Domain hosting, DNS, certificates and your website’s implementation remain your developer’s responsibility.
API errors include a recovery message.401/403 represent access,404 unavailable Store/receipt,409 a changed or unavailable review,429 throttling, and503 a temporary verification problem. Handle errors visibly and re-fetch facts before changing a retry identity.