Custom/Native Integration Guide - Overviews

Custom/Native Integration Guide

Complete guide for integrating your custom commerce backend with Forter Agentic Orchestration.

This guide is for merchants who have built their own commerce solution and manage their own backend, inventory, and order processing. For Shopify or SFCC, see Shopify Integration or SFCC Integration.

How It Works

With custom integration, you:

  1. Host a product feed at a stable URL (Google Merchant Center XML, Shopify CSV, or JSON file)
  2. Implement three merchant endpoints — Account, Cart, and Checkout — to handle the checkout lifecycle
  3. Process orders in your backend system

Forter:

  1. Fetches your feed periodically (hourly, daily, or custom schedule)
  2. Generates and maintains the AI-optimized product data
  3. Orchestrates the checkout flow, calling your endpoints at each stage (account lookup, cart pricing, and order creation)

You provide: Feed URL + Three merchant endpoint URLs
You implement: Account, Cart, and Checkout endpoint handlers

Prerequisites

Before starting, ensure you have:

Step 1: Host Your Product Feed

A. Feed Format Options

Choose one of the supported formats:

Google Merchant Center XML

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Your Store</title>
<link>https://yourstore.com</link>
<description>Product Feed</description>
<item>
<g:id>SKU-001</g:id>
<g:title>Premium Widget</g:title>
<g:description>High-quality widget for all your needs</g:description>
<g:link>https://yourstore.com/products/widget</g:link>
<g:image_link>https://yourstore.com/images/widget.jpg</g:image_link>
<g:price>29.99 USD</g:price>
<g:availability>in stock</g:availability>
<g:brand>mycustomstore</g:brand>
<g:gtin>1234567890123</g:gtin>
<g:condition>new</g:condition>
</item>
<!-- More products... -->
</channel>
</rss>

Shopify CSV

Handle,Title,Body (HTML),Vendor,Product Category,Type,Tags,Published,Option1 Name,Option1 Value,Variant SKU,Variant Grams,Variant Inventory Tracker,Variant Inventory Qty,Variant Inventory Policy,Variant Price,Image Src,Variant Image,Variant Barcode
widget-premium,Premium Widget,"<p>High-quality widget</p>",mycustomstore,,Widgets,"gadgets,premium",TRUE,,,SKU-001,500,shopify,100,deny,29.99,https://yourstore.com/widget.jpg,,1234567890123

B. Host Feed at Stable URL

Host your feed file at a publicly accessible URL:

Examples:
- https://yourstore.com/feeds/products.xml
- https://cdn.yourstore.com/feed.xml
- https://s3.amazonaws.com/yourbucket/feed.xml (with public access or pre-signed URL)

Requirements:

C. Feed Authentication (Optional)

If your feed requires authentication:

Username: your_username
Password: your_password

Forter will send:

Authorization: Basic base64(username:password)

Step 2: Implement Merchant Endpoints

Forter calls three separate endpoints on your backend during the checkout lifecycle. Each endpoint receives a JSON POST request with an event envelope and an agent context block.

All requests include an event envelope:

{
  "event": {"id":"uuid","type":"...","timestamp":"2026-02-09T12:00:00Z"},
  "agent": {"source":"openai","platform":"chatgpt_instant_checkout"},
  ...
}

Step 2A: Implement Account Endpoint

Purpose: Look up whether a customer account exists in your system. Endpoint: POST https://yourstore.com/api/account

When called: When a customer begins checkout and provides their email or phone.

This endpoint is non-fatal — if it fails or returns an error, checkout continues without account information.

Request:

{
  "event": {"id":"evt_abc123","type":"account.login","timestamp":"2026-02-09T12:00:00Z"},
  "agent": {"source":"openai","platform":"chatgpt_instant_checkout"},
  "email":"customer@example.com",
  "phone":"+14155551234"
}

Response:

{
  "success": true,
  "account_id": "cust_123",
  "reference_id": "ref_abc",
  "status": "active"
}
Field Type Description
success boolean Whether the lookup succeeded
account_id string (optional) Your internal customer ID
reference_id string (optional) Sticky ID passed to subsequent calls
status string "active", "blocked", or "not_found"

Step 2B: Implement Cart Endpoint (Required)

Purpose: Price the cart items, return available shipping options, and compute totals. Endpoint: POST https://yourstore.com/api/cart When called: When a customer adds items to cart or updates their cart (shipping address, coupon, etc.). This endpoint is fatal — if it fails, the checkout cannot proceed.

Request:

{
  "event": {"id":"evt_def456","type":"cart.created","timestamp":"2026-02-09T12:00:00Z"},
  "agent": {"source":"openai","platform":"chatgpt_instant_checkout"},
  "reference_id": "ref_abc",
  "currency_id": "usd",
  "account_id": "cust_123",
  "items": [{
    "product_id": "SKU-001",
    "quantity": 2
  }],
  "coupon": "SAVE10",
  "buyer": {
    "email": "customer@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+14155551234",
    "address": {
      "line_one": "123 Main St",
      "city": "San Francisco",
      "region_id": "ca",
      "country_id": "us",
      "postal_code": "94102"
    }
  },
  "recipient": {
    "shipping_id": "standard",
    "first_name": "John",
    "last_name": "Doe",
    "address": {
      "line_one": "123 Main St",
      "city": "San Francisco",
      "region_id": "ca",
      "country_id": "us",
      "postal_code": "94102"
    }
  }
}

Response:

{
  "success": true,
  "reference_id": "ref_abc",
  "items": [
    {
      "product_id": "SKU-001",
      "quantity": 2,
      "price": 29.99,
      "effective_price": 29.99,
      "subtotal": 59.98
    }
  ],
  "shipping_options": [
    {
      "id": "standard",
      "title": "Standard Shipping",
      "description": "5-7 business days",
      "price": 5.99
    },
    {
      "id": "express",
      "title": "Express Shipping",
      "description": "2-3 business days",
      "price": 12.99
    }
  ],
  "totals": {
    "subtotal": 59.98,
    "discount": 0,
    "tax": 4.80,
    "shipping": 5.99,
    "total": 70.77
  }
}
Field Type Description
items[].price number Original unit price
items[].effective_price number Price after item-level discounts
items[].subtotal number effective_price * quantity
shipping_options array Available shipping methods with prices
totals object Subtotal, discount, tax, shipping, and total

Step 2C: Implement Checkout Endpoint (Required)

Purpose: Create the order in your system, process payment, and return an order ID. Endpoint: POST https://yourstore.com/api/checkout When called: When the customer confirms the order and payment is ready to be processed. This endpoint is fatal — if it fails, the order is not created.

Request:

{
  "event": {"id":"evt_ghi789","type":"order.created","timestamp":"2026-02-09T12:00:00Z"},
  "agent": {"source":"openai","platform":"chatgpt_instant_checkout"},
  "reference_id": "ref_abc",
  "account_id": "cust_123",
  "currency_id": "usd",
  "items": [
    {
      "product_id": "SKU-001",
      "quantity": 2,
      "price": 29.99,
      "effective_price": 29.99,
      "subtotal": 59.98
    }
  ],
  "buyer": {
    "email": "customer@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+14155551234",
    "address": {
      "line_one": "123 Main St",
      "city": "San Francisco",
      "region_id": "ca",
      "country_id": "us",
      "postal_code": "94102"
    }
  },
  "recipient": {
    "shipping_id": "standard",
    "first_name": "John",
    "last_name": "Doe",
    "address": {
      "line_one": "123 Main St",
      "city": "San Francisco",
      "region_id": "ca",
      "country_id": "us",
      "postal_code": "94102"
    }
  },
  "payment": {
    "provider": "stripe",
    "token": "tok_visa_4242",
    "card": {
      "brand": "visa",
      "last4": "4242",
      "exp_month": 12,
      "exp_year": 2027
    }
  },
  "totals": {
    "subtotal": 59.98,
    "discount": 0,
    "tax": 4.80,
    "shipping": 5.99,
    "total": 70.77
  }
}

Success Response:

{
  "success": true,
  "order_id": "ORD-12345"
}

Error Response:

{
  "success": false,
  "error_code": "INVENTORY_UNAVAILABLE",
  "error_message": "Product SKU-001 is out of stock"
}

Response Requirements:

Step 3: Configure in Forter Portal

Log in to the Forter Portal and navigate to your store's configuration.

A. Merchant Platform Tab

Select Custom Platform and configure your three merchant endpoints:

Field Description Example Required
Account Endpoint URL Customer account lookup "https://yourstore.com/api/account" Optional
Cart Endpoint URL Cart pricing and shipping "https://yourstore.com/api/cart" Yes
Checkout Endpoint URL Order creation "https://yourstore.com/api/checkout" Yes
Authentication Enable Bearer token auth Toggle on/off Recommended
Webhook Secret Secret for Bearer token and/or HMAC signing Auto-generated or custom Yes
Payload Signing Enable HMAC-SHA256 payload signing Toggle on/off Optional

B. AI Platforms Tab

Enable which AI platforms can sell your products:

Field Description
ChatGPT Toggle to enable OpenAI/ChatGPT integration
Gemini Toggle to enable Google Gemini integration
Search & Discovery Allow AI agents to browse and recommend your products
Checkout Allow AI agents to complete purchases
Payment Provider Which payment provider processes orders (e.g., Stripe)

C. Product Feed Tab

Field Description Example Required
Feed URL URL to your hosted product feed "https://mycustomstore.com/feed.xml" Yes
Feed Format Format of your feed "google" (Google Merchant Center XML) Yes
Update Frequency How often to fetch Every 24 hours Yes
Feed Active Enable automatic fetching true Yes
Feed Username HTTP Basic Auth username "api_user" Optional
Feed Password HTTP Basic Auth password •••••••• (encrypted) Optional

D. Store Policies

Field Description
Terms of Service URL Link to your terms
Privacy Policy URL Link to your privacy policy
Return Policy URL Link to your return policy
Return Window (Days) Days allowed for returns (e.g., 30)

E. Tax Configuration

Field Description Example
Tax Nexus Regions US states where you collect sales tax ["CA", "NY", "TX"]

F. Order Status URL (Optional)

Field Description Example
Order Status URL Template URL for order tracking "https://mycustomstore.com/orders/{order_id}"

Step 4: Payment & Fraud Settings (Optional)

By default, you handle payment validation and authorization in your webhook handler. This section is only needed if you want Forter to handle fraud detection and payments.

Option A: Merchant-Side Validation/Authorization (Default)

What happens:

Option B: Forter-Side Validation/Authorization (Optional)

What happens:

Step 5: Testing

A. Test Feed Fetch

After configuring the feed URL:

  1. Forter attempts to fetch your feed
  2. Check Forter Portal logs for fetch status
  3. Verify products appear in the portal Common Issues:

B. Use the Portal Endpoint Test Tool

The Forter Portal includes an Endpoint Test Tool that sends test requests to all three of your merchant endpoints and validates the responses. Navigate to Merchant Platform > Test Endpoints to run automated tests against your Account, Cart, and Checkout endpoints.

C. Test Endpoints with curl

You can also test each endpoint manually: Test Account Endpoint:

SECRET="your_webhook_secret"
curl -X POST https://yourstore.com/api/account \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SECRET" \
-d '{
  "event": { "id": "test_001", "type": "account.login", "timestamp": "2026-02-09T12:00:00Z" },
  "agent": { "source": "openai", "platform": "chatgpt_instant_checkout" },
  "email": "test@example.com"
}'

Expected response:

{"success":true,"status":"not_found"}

Test Cart Endpoint:

curl -X POST https://yourstore.com/api/cart \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SECRET" \
-d '{
  "event": { "id": "test_002", "type": "cart.created", "timestamp": "2026-02-09T12:00:00Z" },
  "agent": { "source": "openai", "platform": "chatgpt_instant_checkout" },
  "currency_id": "usd",
  "items": [{ "product_id": "SKU-001", "quantity": 1 }],
  "buyer": {"email": "test@example.com", "first_name": "Test", "last_name": "User" }
}'

Expected response:

{
  "success":true,
  "items":[{"product_id":"SKU-001","quantity":1,"price":29.99,"effective_price":29.99,"subtotal":29.99}],
  "shipping_options":[{"id":"standard","title":"Standard Shipping","description":"5-7 days","price":5.99}],
  "totals":{"subtotal":29.99,"discount":0,"tax":2.40,"shipping":5.99,"total":38.38}
}

Test Checkout Endpoint:

curl -X POST https://yourstore.com/api/checkout \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SECRET" \
-d '{
  "event": { "id": "test_003", "type": "order.created", "timestamp": "2026-02-09T12:00:00Z" },
  "agent": { "source": "openai", "platform": "chatgpt_instant_checkout" },
  "currency_id": "usd",
  "items": [{ "product_id": "SKU-001", "quantity": 1, "price": 29.99, "effective_price": 29.99, "subtotal": 29.99 }],
  "buyer": {"email": "test@example.com", "first_name": "Test", "last_name": "User" },
  "recipient": { "shipping_id": "standard", "first_name": "Test", "last_name": "User", "address": {"line_one": "123 Test St", "city": "San Francisco", "region_id": "ca", "country_id": "us", "postal_code": "94102" }},
  "payment": {"provider": "stripe", "token": "tok_test_visa_4242", "card": {"brand": "visa", "last4": "4242", "exp_month": 12, "exp_year": 2027 }},
  "totals": {"subtotal": 29.99, "discount": 0, "tax": 2.40, "shipping": 5.99, "total": 38.38}
}'

Expected response:

{"success":true,"order_id":"ORD-12345"}

D. End-to-End Checkout Test

After testing individual endpoints, verify the full flow by triggering a purchase through an AI platform in test mode. Check your server logs to confirm all three endpoints were called in sequence: Account, Cart, then Checkout.

Step 6: Go Live

Production Checklist

Replace test credentials with production credentials Verify production feed URL is accessible Test webhook endpoint with production domain Verify HTTPS certificate is valid Configure monitoring and error alerting Test at least one production order end-to-end Enable AI platform distribution (OpenAI, Google, etc.)

Monitoring

Use the Forter Portal to monitor:

Troubleshooting

Feed not fetching

Solution:

Endpoint authentication failing

Solution:

Cart endpoint returning errors

Solution:

Checkout endpoint failing

Solution:

Orders not created in your system

Solution:

Best Practices

Feed Management

Webhook Security

Error Handling

Quick Reference

Supported Feed Formats

Merchant Endpoints

Endpoint Event Type Fatal Purpose
Account account.login No Customer lookup
Cart cart.created, cart.updated Yes Pricing, shipping, totals
Checkout order.created Yes Order creation

Endpoint Authentication

Bearer Token: Authorization: Bearer {webhook_secret}
HMAC Signing: {Your-Store-Name}-Signature: hmac-sha256={hex_digest}

Both methods can be enabled simultaneously in the Forter Portal.

Required Checkout Response

{
  "success": true,
  "order_id": "..."
}

Next Steps

Support

For custom integration questions, contact your Forter representative or email support@forter.com.