1. Integrations
Documentation
  • Introduction
  • Webhook
  • Integrations
    • Hosted Checkout Integration
    • Nodejs
    • Wordpress
  • Create Checkout Session
    POST
  • Schemas
    • webhooks
      • Webhook | Order Created
      • Webhook | Order Abandoned
      • Webhook | Order Refunded
      • Webhook | Order Failed
    • Cart Session Request
    • Cart Session Response
  1. Integrations

Hosted Checkout Integration

Embed the STRABL hosted checkout experience into any web or mobile application by creating a cart session via a single API call, then redirecting your customer to the returned checkout URL.

How It Works#

Your Server  ── POST ──►  STRABL API  ──returns cartId──►  Your Server
Your Server redirects customer to:
Customer completes payment on STRABL hosted page
STRABL sends webhook(s) to your server with authoritative payment status
Important: The redirect back to your successUrl does not confirm payment. Webhooks are the authoritative source of truth for order status. Never fulfill an order based on a redirect alone.

Environments#

EnvironmentAPI Base URLCheckout URL
Sandboxhttps://sandbox.api.strabl.comhttps://sandbox.checkout.strabl.io
Productionhttps://api.strabl.comhttps://checkout.strabl.io

Authentication#

This endpoint is public — no Authorization header is required.
Your identity is established via platformUuid, which STRABL assigns when your merchant account is created.

Create Checkout Session#

POST /v2/public/api/cart/#

Creates a checkout session and returns a cartId token used to redirect the customer.

Request Body#

{
  "cartObject": {
    "store": { ... },
    "cart": { ... }
  }
}

cartObject.store#

FieldTypeRequiredDescription
platformUuidstring✅Your Strabl-assigned platform identifier
namestring✅Store display name shown on the checkout page
urlstring✅HTTPS URL of your store
logostring❌Publicly accessible URL of your store logo

cartObject.cart#

FieldTypeRequiredDescription
currencystring✅ISO 4217 currency code (e.g. AED, SAR, KWD)
countrystring✅ISO 3166 2–3 character country code (e.g. AE, SA, KW)
itemsarray✅One or more line items — see below
extraobject✅Arbitrary key-value metadata echoed back in webhooks (use for your internal order/reference IDs)
merchantUrls.successUrlstring✅URL to redirect the customer after a successful payment attempt
merchantUrls.failureUrlstring✅URL to redirect the customer after a failed or cancelled payment

cartObject.cart.items[]#

FieldTypeRequiredDescription
titlestring✅Product name
descriptionstring✅Product description
priceinteger✅Unit price (pre-tax). Total line value = price × quantity
quantityinteger✅Number of units
urlstring✅Public product page URL
imagestring✅Product thumbnail URL
zeroPayboolean✅Set to false for all paid items
skustring❌Your internal SKU reference
productIdstring❌Your internal product identifier
variantIdstring❌Your internal variant identifier
variantOptionsstring[]❌Variant attributes as "Key : Value" strings (e.g. "Color : Red")

Example Request#

{
  "cartObject": {
    "store": {
      "platformUuid": "your-platform-uuid",
      "name": "Acme Store",
      "url": "https://acme.com",
      "logo": "https://acme.com/logo.png"
    },
    "cart": {
      "currency": "AED",
      "country": "AE",
      "items": [
        {
          "title": "Classic White Sneakers",
          "description": "Lightweight everyday sneakers",
          "price": 299,
          "quantity": 1,
          "url": "https://acme.com/products/white-sneakers",
          "image": "https://acme.com/images/white-sneakers.jpg",
          "zeroPay": false,
          "sku": "SNK-WHT-42",
          "productId": "prod_001",
          "variantId": "var_42",
          "variantOptions": [
            "Size : 42",
            "Color : White"
          ]
        }
      ],
      "extra": {
        "internalOrderRef": "ORD-2024-00123"
      },
      "merchantUrls": {
        "successUrl": "https://acme.com/checkout/success",
        "failureUrl": "https://acme.com/checkout/failure"
      }
    }
  }
}

Response — 200 OK#

{
  "code": "SUCCESS",
  "message": "Cart session created",
  "data": {
    "cartId": "abc123xyz",
    "cartData": {
      "store": { ... },
      "cart": { ... }
    },
    "expiresOn": "2024-06-18T12:45:00Z"
  }
}

Response Fields#

FieldDescription
data.cartIdToken used to build the customer redirect URL
data.expiresOnSession expires 45 minutes from creation
Each cartId is valid for a single checkout attempt only. Generate a new session if the customer needs to retry.

Redirecting the Customer#

Once you have a cartId, redirect your customer immediately.

Sandbox#

https://sandbox.checkout.strabl.io/?token={cartId}

Production#

https://checkout.strabl.io/?token={cartId}

Webhooks#

STRABL sends event notifications to your registered webhook endpoint for all order lifecycle changes. Read more here for webhook configuration on the dashboard.

Sandbox Testing#

Use these credentials to simulate a successful payment in the sandbox environment. They are not valid in production.
FieldValue
OTP123456
Card Number5123 4500 0000 0008
Expiry01/39
CVV123

Key Constraints#

successUrl and failureUrl redirects do not indicate payment outcome — use webhooks only.
Sessions expire after 45 minutes.
Each session is single-use — create a new session for each checkout attempt.
logo and url under store must be publicly accessible HTTPS URLs.
Modified at 2026-06-18 13:48:48
Previous
Webhook
Next
Nodejs
Built with