Skip to content

Migrating from Kentico Xperience 13

Kentico Xperience 13 reaches end of support on December 31, 2026. After that date Kentico ships no hotfixes or security patches for it, and existing sites keep running as unsupported software. Sources.

Your store's commerce can move to Flint while your pages stay where they are. Your ASP.NET live site keeps rendering product pages, and Flint takes over everything from the cart onward: pricing, discounts, tax, shipping rates, payment, the order record, receipts, a customer account, refunds, and fulfillment. Four parts need real work:

  • Catalog and customers. Load your SKUs, option categories, variants, and customers into Flint, keeping each Kentico ID beside the Flint object it became.
  • The checkout. Your site creates a Flint order from the shopping cart and sends the buyer to Flint's hosted checkout, in place of CreateOrder() and your payment gateway code.
  • Tax. Replace each tax class's rate table with automatic tax or with rates from your own engine.
  • Gift cards and coupons. Import every gift card balance with its code in one batch, have an owner or admin approve it in the Dashboard when the book totals more than $10,000.00, and retire the codes in Kentico so they can't be spent twice.

The migration checklist lists every step, and the cutover plan covers the switch itself. To try each request as you read, create a Flint account and use its sandbox.

How your site and Flint fit together#

Kentico 13 live sites run as an ASP.NET Core application or an ASP.NET MVC 5 application on .NET Framework 4.8, beside the Xperience administration, and both read the same database. The site builds its own checkout on IShoppingService: it manages the cart, collects customer details, and creates the order in the order review step, then hands the order to a payment gateway you implemented. Sources.

On Flint, the cart can stay in IShoppingService. The order review step changes:

A Kentico cart paid through Flint's hosted checkoutResponse
BrowserYour ASP.NET siteFlint1. the buyer clicks Pay2. POST /v1/orders from the cart lines3. POST /v1/checkout-sessionsthe session's url4. redirect to url5. address, shipping, codes, gift cards, payment6. redirect to your success URL7. order.paid webhook
  1. Browser sends 1. the buyer clicks Pay to Your ASP.NET site
  2. Your ASP.NET site sends 2. POST /v1/orders from the cart lines to Flint
  3. Your ASP.NET site sends 3. POST /v1/checkout-sessions to Flint
  4. Flint returns the session's url to Your ASP.NET site
  5. Your ASP.NET site returns 4. redirect to url to Browser
  6. Browser sends 5. address, shipping, codes, gift cards, payment to Flint
  7. Flint returns 6. redirect to your success URL to Browser
  8. Flint sends 7. order.paid webhook to Your ASP.NET site

Flint creates no Kentico order. The Flint order is the record of the sale, and Flint sends the buyer's receipt. Content, product pages, search, and sign-in stay in Kentico or in whatever CMS you move to later.

What changes in every request#

Flint publishes Node.js and PHP SDKs. A .NET site calls the REST API directly with HttpClient, as the C# examples below show.

Kentico 13Flint
Where the logic runsThe Xperience API in your site's process, against your databaseHTTPS calls to https://api.withflintpay.com. A test key (flint_test_...) runs in a sandbox, and a live key moves real money.
AuthenticationKentico users and rolesAuthorization: Bearer with an API key that has the permissions each call needs. Use it only on your server.
PricesDecimals in the site's main currency, such as 29.99Integers in the currency's minor unit: {"amount": 2999, "currency": "USD"}
Prices that include taxThe site's Prices include tax settingprice_mode of inclusive on the order's tax calculation, or the tax.default_price_mode setting
IDsIntegers, such as SKUID 1234Prefixed strings, such as var_.... Keep each Kentico ID in external_reference_id, which list endpoints filter by.
Retrying a writeNo equivalent: the Xperience API runs in your site's processIdempotency-Key header, required on routes that can create a money or stock movement
Phone numbersFree textE.164 only, such as +14155551234

Derive each idempotency key from the Kentico ID and the action, such as import-sku-1234, so a rerun import returns what the first run created. Choose a key has the rules.

Kentico objects and their Flint equivalents#

Kentico 13FlintNotes
Product (SKU)Product and its variantsA Flint product has no price or SKU. Its variant carries both, and an order line names a variant_id.
Product variantVariant, with selected_optionsEach Kentico variant becomes one Flint variant with the same SKU, price, weight, and stock
Option category of type Attribute, used for variantsOptions on the productColor and Size become options; each combination you sell becomes a variant
Option category of type Attribute, used without variantsList modifier groupEach option becomes a modifier with unit_price_delta_money
Option category of type ProductsList modifier group, or a separate product on its own lineUse a separate line when the accessory has its own stock or tax treatment
Option category of type TextText modifier groupAn inscription or name, with max_length
Product representation: Standard productproduct_type of physical, or service when nothing ships
Product representation: E-productproduct_type: "digital"Your site serves the files after order.paid. Flint doesn't host downloads.
Product representation: Membershipproduct_type: "service", or a subscription plan for recurring accessAssign the Kentico roles from your order.paid handler
Product representation: BundleBundleSold as one line at its own price
Product type (page type)Stays in KenticoIt shapes your product pages. Store the Flint variant ID with the page's SKU.
Department, brand, manufacturer, supplier, collectionCategories, or metadataCategories group products and target promotions and returns
List pricecompare_at_price_moneyMust be higher than the selling price. See Sale reference prices.
Volume discountquantity_price_breaks on the variantMultiply the unit price by 1 - discount_percent / 100 using decimal arithmetic. Round the result once to the nearest currency minor unit, with ties away from zero. See Set prices for larger quantities.
Track inventory, available itemsInventory item and its level at a locationBy variants becomes one inventory item per variant
Sell only if items available, turned offbackorder.enabled on the inventory itemSee Sell past available stock
Package weight, height, width, depthunit_weight and unit_dimensions on the variantChoose the units your Kentico store used. Flint prices weight-based shipping from unit_weight.
Tax classline_item_tax_category and taxable on the variantSee Choose how Flint calculates tax
CustomerCustomerName, email, phone, and external_reference_id
Customer addressesSaved addressesMark the billing and shipping defaults
Customer creditA gift card for that customerFlint's store credit is a gift card
Order and order itemsOrder and its line itemsSee Order history
Order statuspayment_status, fulfillment_status, and metadataFlint's statuses are fixed. Keep custom labels in metadata.
Shipping option (carrier and service)Delivery methodSee Shipping options and carriers
Catalog discount, order discount, Buy X Get Y, free shipping offer, product couponPromotionSee Discounts and coupon codes
Coupon codePromotion codeRedemption limit becomes max_uses
Gift card and its coupon codesGift card per codeSee Gift cards and customer credit
Online payment method and your gateway codeHosted checkoutSee Replace the checkout
Manual payment method Pay by invoiceOrder on account at checkoutA customer you approve places the order without paying, and Flint issues the invoice on their payment terms. See Pay by invoice and purchase orders.
Manual payment method Purchase orderOrder on account at checkout, with a required PO numberThe PO number prints on the invoice
Cash on delivery and other manual payment methodsAn invoice with an offline payment recorded
Capture payment on the order's Billing tabManual captureHosted checkout always captures at payment. Holding a card until you ship needs your own payment page.
Order notification emailsFlint's receipts and buyer emails

Before you start#

  • Keys. Create a test key in the dashboard. Test keys and live keys use the same base URL.
  • Export your data. The SQL queries below read products, variants, customers, addresses, orders, gift card balances, and customer credit from your Kentico database. Kentico exports each discount's coupon codes to Excel, CSV, or XML from the administration interface. Export again for the final delta.
  • Keep the ID maps. Store each Kentico ID with the Flint ID it became: SKU ID to variant_id, customer ID to customer_id. The checkout looks them up on every order.
  • Set up the account. Finish onboarding so the account can take live payments, connect tax, and create your delivery methods.

Call Flint from your ASP.NET site#

Register a typed HttpClient once. The examples target an ASP.NET Core site on .NET 8 or later:

csharp
// Program.cs
using System.Net.Http.Headers;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddHttpClient<FlintClient>(client =>
{
    client.BaseAddress = new Uri("https://api.withflintpay.com/");
    // A flint_test_... key in development, the live key in production. Keep it server-side.
    client.DefaultRequestHeaders.Authorization =
        new AuthenticationHeaderValue("Bearer", builder.Configuration["Flint:ApiKey"]);
    client.DefaultRequestHeaders.Add("Flint-Version", "2026-09-07");
});

Keep the key in your secret store or an environment variable, never in appsettings.json in source control. The Flint-Version header pins the API version your code was written against.

The client sends JSON with the field names exactly as written, adds the Idempotency-Key, unwraps data from a success, and raises Flint's error envelope as an exception:

csharp
// FlintClient.cs
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;

public sealed class FlintClient(HttpClient http)
{
    // Keep snake_case property names as written, and leave null fields out of the body.
    private static readonly JsonSerializerOptions Json = new()
    {
        DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
    };

    // Reuse the same idempotencyKey when you retry after a timeout or a 5xx.
    public Task<JsonElement> PostAsync(string path, object body, string idempotencyKey,
        CancellationToken ct = default)
    {
        var request = new HttpRequestMessage(HttpMethod.Post, path)
        {
            Content = new StringContent(JsonSerializer.Serialize(body, Json), Encoding.UTF8, "application/json"),
        };
        request.Headers.Add("Idempotency-Key", idempotencyKey);
        return SendAsync(request, ct);
    }

    public Task<JsonElement> GetAsync(string path, CancellationToken ct = default) =>
        SendAsync(new HttpRequestMessage(HttpMethod.Get, path), ct);

    // A list puts its page in "data" and the next page's token in "next_page_token".
    public async Task<(JsonElement Data, string? NextPageToken)> ListAsync(string path,
        CancellationToken ct = default)
    {
        JsonElement body = await SendForBodyAsync(new HttpRequestMessage(HttpMethod.Get, path), ct);
        string? next = body.TryGetProperty("next_page_token", out JsonElement token) &&
            token.ValueKind == JsonValueKind.String ? token.GetString() : null;
        return (body.GetProperty("data"), next);
    }

    // Successful responses wrap the object in "data".
    private async Task<JsonElement> SendAsync(HttpRequestMessage request, CancellationToken ct) =>
        (await SendForBodyAsync(request, ct)).GetProperty("data");

    private async Task<JsonElement> SendForBodyAsync(HttpRequestMessage request, CancellationToken ct)
    {
        using (request)
        using (HttpResponseMessage response = await http.SendAsync(request, ct))
        {
            using JsonDocument document = await JsonDocument.ParseAsync(
                await response.Content.ReadAsStreamAsync(ct), cancellationToken: ct);
            if (!response.IsSuccessStatusCode)
            {
                JsonElement error = document.RootElement.GetProperty("error");
                throw new FlintApiException((int)response.StatusCode,
                    error.GetProperty("code").GetString(),
                    error.GetProperty("message").GetString(),
                    error.TryGetProperty("param", out JsonElement param) ? param.GetString() : null);
            }
            return document.RootElement.Clone();
        }
    }
}

public sealed class FlintApiException(int status, string? code, string? message, string? param)
    : Exception($"Flint returned {status} {code}: {message}")
{
    public int Status { get; } = status;
    public string? Code { get; } = code;
    public string? Param { get; } = param;
}

Request bodies are anonymous objects whose property names are Flint's field names, such as new { type = "variant", variant_id = variantId, quantity = 2 }.

On an ASP.NET MVC 5 site, the requests, headers, and bodies stay the same, and the C# needs porting: write the classes with ordinary constructors for the older C# version, add the System.Text.Json package from NuGet, move the controllers to System.Web.Mvc, read the webhook body from Request.InputStream, and replace CryptographicOperations.FixedTimeEquals in the webhook verifier with a constant-time comparison of your own, because .NET Framework 4.8 doesn't include it.

Load data with imports#

You load the catalog, customers, and gift cards with imports: create an import of import_type products, customers, or gift_cards, add your export's rows to it as entries, start it, and read each entry's result. Flint creates the records in the background, so a load of thousands of rows is a handful of requests. The SQL queries below produce the export.

You can load the exports as CSV files in the Dashboard under Customers > Import, Products > Import, and Gift cards > Import. Flint matches the export columns and uses the same ref: keys and bare Kentico IDs as the API examples below. Review product tax classes and duplicate customer emails before importing.

To skip record webhooks in the Dashboard, clear Notify connected apps about these customers, products, or gift cards in the import confirmation when the checkbox appears. With the API, set send_webhook_events: false when you create the draft.

  1. Create a draft with POST /v1/imports. Send send_webhook_events: false for the initial load to skip events such as customer.created and product.created for imported rows. Flint still sends import.completed and any buyer emails you request through a gift card entry's notification.
  2. Add entries with POST /v1/imports/{import_id}/entries, up to 1,000 per request in a body of at most 2 MiB, and 512 KiB per entry. Each entry has a key, an optional source_reference such as customer 5521, and the object: a customer, a product, or a gift_card, in the same shape as its create request. The response returns each entry's status right away: pending when it's ready, or failed with the error to fix.
  3. Start it with POST /v1/imports/{import_id}/start, and read GET /v1/imports/{import_id} every two seconds, as its Retry-After header says, until status is completed. A gift card import worth more than you can import today instead waits in pending with pending_reason: approval_required until an owner or admin approves it. created_count, existing_count, and failed_count say what happened.
  4. Read the failures with GET /v1/imports/{import_id}/entries?status=failed. Each one names its key, source_reference, and an error whose param points into the entry, such as customer.phone or product.variants[0].sku.

Keys make the load safe to run again:

  • Derive each key from the Kentico ID. Send ref: and the bare Kentico ID: ref:1201 for the product whose parent SKUID is 1201, ref:5521 for customer 5521, and ref:881 for the gift card coupon code whose GiftCardCouponCodeID is 881, with the same bare ID in external_reference_id. These are the keys and references Flint's Dashboard importers use, so a load you start in the Dashboard and a rerun or final delta through the API, or the reverse, return existing instead of creating duplicates. Keep personal data such as emails, and gift card codes, out of keys.
  • A known key comes back existing. Flint remembers every key an import has used in the environment, even after the import's results expire. When you fix the failed rows and import the whole export again, every row that already went in returns succeeded with outcome existing, and only the fixed rows create records.
  • existing never changes the record. An edited row for a record that's already in Flint is skipped. Apply later changes with the update routes, as the cutover plan describes. Archiving a product, or erasing a customer, frees its key, so the next import creates it again. A gift card key never frees: once it created a card, it returns existing even after the card is closed.

Limits to plan around:

LimitValue
Entries per import50,000 customers, 10,000 products, or 50,000 gift cards. Split a larger export into several imports; the keys keep the split safe.
Unfinished imports per environment5, counting drafts and started imports that haven't finished, including a gift card import waiting for approval. One processes at a time, and the others wait in pending. A sixth returns 409 LIMIT_REACHED with reason active_imports.
Unstarted draftsExpire 24 hours after you create them
Gift card value per import$1,000,000.00 across the entries still pending
Waiting for approvalA gift card import expires 7 days after it starts waiting
ResultsEach import and its entry results stay readable for 90 days

The key needs customers.write for customer imports; commerce.products.write for product imports, with commerce.inventory.write for opening stock; and commerce.gift_cards.write for gift card imports, with commerce.gift_cards.secrets.write for entries that email a new code. Categories and Locations have their own create routes, so the key also needs commerce.catalog.write, and merchants.locations.write with commerce.inventory.allocation.write. Run the whole load in a sandbox first, then again in live mode.

This class runs one import from a list of entries, using the FlintClient above. It uses C# 12 features, so run the load from a .NET 8 console app even if your site runs on ASP.NET MVC 5:

csharp
// KenticoImport.cs
using System.Runtime.CompilerServices;
using System.Text.Json;

public sealed class KenticoImport(FlintClient flint)
{
    // Creates a draft, adds the entries in batches, starts the import, and waits for it to finish
    // or to wait for approval.
    // runId is a new GUID for each attempt. Save it before the first request and reuse it only to
    // resume that same attempt after a crash, so a later run never replays an earlier one.
    public async Task<JsonElement> RunAsync(string importType, string name, string runId,
        IReadOnlyList<object> entries, int batchSize, CancellationToken ct)
    {
        string keyPrefix = $"kentico-import-{runId}";
        JsonElement import = await flint.PostAsync("v1/imports",
            new { import_type = importType, name, send_webhook_events = false }, keyPrefix, ct);
        string importId = import.GetProperty("import_id").GetString()!;

        int batchNumber = 0;
        foreach (object[] batch in entries.Chunk(batchSize))
        {
            await flint.PostAsync($"v1/imports/{importId}/entries",
                new { import_type = importType, entries = batch }, $"{keyPrefix}-entries-{batchNumber++}", ct);
        }

        await flint.PostAsync($"v1/imports/{importId}/start", new { }, $"{keyPrefix}-start", ct);
        return await WaitAsync(importId, ct);
    }

    // Returns the import once it finishes, or while it waits for an owner or admin to approve it.
    // After the approval, call WaitAsync again with the same importId.
    public async Task<JsonElement> WaitAsync(string importId, CancellationToken ct)
    {
        while (true)
        {
            JsonElement import = await flint.GetAsync($"v1/imports/{importId}", ct);
            if (import.GetProperty("status").GetString() is "completed" or "canceled" or "expired" ||
                (import.TryGetProperty("pending_reason", out JsonElement reason) &&
                    reason.GetString() == "approval_required"))
            {
                return import;
            }
            await Task.Delay(TimeSpan.FromSeconds(2), ct); // the Retry-After Flint sends while it works
        }
    }

    // Each failed entry carries its key, its source_reference, and the error to fix.
    public async IAsyncEnumerable<JsonElement> FailedEntriesAsync(string importId,
        [EnumeratorCancellation] CancellationToken ct = default)
    {
        string? pageToken = null;
        do
        {
            string path = $"v1/imports/{importId}/entries?status=failed&page_size=100"
                + (pageToken is null ? "" : $"&page_token={Uri.EscapeDataString(pageToken)}");
            (JsonElement entries, pageToken) = await flint.ListAsync(path, ct);
            foreach (JsonElement entry in entries.EnumerateArray())
            {
                yield return entry;
            }
        } while (pageToken is not null);
    }
}

Each POST sends an Idempotency-Key built from the run ID, so a retry after a lost response returns the same draft or batch instead of adding it twice. Start every attempt, including the import you run again after fixing failed rows, with a new run ID: the entry keys, not the run ID, are what make a second run return existing. If the process stops before it saved the draft's import_id, find the draft with GET /v1/imports?import_type={importType}&idempotency_key=kentico-import-{runId}. Use the run's import type, such as products, and continue from the returned draft. Choose a batch size that keeps each request under 2 MiB: customers and gift cards fit 1,000 to a request, and products with many variants or images fit fewer, such as 100.

Recreate the catalog#

Export products and variants#

Kentico stores products, variants, and product options as rows of dbo.COM_SKU. A variant points to its product in SKUParentSKUID, and COM_VariantOption links it to the option SKUs it was built from, each of which names its option category in SKUOptionCategoryID. This query, for SQL Server, returns one row per SKU you sell: each variant, or the product itself when it has no variants. Bundles, option SKUs, and other sites' products are left out:

SQL
-- One row per SKU you sell: each variant, or the product itself when it has no variants.
-- Global products have a NULL SKUSiteID. Replace 1 with your site's ID.
WITH sellable AS (
    SELECT p.SKUID AS ProductSKUID, COALESCE(v.SKUID, p.SKUID) AS SellSKUID
    FROM COM_SKU p
    LEFT JOIN COM_SKU v ON v.SKUParentSKUID = p.SKUID
    WHERE p.SKUParentSKUID IS NULL
      AND p.SKUOptionCategoryID IS NULL
      AND p.SKUProductType IN ('PRODUCT', 'EPRODUCT', 'MEMBERSHIP')
      AND (p.SKUSiteID = 1 OR p.SKUSiteID IS NULL)
),
variant_options AS (
    SELECT vo.VariantSKUID,
           c.CategoryDisplayName AS OptionName,
           o.SKUName AS OptionValue,
           DENSE_RANK() OVER (PARTITION BY v.SKUParentSKUID ORDER BY c.CategoryID) AS OptionPosition
    FROM COM_VariantOption vo
    JOIN COM_SKU v ON v.SKUID = vo.VariantSKUID
    JOIN COM_SKU o ON o.SKUID = vo.OptionSKUID
    JOIN COM_OptionCategory c ON c.CategoryID = o.SKUOptionCategoryID
),
option_columns AS (
    SELECT VariantSKUID,
           MAX(CASE WHEN OptionPosition = 1 THEN OptionName END) AS option1_name,
           MAX(CASE WHEN OptionPosition = 1 THEN OptionValue END) AS option1_value,
           MAX(CASE WHEN OptionPosition = 2 THEN OptionName END) AS option2_name,
           MAX(CASE WHEN OptionPosition = 2 THEN OptionValue END) AS option2_value,
           MAX(CASE WHEN OptionPosition = 3 THEN OptionName END) AS option3_name,
           MAX(CASE WHEN OptionPosition = 3 THEN OptionValue END) AS option3_value,
           MAX(OptionPosition) AS option_count
    FROM variant_options
    GROUP BY VariantSKUID
)
SELECT
    p.SKUID AS product_reference,
    p.SKUName AS name,
    COALESCE(NULLIF(p.SKUDescription, ''), p.SKUShortDescription) AS description,
    CASE
        WHEN p.SKUProductType = 'EPRODUCT' THEN 'digital'
        WHEN p.SKUProductType = 'MEMBERSHIP' OR p.SKUNeedsShipping = 0 THEN 'service'
        ELSE 'physical'
    END AS product_type,
    CASE WHEN p.SKUEnabled = 1 THEN 'active' ELSE 'inactive' END AS status,
    d.DepartmentDisplayName AS categories,
    p.SKUImagePath AS image_urls,
    oc.option1_name, oc.option1_value,
    oc.option2_name, oc.option2_value,
    oc.option3_name, oc.option3_value,
    oc.option_count,
    CASE WHEN s.SKUID <> p.SKUID THEN s.SKUName END AS variant_name,
    s.SKUID AS variant_reference,
    CASE WHEN s.SKUEnabled = 1 THEN 'active' ELSE 'inactive' END AS variant_status,
    s.SKUNumber AS sku,
    s.SKUPrice AS price,
    s.SKURetailPrice AS compare_at_price,
    t.TaxClassDisplayName AS kentico_tax_class,
    COALESCE(NULLIF(s.SKUWeight, 0), p.SKUWeight) AS weight,
    COALESCE(NULLIF(s.SKUDepth, 0), p.SKUDepth) AS [length],
    COALESCE(NULLIF(s.SKUWidth, 0), p.SKUWidth) AS width,
    COALESCE(NULLIF(s.SKUHeight, 0), p.SKUHeight) AS height,
    CASE WHEN s.SKUID <> p.SKUID THEN s.SKUImagePath END AS variant_image_urls,
    p.SKUTrackInventory AS kentico_track_inventory,
    s.SKUAvailableItems AS stock,
    p.SKUAvailableItems AS product_stock
FROM sellable x
JOIN COM_SKU p ON p.SKUID = x.ProductSKUID
JOIN COM_SKU s ON s.SKUID = x.SellSKUID
LEFT JOIN COM_Department d ON d.DepartmentID = p.SKUDepartmentID
LEFT JOIN COM_TaxClass t ON t.TaxClassID = COALESCE(s.SKUTaxClassID, p.SKUTaxClassID)
LEFT JOIN option_columns oc ON oc.VariantSKUID = s.SKUID
ORDER BY p.SKUID, s.SKUID;

Each row's columns map to Flint:

ColumnFlint fieldNotes
product_referenceProduct external_reference_id, and the entry key as ref:{product_reference}Rows with the same value form one product
name, descriptionname, descriptionA Flint description is plain text of at most 2,048 characters. Strip the HTML Kentico descriptions often hold, and shorten longer ones.
product_type, statusproduct_type, product statusinactive when the product's Allow for sale is off
categoriescategory_handlesCreate one category per department first. A handle uses lowercase letters, digits, and single hyphens, such as drinkware or kitchen-tools, so turn each department name into one.
image_urls, variant_image_urlsimages[].source_urlKentico stores a path on your site. Prefix your site's address to make it an absolute HTTPS URL; Flint downloads it while the import runs. See Images.
option1_name to option3_valueoptions and each variant's selected_optionsoption_count above 3 means the product has more option categories: add positions to the query
variant_name, variant_reference, variant_statusVariant name, external_reference_id, and variant statusvariant_status is inactive when the variant's Allow for sale is off
skuVariant sku
price, compare_at_priceunit_price_money, compare_at_price_moneyDecimals in your main currency: multiply by 100 for USD. Leave out a compare-at price that isn't higher than the price.
kentico_tax_classline_item_tax_category, or taxable: falseSee Choose how Flint calculates tax
weight, length, width, heightunit_weight, unit_dimensionsIn the units your Kentico store used. Send all three dimensions or none.
kentico_track_inventory, stock, product_stockAn inline inventory_item with opening_stockWhen Kentico tracks stock for the whole product rather than by variants, the count is in product_stock

In the Dashboard, review any row marked Kentico tax class needs review. A custom class called Exempt does not make a variant tax-exempt in Flint. If the variant should be exempt everywhere you sell it, add a taxable column and set it to false on that row. For a product with both taxable and exempt variants, set the value explicitly on each variant row.

Create the stock Location#

Opening stock goes to a Location, such as your warehouse, which must exist before the import starts. Orders take stock only from a Location with inventory_allocation_enabled: true, and the flag defaults to false, so turn it on when you create the Location:

cURL
curl -X POST https://api.withflintpay.com/v1/locations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: kentico-location-warehouse" \
  -d '{
    "name": "Austin warehouse",
    "address": {"line1": "500 Industrial Blvd", "city": "Austin", "state": "TX", "postal_code": "78744", "country": "US"},
    "inventory_allocation_enabled": true
  }'

For a Location you already have, send {"inventory_allocation_enabled": true} with PATCH /v1/locations/{location_id}. Either needs the commerce.inventory.allocation.write scope as well as merchants.locations.write. Make a Location that can hold stock has the details. Create the categories your rows name before you start the import, too.

Add product entries#

Group the export's rows by product_reference: each group is one product entry, with its options and up to 250 variants. Each variant that sends inventory_item creates its own inventory item, and opening_stock sets its count at your Location. The water bottle from the export, sold in two colors and two sizes, as one entry:

cURL
curl -X POST https://api.withflintpay.com/v1/imports/imp_1kmn0aExample/entries \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: imp_1kmn0aExample-entries-0" \
  -d '{
    "import_type": "products",
    "entries": [{
      "key": "ref:1201",
      "source_reference": "SKUID 1201",
      "product": {
        "variant_mode": "optioned",
        "name": "Insulated water bottle",
        "product_type": "physical",
        "category_handles": ["drinkware"],
        "external_reference_id": "1201",
        "images": [{"source_url": "https://shop.example.com/getmetafile/abc/bottle.aspx", "alt": "Insulated water bottle"}],
        "options": [
          {"name": "Color", "values": [{"value": "Black"}, {"value": "White"}]},
          {"name": "Size", "values": [{"value": "20 oz"}, {"value": "32 oz"}]}
        ],
        "variants": [
          {
            "name": "Black / 20 oz",
            "sku": "BTL-BLK-20",
            "unit_price_money": {"amount": 2999, "currency": "USD"},
            "compare_at_price_money": {"amount": 3499, "currency": "USD"},
            "line_item_tax_category": "physical_goods",
            "unit_weight": {"value": 14, "unit": "ounce"},
            "external_reference_id": "1202",
            "inventory_item": {"name": "Insulated water bottle - Black / 20 oz", "sku": "BTL-BLK-20"},
            "opening_stock": [{"location_id": "loc_1kmn0aExample", "on_hand_quantity": 12}],
            "selected_options": [
              {"option_name": "Color", "value": "Black"},
              {"option_name": "Size", "value": "20 oz"}
            ]
          },
          {
            "name": "White / 32 oz",
            "sku": "BTL-WHT-32",
            "unit_price_money": {"amount": 3299, "currency": "USD"},
            "line_item_tax_category": "physical_goods",
            "unit_weight": {"value": 19, "unit": "ounce"},
            "external_reference_id": "1205",
            "inventory_item": {"name": "Insulated water bottle - White / 32 oz", "sku": "BTL-WHT-32"},
            "opening_stock": [{"location_id": "loc_1kmn0aExample", "on_hand_quantity": 4}],
            "selected_options": [
              {"option_name": "Color", "value": "White"},
              {"option_name": "Size", "value": "32 oz"}
            ]
          }
        ]
      }
    }]
  }'

A product with no variants is one row: send "variant_mode": "simple" and put the price, SKU, inventory_item, and opening_stock in default_variant instead of options and variants. Flint creates each product with its options, variants, inventory items, and images together, or not at all.

  • Opening stock. opening_stock needs a new inline inventory_item on the same variant, takes up to 20 Locations, and a whole on_hand_quantity from 0. Kentico counts below zero go in as 0. When Kentico tracks stock for the whole product rather than by variants, the count is in product_stock. If the product is created but its stock can't be recorded, the entry is failed with the product in resource and an error on an opening_stock line: set that stock with an inventory adjustment, because importing the row again returns existing and leaves stock as it is.
  • Images. Flint downloads each source_url while the import runs. Include up to 8 images in each product or variant gallery, and up to 32 external image URLs across the entire product entry. A download that fails fails the entry, so check that each URL opens before you start.
  • Variants Kentico never defined. Kentico sells only the combinations you selected under Define available variants, and the export returns only those. Flint never generates variants from options either.
  • SKUs must be unique. A SKU is unique across every variant and bundle in the Flint environment, and a duplicate fails the entry with ALREADY_EXISTS naming the variant that has it. Fix duplicate Kentico SKU numbers before you load.
  • Min and max items in one order. Flint has no per-product quantity limits. Keep enforcing them in your cart before you create the order.
  • Option categories of type Products and Text. The export leaves them out. Create the modifier groups and set, then attach the set to the product. The cart line then sends modifiers. A Products-type option that has its own stock is better sold as its own product and line.
  • Bundles. Create each Kentico bundle as a Flint bundle with POST /v1/bundles once the import has created its component products.
  • Backorders. An item that Kentico sold past zero with Sell only if items available turned off also needs backorder.enabled on its inventory item; see Sell past available stock.

When the import completes, build the map your checkout uses from Kentico SKUID to Flint variant_id. Page through GET /v1/products?expand=variants&page_size=100, and store each variant's variant_id and inventory_item_id under its external_reference_id, the variant's Kentico SKUID, such as 1202.

Move customers#

Export customers and addresses#

Kentico keeps customers in COM_Customer and their saved addresses in COM_Address, with countries and states in CMS_Country and CMS_State. Registered and anonymous customers share the table. This query returns one row per customer, with the address they changed most recently and their paid-order totals from COM_Order:

SQL
-- One row per customer, with their most recently changed address and paid-order totals.
WITH latest_address AS (
    SELECT a.*,
           ROW_NUMBER() OVER (PARTITION BY a.AddressCustomerID
                              ORDER BY a.AddressLastModified DESC, a.AddressID DESC) AS AddressRank
    FROM COM_Address a
),
paid_orders AS (
    SELECT OrderCustomerID,
           COUNT(*) AS OrderCount,
           SUM(OrderGrandTotalInMainCurrency) AS TotalSpent
    FROM COM_Order
    WHERE OrderIsPaid = 1
    GROUP BY OrderCustomerID
)
SELECT
    c.CustomerID AS customer_reference,
    c.CustomerFirstName AS first_name,
    c.CustomerLastName AS last_name,
    c.CustomerEmail AS email,
    c.CustomerPhone AS phone,
    CASE WHEN a.AddressID IS NOT NULL THEN
        COALESCE(NULLIF(LTRIM(RTRIM(a.AddressPersonalName)), ''),
                 NULLIF(LTRIM(RTRIM(CONCAT(c.CustomerFirstName, ' ', c.CustomerLastName))), ''))
    END AS address_recipient_name,
    a.AddressLine1 AS address_line1,
    a.AddressLine2 AS address_line2,
    a.AddressCity AS address_city,
    st.StateCode AS address_state,
    a.AddressZip AS address_postal_code,
    co.CountryTwoLetterCode AS address_country,
    a.AddressPhone AS address_phone,
    c.CustomerCompany AS [metadata.company],
    c.CustomerCreated AS customer_since,
    o.OrderCount AS [metadata.legacy_orders_count],
    o.TotalSpent AS [metadata.legacy_total_spent]
FROM COM_Customer c
LEFT JOIN latest_address a ON a.AddressCustomerID = c.CustomerID AND a.AddressRank = 1
LEFT JOIN CMS_State st ON st.StateID = a.AddressStateID
LEFT JOIN CMS_Country co ON co.CountryID = a.AddressCountryID
LEFT JOIN paid_orders o ON o.OrderCustomerID = c.CustomerID
ORDER BY c.CustomerID;

Kentico doesn't mark a default billing or shipping address, so the query picks the most recently changed one. Add a customer's other addresses after the import with POST /v1/customers/{customer_id}/addresses.

Add customer entries#

Each row becomes one customer entry. Join first_name and last_name into name, normalize phone to E.164, send customer_since as customer_since_at, and send the metadata. columns under metadata as strings. The export uses the customer's name when a saved address has no recipient name. If neither name is available, supply a recipient name or leave the address out of the entry.

cURL
curl -X POST https://api.withflintpay.com/v1/imports/imp_1kmn0bExample/entries \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: imp_1kmn0bExample-entries-0" \
  -d '{
    "import_type": "customers",
    "entries": [{
      "key": "ref:5521",
      "source_reference": "CustomerID 5521",
      "customer": {
        "name": "Taylor Smith",
        "email": "taylor@example.com",
        "phone": "+15125550100",
        "external_reference_id": "5521",
        "on_email_conflict": "return_existing",
        "customer_since_at": "2019-04-02T15:00:00Z",
        "metadata": {
          "company": "Acme",
          "legacy_orders_count": "2",
          "legacy_total_spent": "150.50"
        },
        "addresses": [{
          "recipient_name": "Taylor Smith",
          "phone": "+15125550100",
          "address": {"line1": "1 Main St", "line2": "Apt 2", "city": "Austin", "state": "TX", "postal_code": "78701", "country": "US"},
          "is_default_billing": true,
          "is_default_shipping": true
        }]
      }
    }]
  }'
  • One customer per email. Flint compares emails without case. The Dashboard flags later rows in the same file that share an email. If the rows represent different customers, decide which customer should keep the email and remove it from the other rows. If they represent the same customer, keep one row and map every original Kentico customer ID to the Flint customer it creates or matches. With API entries that set on_email_conflict: "return_existing", a later entry with the same email returns the matching customer unchanged as existing. Save the Flint customer ID for each Kentico ID in the results. Leave out both email and on_email_conflict for a customer without an email address.
  • Customer since. customer_since_at takes an RFC 3339 timestamp at or before now. Convert Kentico's CustomerCreated from its source time zone to UTC or include the source offset. The Dashboard uses your Flint business time zone for timestamps without an offset. Include an offset in the CSV if the export uses another time zone or the local time falls in a skipped or repeated hour.
  • Metadata values are strings. Leave out a key whose value is empty, such as legacy_total_spent for a customer with no paid orders: Flint refuses an empty value. A customer holds up to 50 keys; see Metadata and your own IDs.
  • Phone numbers. Normalize each number to E.164, or leave phone out. Anything else fails the entry with INVALID_REQUEST on customer.phone. Send address_phone as the saved address's phone, normalized the same way.
  • States. A US or Canadian state must belong to its country. The query sends Kentico's state code.
  • Passwords stay in Kentico. Flint customers have no password. Keep Kentico sign-in on your site and set the signed-in user's customer_id on each order. Buyers can also open Flint's customer account with an emailed code.
  • Tax-exempt customers. A customer Kentico taxed at zero because they gave a tax ID becomes tax_exempt: true, or a tax exemption record with its certificate.

When the import completes, each succeeded entry's resource names the customer it created or matched, so save the map from Kentico customer ID to Flint customer_id from the entry results. GET /v1/imports/{import_id}/entries?status=succeeded pages through them in order.

Order history#

Flint doesn't import past orders. Orders paid in Kentico stay in Kentico's records, and Flint's order history starts at the cutover:

  • Keep an export. Save COM_Order and its COM_OrderItem lines before you retire the Kentico store, so support can answer questions about older purchases. This query returns one row per order line:

    SQL
    SELECT o.OrderID, o.OrderInvoiceNumber, o.OrderDate, o.OrderCustomerID,
           o.OrderIsPaid, o.OrderGrandTotal, o.OrderTotalTax, o.OrderTotalShipping,
           o.OrderTrackingNumber,
           i.OrderItemSKUID, i.OrderItemSKUName, i.OrderItemUnitCount, i.OrderItemUnitPrice
    FROM COM_Order o
    JOIN COM_OrderItem i ON i.OrderItemOrderID = o.OrderID
    ORDER BY o.OrderID;
    
  • Link the customer. OrderCustomerID is the Kentico customer ID, which the Flint customer carries as external_reference_id, so a support tool can go from a Flint customer to their Kentico orders.

  • Carry the totals. legacy_orders_count and legacy_total_spent in the customer's metadata keep each customer's Kentico history visible on their Flint record.

Refund a payment taken before the cutover through the payment gateway that took it. Flint refunds only payments Flint collected.

Order numbers#

Flint numbers each environment's orders from 1001, separately from Kentico's OrderInvoiceNumber, and has no setting to start from another number. A store whose Kentico numbers are already past 1001 has two orders with the same number, one in each system. Tell support to find both before answering: GET /v1/orders?order_number=1042 returns the Flint order with that exact number, and the order export holds the Kentico one. The order date, the buyer, and the receipt tell them apart: Flint orders are dated after your cutover.

My account, confirmation, and payment pages#

The pages your Kentico site built on its orders keep working for the orders Kentico holds, and Flint serves the new ones:

  • My account order history. Keep listing pre-cutover orders from COM_Order for the signed-in user, and link to Flint's customer account for orders placed after the cutover. A buyer already signed in to your site doesn't need to sign in again: create a link with POST /v1/customers/{customer_id}/access-links when they press the link, send return_url back to your My account page, and redirect them to the returned url at once. The url signs them in, so never email it or log it. To list Flint orders on your own page instead, read GET /v1/orders?customer_id=... from your server.
  • Order confirmation page. The Complete action above replaces it for new orders. Keep the old page serving Kentico orders, or point its route at your My account page once those orders no longer need it.
  • Payment gateway return and callback URLs. Nothing new reaches them: Flint returns the buyer to success_url or cancel_url. Keep the gateway's callback route until refunds and disputes on Kentico-era payments are settled, as in the cutover plan, then remove it. Redirect the gateway's buyer return page to your cart, so an old bookmark doesn't end on an error.

Choose how Flint calculates tax#

Kentico taxes a product by its tax class: a rate you enter for each country or state, applied at the billing or shipping address. Flint taxes each line by its variant's line_item_tax_category, in one of two modes:

Automatic taxExternal tax from your callback
Rates come fromFlint's tax connection, by the buyer's address, including local ratesYour endpoint, which Flint calls whenever the order's tax could change
Keeps your Kentico rate tablesNoYes, if your endpoint looks them up
CategoriesEight of twelve in the US. food, clothing, medical_goods, and admission are refused.Any
Outside the USVAT and GST on digital goods, software, and SaaS only. Physical goods to a country where you hold a registration are refused.Any country and product
FeeAutomatic tax fee on payments with tax above zeroNone

Warning: Shipping physical goods to the EU, the UK, Canada, Australia, or New Zealand

Outside the US, automatic tax calculates VAT and GST only on digital goods, software, and SaaS. Once a registration for one of these places is in effect, such as an EU registration for your OSS number, Flint refuses every order that ships taxable physical goods or charges taxable shipping there. Your site's POST /v1/orders fails for a signed-in buyer with a saved address there, and hosted checkout refuses the order once a guest enters one. Without a registration there, these orders go through with no tax, which is wrong for a store that must charge VAT.

A Kentico store that ships physical goods to buyers in those places and charges VAT on them needs external tax with a callback for its orders. Your callback can return Kentico's rates for those countries and US sales tax from your own engine. If you'd rather keep automatic tax, stop offering shipping to those countries in your delivery methods until you move to external tax. Shipping physical goods to a registered country has the details.

Choose automatic tax if you sell general merchandise and want rates kept current for you. Automatic tax taxes every physical_goods item at the general rate, so a state's clothing or food exemption isn't applied. It needs a tax connection and your registrations. Choose external tax with a callback if you sell food, clothing, medical goods, or admissions, if you already use a tax service such as Avalara through a Kentico customization, or if you must keep the exact rates in your tax classes. Your endpoint receives the order's lines and address and returns a rate per jurisdiction. Tax calculation callbacks has the request, the response, and signature verification. Once the callback is active, select it in tax.calculation_callback_id and set tax.default_calculation to {"mode": "external", "components_source": "callback"} with PATCH /v1/settings, so the orders your checkout creates without their own tax ask your endpoint.

Then map the rest of your Kentico tax settings:

  • Tax class on a product. Set line_item_tax_category on each variant, such as physical_goods or clothing. A tax class with no rates becomes taxable: false. The tax categories table lists all twelve.
  • Tax class on a shipping option. Set the delivery method's configuration.taxable, and list states where shipping is exempt in configuration.tax_exempt_us_states.
  • Tax on product options. A modifier carries its own taxable and line_item_tax_category.
  • Apply taxes based on billing or shipping address. Flint taxes a shipped order at its delivery address and other orders at the billing address. Tax location lists the order of precedence.
  • Prices include tax. Set tax.default_price_mode to inclusive in settings.
  • Zero tax if tax ID is supplied. Mark the customer exempt; see Tax exemptions.

Turn on Calculate tax on new orders (tax.default_enabled) so every order your checkout creates is taxed without sending tax on each request.

Shipping options and carriers#

A Kentico shipping option is a carrier's service with its own price and tax class. Each becomes a Flint delivery method that hosted checkout offers when the buyer's address and cart qualify:

KenticoFlint delivery method
Default carrier, weight-based shipping serviceshipment method with tiered pricing on choice_group.total_weight, one band per Kentico weight level. One cost for every weight becomes fixed pricing; Add shipping to a checkout sets one up.
Custom carrier that prices by country or staterate_table pricing with delivery zones
Custom carrier provider that calls FedEx, UPS, or USPScallback pricing: Flint calls your rate endpoint during checkout
Free shipping offerA free shipping promotion
A shipping option you use for in-store pickuppickup method at a location

Hosted checkout offers the methods in your checkout default, unless a session names its own in delivery_method_ids. Save every method you create there, so the sessions your site creates offer them:

cURL
curl -X PATCH https://api.withflintpay.com/v1/settings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "checkout": {
      "default_delivery_method_ids": ["dmet_1kmn0aExample", "dmet_1kmn0bExample"]
    }
  }'

Each PATCH replaces the whole list, of up to 25 methods. If no method can ship one of an order's items, Flint refuses to create the checkout session with 409 ACTION_NOT_ALLOWED, reason configuration_required, and param delivery_method_ids; Offer the method on every checkout covers it.

Flint doesn't buy labels or track carriers. Your shipping software creates the label and reports tracking to the order's fulfillment, and Flint emails the buyer when each package ships. Send the carrier's tracking_url with the tracking_number: Flint doesn't build tracking links, so without it the email has no link to follow. A variant with no unit_weight hides weight-priced methods, so load weights with the catalog.

Discounts and coupon codes#

Every Kentico discount type becomes a Flint promotion. Coupon codes become the promotion's codes, and an automatic discount becomes redemption_type: "automatic".

KenticoFlint promotion
Catalog discount for a brand or departmentdiscount_class: "line_item" with a line_item.categories rule. See Percent off a category.
Order discountdiscount_class: "order", with an order.subtotal rule for a minimum. See Spend threshold.
Buy X Get Y discountapplication_method.type: "buy_x_get_y". See Buy X, get Y.
Free shipping offerdiscount_class: "service_charge" on shipping charges
Product couponA line_item promotion with redemption_type: "code"
Discount for selected customersA customer.segment rule, with segment set on those customers
Valid from and Valid toschedule.starts_at and schedule.ends_at
Coupon code redemption limitmax_uses on the code

Coupon codes keep working as buyers type them: Flint matches codes without case, as Kentico does. Kentico applies its discount types in a fixed order; Flint applies promotions by the stacking rules you set with combines_with and exclusivity, described in Control how offers stack. Hosted checkout shows a code field whenever an active code promotion exists.

Set how many promotions can apply to one order before you go live. Kentico applies every catalog discount, order discount, and free shipping offer an order qualifies for. Flint applies at most max_promotions_per_order promotions, counting automatic promotions and codes together, and it's 2 unless you change it. An order that qualifies for a catalog discount, an order discount, and free shipping keeps two of them, ranked by your stacking rules and then by the larger discount. The buyer pays more than they did on Kentico, and nothing at checkout says an automatic offer was left out. A code is ranked with the automatic offers too. When the order is at the limit, a code can take the place of an applied offer with a smaller discount, if your stacking rules let it combine with the offers that stay, and that offer is dropped without a message. A code that loses the ranking is declined with a message. Raise the limit to the most offers one of your Kentico orders could combine, up to 10, under Promotions per order in Settings > Promotions, or with PATCH /v1/settings:

cURL
curl -X PATCH https://api.withflintpay.com/v1/settings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"promotions": {"max_promotions_per_order": 3}}'

Turn promotions on or off has the rest of the promotion settings.

Gift cards and customer credit#

Kentico keeps gift cards in COM_GiftCard and their coupon codes in COM_GiftCardCouponCode. Each coupon code is one voucher with its own remaining value, so each code with value left becomes one Flint gift card funded by import, with the Kentico code in code. Holders keep using the code they already have. Gift cards are USD only.

One gift_cards import moves the whole book:

  1. Export the balances with one SQL query.
  2. Load them as a CSV file in the Dashboard, or as entries through the API.
  3. When the total is more than you can import that day, an owner or admin approves the import once, in the Dashboard.
  4. Retire the codes in Kentico, as the cutover plan describes, so their value can't be spent twice.

How much you can import#

All imported gift card value counts toward one total for the environment, whether or not a card names a customer. Without approval, an environment imports up to $10,000.00 of gift card value per UTC day. To import more, an owner or admin of your Flint account approves an import allowance in the Dashboard: an extra amount, from $1.00 to $1,000,000.00, that imports can use for 1 to 30 days. They confirm their sign-in again before approving, and in live mode Flint emails every owner when an allowance is approved. Imports use the allowance first, then the daily limit.

No API key can approve or enlarge an allowance, and the API has no route that writes one. GET /v1/gift-card-import-allowances lists them with status (active, used_up, expired, or canceled), amount_money, used_money, remaining_money, and expires_at, and the gift_card_import_allowance.created, .used_up, .expired, and .canceled events report each change. Import allowances has the details.

The per-card limits still apply: a card holds at most $2,000.00. Positive balance adjustments keep their own limit of $10,000.00 per day and never use an allowance. A sandbox follows the same rules, so a rehearsal there waits for its own approval.

Export gift card balances#

This query, for SQL Server, returns one row per coupon code with value left. Balances are in your site's main currency, which must be US dollars:

SQL
-- One row per gift card coupon code with value left. Replace 1 with your site's ID.
SELECT
    c.GiftCardCouponCodeID AS gift_card_reference,
    c.GiftCardCouponCodeCode AS code,
    c.GiftCardCouponCodeRemainingValue AS balance
FROM COM_GiftCardCouponCode c
JOIN COM_GiftCard g ON g.GiftCardID = c.GiftCardCouponCodeGiftCardID
WHERE g.GiftCardSiteID = 1
  AND c.GiftCardCouponCodeRemainingValue > 0
ORDER BY c.GiftCardCouponCodeID;

Its columns are the ones Flint's gift card template uses:

ColumnFlint fieldNotes
gift_card_referenceThe entry key as ref:{gift_card_reference}, and the card's external_reference_idThe Kentico ID of the code, never the code itself
codecodeThe code the holder already has
balancefunding.value_moneyDollars: multiply by 100 for the API

The query keeps the codes of disabled gift cards, because the cutover disables them all before the export, and of gift cards whose Valid to date has passed. To leave out expired cards, add AND (g.GiftCardValidTo IS NULL OR g.GiftCardValidTo > GETDATE()). A Flint gift card has no minimum order amount or customer restriction, so a holder can spend it on any order that accepts gift cards.

Before you load, check the codes and balances that can't move as they are:

  • Codes outside Flint's rule. Flint keeps a code that has 8 to 32 letters and digits after removing spaces and hyphens, and at least 12 digits when it has no letters, so most Kentico codes, your prefix followed by random characters, move as they are. A code with an underscore or another symbol, or with fewer than 8 characters, fails its entry with 400 INVALID_REQUEST at gift_card.code.
  • Codes that match another one. Flint matches codes without case and ignores spaces and hyphens, so two Kentico codes that differ only in those are one code in Flint. A 16-character code in Flint's format, made of digits and letters other than U, also matches one that differs only by O and 0, or by I, L, and 1. The first entry with the code creates its card, and the next fails with 409 ALREADY_EXISTS at gift_card.code.
  • Balances over $2,000.00. A card holds at most $2,000.00, so a larger balance fails its entry with 409 LIMIT_EXCEEDED and reason card_balance. Import $2,000.00 on the Kentico code, and the rest as a second card without code, under a reference of its own, such as 881-2. That card needs the holder's email in notification, or in recipient_email in the Dashboard file, so Flint can send them its new code.

A card without code gets a Flint-generated one. When you know the holder's email, send notification with it, and Flint emails them the new code: in the Dashboard file, leave code empty and fill recipient_email. When you don't, create that card on its own with POST /v1/gift-cards, which returns the new code. The old code stops working once you retire it in Kentico, so tell those holders before the cutover.

Flint shows codes in uppercase without spaces or hyphens, except a 16-character code in Flint's format, which it shows in groups of four, such as 7783-3200-0100-1635. A code is only as hard to guess as the random characters after a shared prefix. If yours are short, rotate the cards once you can reach their holders: POST /v1/gift-cards/{gift_card_id}/rotate-code issues a Flint-generated code, and its notification emails the new code. Delete the export once the import completes.

Import the file in the Dashboard#

Save the query's result as a CSV file with a header row, and upload it under Gift cards > Import. SQL Server Management Studio leaves the headers out by default; turn on Include column headers when copying or saving the results under Tools > Options > Query Results > SQL Server > Results to Grid. The Dashboard reads the template's column names, and also Kentico's own, GiftCardCouponCodeID, GiftCardCouponCodeCode, and GiftCardCouponCodeRemainingValue, if you export the table as it is. Add recipient_email, recipient_name, and message columns for cards Flint should email to their holder.

Import reference starts as the file name and becomes every card's funding reference. Before anything is created, the Dashboard flags repeated references and codes, balances over $2,000.00, and lines with neither a code nor a recipient email, and the review step shows how many cards the file creates and their total value. Confirm, and the import starts. Cards already imported, from the Dashboard or the API, are skipped.

Import with the API#

Create an import with import_type: "gift_cards", as in Load data with imports:

cURL
curl -X POST https://api.withflintpay.com/v1/imports \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: kentico-gift-card-import-2026-12" \
  -d '{"import_type": "gift_cards", "name": "Kentico gift cards", "send_webhook_events": false}'

Then add one entry per row. Each entry's gift_card is the POST /v1/gift-cards body with import funding and at least one of code and notification. To send an email, add "notification": {"email": "taylor@example.com", "name": "Taylor Smith"} inside gift_card. The name is optional.

cURL
curl -X POST https://api.withflintpay.com/v1/imports/imp_1kmn0cExample/entries \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: imp_1kmn0cExample-entries-0" \
  -d '{
    "import_type": "gift_cards",
    "entries": [{
      "key": "ref:881",
      "source_reference": "GiftCardCouponCodeID 881",
      "gift_card": {
        "currency": "USD",
        "code": "GIFT-7K2M9QX4R8",
        "external_reference_id": "881",
        "funding": {
          "value_money": {"amount": 3750, "currency": "USD"},
          "source": {"funding_source_type": "import", "external_reference_id": "kentico-gift-cards-2026-12"}
        }
      }
    }]
  }'

The KenticoImport class sends the whole export:

csharp
// GiftCardImport.cs
using System.Text.Json;

// One row of the gift card export.
public sealed record KenticoGiftCard(int GiftCardReference, string Code, decimal Balance);

public sealed class GiftCardImport(KenticoImport importer)
{
    public Task<JsonElement> RunAsync(IEnumerable<KenticoGiftCard> rows, string runId, CancellationToken ct)
    {
        List<object> entries = rows.Select(row => (object)new
        {
            key = $"ref:{row.GiftCardReference}",
            source_reference = $"GiftCardCouponCodeID {row.GiftCardReference}",
            gift_card = new
            {
                currency = "USD",
                code = row.Code,
                external_reference_id = row.GiftCardReference.ToString(),
                funding = new
                {
                    // Kentico stores dollars; Flint takes cents.
                    value_money = new { amount = (long)Math.Round(row.Balance * 100m, MidpointRounding.AwayFromZero), currency = "USD" },
                    source = new { funding_source_type = "import", external_reference_id = "kentico-gift-cards-2026-12" },
                },
            },
        }).ToList();

        return importer.RunAsync("gift_cards", "Kentico gift cards", runId, entries, 1000, ct);
    }
}
  • Keep the code out of every other field. Flint stores and returns key, source_reference, and the card's other fields as plain text, so it refuses a whole request with 400 INVALID_REQUEST when any of them contains that entry's code, such as at entries[0].key. The Kentico ID is safe.
  • Codes stay secret. Flint encrypts each code from the moment you add its entry until the card exists. Entries, errors, and events never return a code.
  • When problems show. A code outside Flint's rule, a balance over $2,000.00, or an entry with neither code nor notification fails as you add it. A code another card already has, and a customer_id that doesn't exist, fail when the import runs.
  • Permissions. The key needs commerce.gift_cards.write, and commerce.gift_cards.secrets.write too if any entry sends notification.

Approve the import in the Dashboard#

When the book is worth more than the environment can import now, start returns the import as pending with pending_reason: approval_required, and nothing has been created yet:

cURL
curl -X POST https://api.withflintpay.com/v1/imports/imp_1kmn0cExample/start \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: imp_1kmn0cExample-start"
Response
{
  "data": {
    "import_id": "imp_1kmn0cExample",
    "import_type": "gift_cards",
    "status": "pending",
    "pending_reason": "approval_required",
    "pending_count": 1840,
    "pending_value_money": {"amount": 8500000, "currency": "USD"},
    "expires_at": "2026-12-09T15:04:05Z",
    "supported_actions": ["cancel"]
  }
}

pending_value_money is the value waiting, $85,000.00 here, and the import expires at expires_at, 7 days after it began waiting, if nobody approves it. A file you import in the Dashboard shows the same as Waiting for approval. In live mode, Flint emails your owners and admins that an import needs approval.

An owner or admin opens the import under Gift cards > Import and selects Approve import, or selects Review beside it under Gift cards > Import allowances. The amount starts at the import's total plus whatever is left on the current allowance, and can't go below the import's total. They confirm their sign-in, Flint creates the allowance, and the import runs. Approving a new allowance ends the current one.

Flint sends no event when an import starts or stops waiting, and sends no Retry-After while it waits. Read the import every few minutes, or wait for import.completed; with the class above, call WaitAsync again with the import_id. To approve before the import starts, so that it never waits, an owner or admin approves an allowance of at least the book's total under Gift cards > Import allowances; the cutover plan does this.

Everything after the approval works like any import:

  • The allowance serves every import in the environment. If it runs out or expires while the import runs, such as when another import uses it, the remaining entries fail with 409 LIMIT_EXCEEDED and reason merchant_imports_daily. Add the failed rows to a new import: the cards already created come back existing, and the new import waits for approval if it needs it.
  • A book worth more than $1,000,000.00 takes more than one import, because an import holds at most $1,000,000.00 of value still to import, and an allowance at most $1,000,000.00. Split the export by gift_card_reference and approve each import in turn.
  • To stop a waiting import, cancel it with POST /v1/imports/{import_id}/cancel. Nothing was created.

Codes for holders you can't email#

A card that needs a new code, for a holder whose email you don't have, is the one case the import can't cover: the import never returns a generated code. Create that card on its own, with the Kentico ID in the Idempotency-Key:

cURL
curl -X POST https://api.withflintpay.com/v1/gift-cards \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: kentico-gift-card-882-new-code" \
  -d '{
    "currency": "USD",
    "external_reference_id": "882",
    "funding": {
      "value_money": {"amount": 5000, "currency": "USD"},
      "source": {"funding_source_type": "import", "external_reference_id": "kentico-gift-cards-2026-12"}
    }
  }'

The response returns the new code once, in data.code. Keep it as a secret and deliver it to the holder yourself. A retry with the same Idempotency-Key returns the same card. Value created this way counts toward the same import total.

Customer credit#

Kentico records customer credit as events in COM_CustomerCreditHistory. This query returns each customer's credit balance:

SQL
-- Each customer's credit balance. Global credit has a NULL EventSiteID. Replace 1 with your site's ID.
SELECT EventCustomerID AS customer_reference,
       SUM(EventCreditChange) AS credit
FROM COM_CustomerCreditHistory
WHERE EventSiteID = 1 OR EventSiteID IS NULL
GROUP BY EventCustomerID
HAVING SUM(EventCreditChange) > 0;

Each balance becomes a gift card linked to the Flint customer_id from your customer map. Use the API to link cards to customers. Choose the delivery method using the email on the mapped Flint customer after resolving shared emails.

  • Customer with an email. Add a gift card import entry with the key credit:{customer_reference}, the customer_id, and notification.email. Omit code so Flint generates one and emails it to the customer. The credit: prefix keeps these entries separate from coupon code entries that use ref:.
  • Customer without an email. Follow Codes for holders you can't email to create the card with POST /v1/gift-cards. Include customer_id in the body and use an idempotency key unique to that Kentico credit balance. Flint returns the generated code so you can deliver it securely.

Both paths count toward the gift card import limit and use the same $2,000.00 per-card maximum. The buyer spends the card at checkout or saves it in their account. See Gift cards.

Replace the checkout#

Your Kentico site's checkout ends in the order review step, where shoppingService.CreateOrder() creates the order and your code redirects to the payment gateway. Replace that step: create a Flint order from the cart, create a checkout session for it, and redirect the buyer to the session's url. Hosted checkout then collects the address, shows your delivery methods and their prices, applies codes and gift cards, calculates tax, and takes the payment by card, Apple Pay, Google Pay, and the other methods you turn on.

Send the cart to Flint#

csharp
// Controllers/CheckoutController.cs
using System.Text.Json;
using CMS.Ecommerce;
using Microsoft.AspNetCore.Mvc;

// Your own lookups, filled when you load the catalog and customers into Flint.
public interface IFlintIdMap
{
    // A Kentico SKU maps to a Flint variant, or to a Flint bundle for a Kentico bundle.
    FlintCatalogItem CatalogItemForSku(int skuId);
    Task<string?> CustomerIdForCurrentUserAsync(CancellationToken ct);
}

// Type is "variant" or "bundle".
public sealed record FlintCatalogItem(string Type, string Id);

public class CheckoutController(IShoppingService shoppingService, FlintClient flint, IFlintIdMap ids)
    : Controller
{
    // Replaces the order review step's shoppingService.CreateOrder() and the payment gateway redirect.
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<IActionResult> Pay(CancellationToken ct)
    {
        ShoppingCartInfo cart = shoppingService.GetCurrentShoppingCart();
        if (cart.IsEmpty)
        {
            return RedirectToAction("ShoppingCart");
        }

        // One key per checkout attempt. Store it with the cart if your retries span requests.
        string attempt = Guid.NewGuid().ToString("N");
        string? customerId = await ids.CustomerIdForCurrentUserAsync(ct); // null for a guest

        JsonElement order = await flint.PostAsync("v1/orders", new
        {
            customer_id = customerId,
            line_items = cart.CartProducts.Select(item =>
            {
                FlintCatalogItem catalogItem = ids.CatalogItemForSku(item.SKUID);
                return new
                {
                    type = catalogItem.Type,
                    variant_id = catalogItem.Type == "variant" ? catalogItem.Id : null,
                    bundle_id = catalogItem.Type == "bundle" ? catalogItem.Id : null,
                    quantity = item.CartItemUnits,
                };
            }),
        }, $"kentico-order-{attempt}", ct);
        string orderId = order.GetProperty("order_id").GetString()!;

        JsonElement session = await flint.PostAsync("v1/checkout-sessions", new
        {
            type = "order",
            order_id = orderId,
            // Offer ordering on account to signed-in buyers. Only customers with on_account.enabled see it.
            payments = customerId is null ? null : new { on_account_enabled = true },
            redirects = new
            {
                success_url = Url.Action("Complete", "Checkout", null, "https"),
                cancel_url = Url.Action("ShoppingCart", "Checkout", null, "https"),
            },
        }, $"kentico-checkout-{orderId}", ct);

        // Remember which order this browser is paying, so Complete doesn't trust the query string.
        HttpContext.Session.SetString("FlintOrderId", orderId);
        return Redirect(session.GetProperty("url").GetString()!);
    }

    // Flint redirects here after payment. Show the result; fulfill from the webhook.
    public async Task<IActionResult> Complete(CancellationToken ct)
    {
        string? orderId = HttpContext.Session.GetString("FlintOrderId");
        if (orderId is null)
        {
            return RedirectToAction("ShoppingCart");
        }

        JsonElement order = await flint.GetAsync($"v1/orders/{Uri.EscapeDataString(orderId)}", ct);
        bool paid = order.GetProperty("payment_status").GetString() == "paid";
        // An order placed on account is complete but unpaid: its invoice bills the buyer.
        bool placedOnAccount = order.GetProperty("placed_on_account_at").ValueKind == JsonValueKind.String;
        if (paid || placedOnAccount)
        {
            shoppingService.RemoveAllItemsFromCart();
            HttpContext.Session.Remove("FlintOrderId");
        }
        return View(order);
    }
}

What each part does:

  • Lines. CartProducts holds the cart's products, and a variant in the cart is its own SKU, so each line maps to one Flint variant_id. A Kentico bundle maps to a type: "bundle" line with its bundle_id; send the bundle's line only, not the products it contains. Flint copies the name, price, SKU, and tax category from the catalog onto the line, so the cart sends no prices. Lines with Text or Products options add modifiers, as Sell it shows.
  • Customer. A signed-in buyer's customer_id links the order to their history, prefills their saved addresses, and applies their tax exemptions. A guest checks out without one.
  • Order on account. payments.on_account_enabled offers a signed-in buyer the choice to place the order without paying, when their customer has on_account.enabled. Your site already named the customer, so the buyer confirms no email code. Buyers who aren't approved see only the payment form. See Pay by invoice and purchase orders.
  • Idempotency. Retrying POST /v1/orders with the same key returns the same order. The session key is derived from the order, so one order never gets two sessions from a retry.
  • Delivery methods. The session offers your checkout default, and the buyer picks one. Without a default that can ship every item, creating the session returns 409 ACTION_NOT_ALLOWED with reason configuration_required and param delivery_method_ids.
  • Stock. Creating the order without delivery, as here, doesn't check stock. Hosted checkout does, and tells the buyer when an item is out of stock, so check inventory_availability in your cart first, as in Errors you'll see.
  • Redirects. success_url receives the buyer after payment, and cancel_url takes them back to the cart, where the session stays open until it expires. Handle the return has the details.
  • Session state. The example uses ASP.NET Core session state, so add AddSession() and UseSession() if the site doesn't have them. Flint also adds order_id to the success URL, but a buyer can edit a URL, so read the order your server stored.
  • The return after ordering on account. A buyer who places the order on account lands on success_url too, with nothing paid. The order's placed_on_account_at is set and its payment_status stays unpaid until the invoice is paid, so show the order as placed, not paid.

The success page proves nothing about payment: a buyer can close the tab first or open the URL directly. A payment by bank debit can also still be processing there. Fulfill from the webhook.

If you'd rather keep your checkout pages, build your own checkout on a headless session, or take payment on your own page with embedded payments.

Verify and handle webhooks#

Register an endpoint for the events your site acts on. With signing_methods set to hmac, Flint signs each delivery with a shared secret in the Standard Webhooks format, which .NET verifies with its built-in crypto:

cURL
curl -X POST https://api.withflintpay.com/v1/webhook-endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: kentico-webhook-endpoint-001" \
  -d '{
    "url": "https://shop.example.com/webhooks/flint",
    "enabled_events": [
      "order.paid",
      "order.partially_paid",
      "order.placed_on_account",
      "refund.succeeded",
      "refund.failed",
      "refund.updated",
      "dispute.created"
    ],
    "signing_methods": ["hmac"],
    "description": "Kentico site"
  }'

The response returns the whsec_... secret in secret once. Store it with your other secrets, under Flint:WebhookSecrets in this example. Without signing_methods, Flint signs with a JWT that you verify against its public keys instead; Webhooks covers both.

The handler verifies the raw body, records the event once by its webhook_event_id, and answers 200 right away:

csharp
// Controllers/FlintWebhooksController.cs
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;

// Your own store: saves each event once, keyed by webhook_event_id, for a background job to process.
public interface IFlintEventInbox
{
    Task SaveOnceAsync(string webhookEventId, string eventType, string rawBody, CancellationToken ct);
}

[ApiController]
[Route("webhooks/flint")]
[IgnoreAntiforgeryToken]
public class FlintWebhooksController(IConfiguration config, IFlintEventInbox inbox) : ControllerBase
{
    [HttpPost]
    public async Task<IActionResult> Receive(CancellationToken ct)
    {
        // Verify the exact bytes Flint sent, before any JSON parsing.
        using var buffer = new MemoryStream();
        await Request.Body.CopyToAsync(buffer, ct);
        byte[] rawBody = buffer.ToArray();

        // The whsec_... secret, plus the previous one during a rotation.
        string[] secrets = config.GetSection("Flint:WebhookSecrets").Get<string[]>() ?? [];
        if (!FlintWebhookSignature.IsValid(rawBody, Request.Headers, secrets, DateTimeOffset.UtcNow))
        {
            return BadRequest();
        }

        using JsonDocument envelope = JsonDocument.Parse(rawBody);
        await inbox.SaveOnceAsync(
            envelope.RootElement.GetProperty("webhook_event_id").GetString()!,
            envelope.RootElement.GetProperty("event_type").GetString()!,
            System.Text.Encoding.UTF8.GetString(rawBody),
            ct);
        return Ok();
    }
}
csharp
// FlintWebhookSignature.cs
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using Microsoft.AspNetCore.Http;

public static class FlintWebhookSignature
{
    public static bool IsValid(byte[] rawBody, IHeaderDictionary headers, IEnumerable<string> secrets,
        DateTimeOffset now, int toleranceSeconds = 300)
    {
        string id = headers["webhook-id"].ToString();
        string timestamp = headers["webhook-timestamp"].ToString();
        if (id.Length == 0 ||
            !long.TryParse(timestamp, NumberStyles.None, CultureInfo.InvariantCulture, out long signedAt) ||
            Math.Abs(now.ToUnixTimeSeconds() - signedAt) > toleranceSeconds)
        {
            return false;
        }

        // Signed content: "{webhook-id}.{webhook-timestamp}." followed by the raw body.
        byte[] signedContent = Encoding.UTF8.GetBytes($"{id}.{timestamp}.").Concat(rawBody).ToArray();
        List<byte[]> candidates = headers["webhook-signature"].ToString()
            .Split(' ', StringSplitOptions.RemoveEmptyEntries)
            .Where(part => part.StartsWith("v1,", StringComparison.Ordinal))
            .Select(part => Encoding.ASCII.GetBytes(part.Substring(3)))
            .ToList();

        foreach (string secret in secrets)
        {
            string encodedKey = secret.StartsWith("whsec_", StringComparison.Ordinal) ? secret.Substring(6) : secret;
            using var hmac = new HMACSHA256(Convert.FromBase64String(encodedKey));
            byte[] expected = Encoding.ASCII.GetBytes(Convert.ToBase64String(hmac.ComputeHash(signedContent)));
            if (candidates.Any(candidate => CryptographicOperations.FixedTimeEquals(candidate, expected)))
            {
                return true;
            }
        }
        return false;
    }
}

The verifier accepts the fixture in Test your HMAC verifier when you pass the fixture's timestamp as now. To test a real delivery, send one with POST /v1/webhook-endpoints/{webhook_endpoint_id}/test-events to the endpoint's public URL, or a tunnel to your development machine. Prepare a signed sandbox delivery signs only with JWT, so it returns 409 ACTION_NOT_ALLOWED with reason jwt_signing_not_enabled for this HMAC-only endpoint. Exempt the route from authentication and antiforgery filters, because a 401 or 403 from middleware looks like a failed delivery and Flint retries it.

Process saved events in a background job. On order.paid, read the order, check dispute_status, and do what your Kentico code did when an order was marked paid: assign membership roles, open e-product downloads, and send the order to your warehouse. Flint sends the buyer's receipt, so turn off any confirmation email your site sent for Kentico orders. Sell with hosted checkout covers taking access back after a refund or dispute.

Pay by invoice and purchase orders#

Many Kentico stores offer trade buyers a manual payment method such as Pay by invoice or Purchase order. On Flint, that is ordering on account: a customer you approve places the order at checkout without paying, Flint issues the invoice on the customer's payment terms and emails it, and nothing is charged. Let the buyer order on account at checkout covers it in full.

Choose the payment term by when your store shipped:

How your Kentico store used the methodOn Flint
Pay by invoice, shipping once the bank transfer arrivedA payment term due on receipt (calculation.type: "on_receipt"). The buyer places the order and Flint sets its stock aside. Fulfillment opens once the invoice is paid, so record the transfer as an offline payment when it arrives.
Pay by invoice on terms, such as Net 30A term with time to pay, such as net_days 30. The order is on payment terms, so Flint creates its fulfillments right after the buyer places it, and you ship before payment.
Purchase orderEither term above, with payments.on_account_po_number_collection set to required on the session. The buyer enters a PO number to place the order, and it prints on the invoice as po_number.

The session in Send the cart to Flint offers on account with on_account_po_number_collection left out, which makes the PO number optional. For a store that only took purchase orders, add it:

csharp
payments = customerId is null ? null : new
{
    on_account_enabled = true,
    on_account_po_number_collection = "required",
},

When your buyers pay these invoices only by bank transfer or check, set invoices.default_collection_mode to external with PATCH /v1/settings. The invoice then shows no way to pay online, and you record each payment as it arrives. This setting applies to every invoice that uses your default.

Approve the customers who used it#

In Kentico, any buyer who reached the payment step could choose a manual method. On Flint, only a customer with on_account.enabled sees the option. This query lists the customers who ordered with those methods. Replace the code names with your methods' PaymentOptionName values:

SQL
-- Customers who ordered with Pay by invoice or Purchase order.
SELECT o.OrderCustomerID AS customer_reference,
       p.PaymentOptionName AS payment_option,
       COUNT(*) AS order_count,
       MAX(o.OrderDate) AS last_order_date
FROM COM_Order o
JOIN COM_PaymentOption p ON p.PaymentOptionID = o.OrderPaymentOptionID
WHERE p.PaymentOptionName IN ('PayByInvoice', 'PurchaseOrder')
GROUP BY o.OrderCustomerID, p.PaymentOptionName
ORDER BY o.OrderCustomerID;

Review the list before you approve anyone: it can include buyers you never meant to give credit to.

Create each payment term once:

cURL
curl -X POST https://api.withflintpay.com/v1/invoice-payment-terms \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: kentico-term-on-receipt" \
  -d '{
    "name": "Due on receipt",
    "calculation": {"type": "on_receipt"}
  }'

Create Net 30 the same way, with {"type": "net_days", "days": 30}. Then add default_invoice_payment_term_id and on_account to the customer entries of the approved customers:

cURL
curl -X POST https://api.withflintpay.com/v1/imports/imp_1kmn0bExample/entries \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: imp_1kmn0bExample-entries-1" \
  -d '{
    "import_type": "customers",
    "entries": [{
      "key": "ref:5530",
      "source_reference": "CustomerID 5530",
      "customer": {
        "name": "Harbor Gift Co.",
        "email": "ap@example.com",
        "external_reference_id": "5530",
        "on_email_conflict": "return_existing",
        "default_invoice_payment_term_id": "ipt_01KF6WTQM83XSSSS6YS3C4DWA7",
        "on_account": {
          "enabled": true,
          "credit_limit_money": {"amount": 500000, "currency": "USD"}
        }
      }
    }]
  }'
  • Payment terms first. Enabling on_account needs a payment term: the customer's default_invoice_payment_term_id, or a default term in your invoice settings. Without one, the entry fails with INVALID_REQUEST and detail code REQUIRED for default_invoice_payment_term_id. The customer also needs an email: Flint sends the invoice only to the email on the customer record.
  • Credit limit. Kentico has no built-in credit limit, and its customer credit is store credit, not a limit. If you kept a limit in a custom customer field or your accounting system, send it as credit_limit_money. Checkout then refuses an on-account order that would take the customer's open invoice balance over the limit, and the buyer can still pay now. Leave it out for no limit. A customer with a limit orders on account only in the limit's currency.
  • Customers already in Flint. An import never changes a customer that exists, so for customers you loaded before, send the same two fields with PATCH /v1/customers/{customer_id}.

Your site names the signed-in customer on the order, so their tax exemptions apply and they see the on-account option without an email code. The example offers on account only to signed-in buyers, so a guest sees the usual payment form. To offer it to guests too, send on_account_enabled for every session. Checkout then asks each buyer to confirm their email with a code, and a guest you've approved can order on account. That guest is taxed even when their customer has an exemption, because an email code doesn't apply exemptions. Build your own checkout covers placing the order from your own pages.

Handle orders placed on account#

A placed order sends order.placed_on_account instead of order.paid, so add it to your webhook endpoint's enabled_events. In your background job, read the order:

  • is_on_payment_terms is true. The invoice gives time to pay. Send the order to your warehouse now, as you do on order.paid.
  • is_on_payment_terms is false. The invoice is due on receipt. Wait for order.paid, which follows when the invoice is paid, including when you record an offline payment.

Assign membership roles and open e-product downloads only on order.paid, as before. The checkout session ends with status: placed, not paid; Checkout sessions describes it.

Unpaid invoices at cutover#

Orders placed with these methods in Kentico and still unpaid at the cutover stay in Kentico, like the rest of your order history. This query lists them:

SQL
-- Unpaid orders placed with Pay by invoice or Purchase order.
SELECT o.OrderID, o.OrderInvoiceNumber, o.OrderDate, o.OrderCustomerID,
       o.OrderGrandTotal, p.PaymentOptionName
FROM COM_Order o
JOIN COM_PaymentOption p ON p.PaymentOptionID = o.OrderPaymentOptionID
WHERE o.OrderIsPaid = 0
  AND p.PaymentOptionName IN ('PayByInvoice', 'PurchaseOrder')
ORDER BY o.OrderDate;

For each one, either:

  • Finish collecting it in Kentico. Mark it paid there when the money arrives. Flint doesn't count it toward the customer's credit limit.
  • Recreate it as a Flint invoice. Create a quick_pay invoice for the customer with issue, as in Create and issue in one call, with custom lines, fulfillment: {"requirement": "none"} because the goods already shipped, and the Kentico order ID in metadata. It then counts toward the customer's open balance and credit limit, and the buyer can pay it online. The due date must be today or later. Issue with delivery_mode: "caller_managed" if the buyer already has Kentico's invoice and shouldn't get a second email. Mark the Kentico order paid or canceled so nobody collects it twice. Compare each invoice's total with the Kentico order's OrderGrandTotal before you issue it, because Flint calculates tax itself. If an order hasn't shipped yet, create it in Flint with POST /v1/orders instead and ship it from there.

Saved cards#

If your payment gateway saved cards for your buyers, contact Flint to migrate them. Flint processes cards on Stripe and coordinates the copy into it. From a Stripe account, Stripe copies eligible saved cards. For Braintree or another gateway, Flint first confirms that the gateway can send a compatible export to Stripe. Give Flint the gateway's customer IDs and the matching Flint customer_id values, or tell Flint they're stored as external_reference_id. Never send card numbers or security codes to Flint. Migrating from Stripe describes the steps.

Buyers whose cards can't move save a card the next time they check out, or from their customer account.

Errors you'll see during a migration#

  • HTTP 409
    A SKU, a customer email, or a gift card code is already used in this environment, so the import entry or request fails. details[0].current_resource names the record that has it. For customers, send on_email_conflict: "return_existing". For a gift card code, see Export gift card balances.
  • HTTP 409
    With reason merchant_imports_daily, the gift card value would pass what the environment can import now: the daily limit plus any approved import allowance. details[0].maximum_money is what's left, and resets_at is when the daily limit refills. Have an owner or admin approve an allowance in the Dashboard, then import the failed rows again. With reason card_balance, a balance is over the $2,000.00 card maximum.
  • HTTP 409
    With reason active_imports, the environment already has five unfinished imports: drafts, pending, and processing imports all count, so starting a draft frees nothing. details[0].blocking_resources lists them. Cancel one with POST /v1/imports/{import_id}/cancel, or wait for one to complete.
  • HTTP 400
    param names the input; in an import entry's error, it starts at the entry's object. On customer.phone, the number isn't E.164. On customer.addresses[0].address.state, the state doesn't belong to the country. On gift_card.code, the gift card code doesn't have 8 to 32 letters and digits, or has fewer than 12 digits and no letters; import that card without code. On an entry's key, source_reference, or another field, the value contains the entry's gift card code, and nothing in the request was added; use the Kentico ID. On inventory_routing_source, with detail code REQUIRED, the order has a tracked line and no Location has inventory allocation enabled; turn on inventory_allocation_enabled for your stock Location. For product imports, product.default_variant.line_item_tax_category or product.variants[0].line_item_tax_category identifies a variant whose category automatic tax can't calculate. Use external tax for those categories. On line_items[0].tax.line_item_tax_category, automatic tax can't calculate the line: either the category is one it never calculates, such as clothing, or the order ships physical goods to a country where your registration is in effect, such as Germany under an EU registration. The message names the category and country. Use external tax for those orders. On customer.default_invoice_payment_term_id, with detail code REQUIRED, the entry enables on_account for a customer with no payment term while your invoice settings have no default term; create the terms first.
  • HTTP 429
    RATE_LIMIT_EXCEEDEDRetry the same request
    Your credential or merchant exceeded a rate limit. For imports, wait the requested two seconds between status reads. On a 429 response, wait the number of seconds in Retry-After, then send the same request again. Reuse the original Idempotency-Key if you sent one.
  • HTTP 409
    Two different requests shared an Idempotency-Key, such as a second import run that reused the first run's draft and batch keys. Give every run a new run ID, as Choose a key describes. Import entry keys are separate and stay the same on every run.
  • HTTP 409
    Stock doesn't cover the order and the item doesn't allow backorders. The order your checkout code creates leaves delivery to hosted checkout, so POST /v1/orders doesn't check stock and your site doesn't see this error: hosted checkout meets it when it quotes delivery or takes the payment, and tells the buyer an item is out of stock. Check stock in your cart before you create the order: GET /v1/products/{product_id}?expand=variants returns each variant's inventory_availability, and out_of_stock means the cart can't buy it. Load opening stock at a Location with inventory_allocation_enabled: true before you open checkout, or turn on backorder.enabled for items Kentico sold past zero.
  • HTTP 409
    With reason configuration_required, a setting the request needs is missing. Creating a checkout session for an order that ships needs a checkout default delivery method that can ship every item; without one, param is delivery_method_ids. Automatic tax needs an active tax connection, and external tax from a callback needs a selected tax calculation callback; for these, details[0].resource_type names what to set up, such as tax_connection or tax_calculation_callback. Connecting automatic tax needs a registration first.
  • HTTP 409
    The account can't take payments yet. Finish onboarding in the dashboard, then check GET /v1/merchant.

Migration checklist#

  1. Create a Flint account and run every step below in a sandbox first.
  2. Connect tax: add your registrations first, then connect automatic tax, which refuses to connect without one. Or select a tax calculation callback that serves your Kentico rates, which you need if you ship physical goods to the EU, the UK, Canada, Australia, or New Zealand and charge tax there.
  3. Create categories, delivery methods, modifier groups, and a Location for stock.
  4. Run the product export and a product import with opening_stock, keyed by SKUID. Fix the failed entries and import again, with a new run ID each time, until failed_count is 0, then save the SKUID to variant_id and inventory_item_id maps.
  5. Run the customer export and a customer import, with on_email_conflict: "return_existing" when the row has an email. Save the customer ID map, and keep the order export.
  6. If your store offered Pay by invoice or Purchase order, create the payment terms and approve the customers who used them: add on_account and default_invoice_payment_term_id to their entries in step 5's import, or send both with PATCH /v1/customers/{customer_id} afterward.
  7. Import both exports once more, each with a new run ID: every entry should come back existing, and created_count should be 0.
  8. Recreate discounts and coupon codes as promotions, and set max_promotions_per_order to the most offers one order can combine: Flint applies 2 unless you raise it.
  9. Run the gift card export and one gift_cards import, by file or through the API, and have an owner or admin approve it in the sandbox. Add customer credit, and tell holders whose codes Flint had to replace.
  10. Register the webhook endpoint and deploy the handler and its background job, including order.placed_on_account when you offer order on account.
  11. Deploy the new order review step behind a setting, so you can switch checkout on and off without a release.
  12. Place test orders in the sandbox for each shipping method, tax case, promotion, and gift card, and refund one. Sign in as an approved customer and place one on account, then record an offline payment on its invoice.
  13. Ask Flint to migrate saved cards, if your gateway holds any.

Cutover plan#

Your Kentico site stays up throughout; only checkout moves. Your product pages keep showing what Kentico stores, while Flint decides what the buyer pays, so plan how the two stay in step before you freeze:

  • Prices and stock on product pages. Read them from Flint where your pages render them, with GET /v1/products/{product_id} and expand=variants, and keep a short cache. Or keep updating Kentico alongside Flint, or update Kentico from Flint's product_variant.updated and inventory_level.updated catalog events. Hosted checkout always shows the buyer Flint's total before they pay.
  • Kentico discounts. Disable Kentico's discounts at the freeze in step 2, once each has its Flint promotion. A Kentico catalog discount still lowers the price your pages show, but Flint charges the price and promotions it holds.
  • Kentico gift cards. Import them at the freeze, not with the rest of the data: once a card is in Flint, importing it again returns existing and leaves its balance as it is, so a balance spent in Kentico after its import would stay too high in Flint. Disable the Kentico gift cards first, so nothing is spent between the export and the switch. Holders can spend them again once checkout moves to Flint in step 4.

Plan the switch for a low-traffic hour, at least a week before December 31, 2026.

  1. A week before. Load the full catalog, customers, and promotions into live mode, and point the webhook endpoint at your production site. Place a live order with a real card and refund it. Have an owner or admin approve a live import allowance under Gift cards > Import allowances for at least the total of the gift card and customer credit exports, which count toward the same import total, for long enough to cover the cutover, so the gift card import doesn't wait for approval on the day.
  2. Freeze. Stop catalog, price, customer, and discount edits in the Xperience administration, and tell your team to make them in Flint from now on. Disable Kentico's discounts and gift cards, and switch your product pages to Flint's prices and stock.
  3. Final delta import. Run both exports again and import them with the same keys: rows that are already in Flint come back existing and are left as they are, so only new products and customers are created. Apply changed prices and product details with PATCH /v1/products/{product_id}/variants/{variant_id}, and newly approved on-account customers with PATCH /v1/customers/{customer_id}, and send current stock counts as counted adjustments with each level's physical_version and a new key. Run the gift card and customer credit exports and import them. Delete the coupon codes in Kentico only once every entry is succeeded: a code whose entry failed has no Flint card yet, and deleting it would lose its balance. List the unpaid pay-by-invoice orders, and either keep collecting each in Kentico or recreate it as a Flint invoice.
  4. Switch checkout. Turn on the setting that sends the order review step to Flint, or deploy the release that does. Your domain and DNS don't change, because buyers still shop on your site. If you serve checkout on your own subdomain, set up its custom domain and DNS records days ahead, so the certificate is ready.
  5. Watch the first orders. Check that order.paid and, for orders placed on account, order.placed_on_account reach your handler, that tax and shipping match what you expect, and that your warehouse receives the orders.
  6. After cutover. Keep the old payment gateway account open until refunds and disputes on Kentico-era payments are settled. Remove Kentico's payment gateway code and order notification emails once nothing uses them.

To roll back during the first hours, turn the setting off. Orders already paid or placed on account on Flint stay on Flint; fulfill them from the Flint order, and collect their invoices there.

Ready to start? Create a Flint account and run the migration in your sandbox.

Sources#

Kentico documentation, read November 26 and 27, 2026:

Next steps#

Catalog setupProducts, variants, options, modifiers, bundles, and categories.Checkout sessionsEvery hosted checkout setting, the return, and payment confirmation.Sales taxAutomatic tax, external tax, categories, and tax reports.WebhooksSignatures, retries, and processing each event once.

Was this helpful?