Public API
Use the EnsureBack Public API to create protected checkouts for physical-product orders. Your backend sends order, buyer and shipping details to EnsureBack, receives a checkout URL, redirects the buyer, and tracks the protected order lifecycle.
Create protected checkouts from your backend
The merchant site collects the order details and calls EnsureBack from a secure backend. EnsureBack returns a buyer-facing checkout URL. The buyer completes payment through that URL, while EnsureBack manages the protected payment, delivery, dispute, release and refund lifecycle.
Send order data
Include products, buyer email, shipping settings and your merchant order ID.
Create checkout
Call the checkout endpoint from your backend with your EnsureBack API key.
Redirect buyer
Send the buyer to the checkoutUrl returned by EnsureBack.
Track lifecycle
Use order status, shipment updates, dispute events and webhooks.
Create a checkout
Amounts use minor currency units. For example, 7900 means $79.00 when currency is usd.
curl -X POST https://ensureback.com/api/ensureback/v1/platform-held-checkouts \
-H "content-type: application/json" \
-H "authorization: Bearer eb_test_your_api_key" \
--data '{
"merchantOrderId": "ORD-1001",
"buyer": {
"email": "buyer@example.com",
"name": "Test Buyer"
},
"items": [
{
"name": "Premium Test Hoodie",
"sku": "hoodie-001",
"quantity": 1,
"unitAmount": 7900,
"currency": "usd"
}
],
"shipping": {
"required": true
},
"successUrl": "https://merchant.example/success",
"cancelUrl": "https://merchant.example/cancel",
"webhookUrl": "https://merchant.example/api/ensureback/webhook"
}'Redirect to checkoutUrl
Redirect the buyer to checkoutUrl. After payment, EnsureBack redirects the buyer back to your successUrl or cancelUrl with the checkout status.
{
"ok": true,
"checkoutId": "ebc_...",
"ensurebackOrderId": "ebc_...",
"merchantOrderId": "ORD-1001",
"amount": 7900,
"currency": "usd",
"status": "payment_pending",
"checkoutUrl": "https://ensureback.com/pay/ebc_..."
}Verify API availability
Use the integration status endpoint to verify the live API surface before wiring your production checkout.