Skip to content

Basic DTC Checkout Flow

Integrate a direct-to-consumer checkout with the Spark CRM Checkout API — create the lead, process the initial purchase, present one-click upsells, and complete the order.

For a simple direct-to-consumer (DTC) checkout integration, use the Spark CRM Checkout API. This guide walks through the standard flow: capturing the lead, processing the initial purchase, presenting one-click upsells, and completing the order.

Checkout API reference: developers.sparkcrm.io


API Authentication

Before wiring the checkout flow, you’ll need a Spark CRM API token.

The account owner should log in to Spark CRM and navigate to:

Settings > API Tokens

From there, the account owner can generate or copy the API token needed to authenticate requests to the Checkout API. Include the token in the Authorization header of every request:

curl -X POST "https://api.sparkcrm.io/<checkout-endpoint>" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

See API Tokens for details on creating, storing, and rotating tokens.


Basic Flow

In a standard DTC flow, the customer completes an initial checkout purchase and is then presented with one or more one-click upsell offers.

Collect customer email

   Create Lead          (optional, recommended)

 Process Payment        (initial checkout purchase)

  Process Upsell        ← repeat for each accepted one-click upsell

  Complete Order        → queues autoresponders + order webhooks

1. Create the Lead

As soon as you have the customer’s email address during checkout, create a lead in Spark CRM.

Use: Checkout API > Orders > Create Leadreference

This step is optional, but recommended. Creating the lead allows Spark CRM to capture the customer before the order is completed, which can support cart abandonment monetization.

You may also update the lead as the customer provides more information — re-POST to Create Lead with the same order_number (or the same customer email and campaign) to update the name, phone number and shipping address; the response returns 200 instead of 201 for an update. Billing details are not accepted on the lead call — send them with Process Payment or Create Order as a billing object.


2. Process the Initial Purchase

Once the customer has entered their payment information and submits the checkout form, process the initial order payment.

Use: Checkout API > Orders > Process Payment

This creates and processes the customer’s initial DTC purchase.

If you did not create a lead earlier in the checkout flow, use Checkout API > Orders > Create Order instead.


3. Present One-Click Upsells

After the initial purchase is approved, redirect or advance the customer to the first one-click upsell page.

For each upsell the customer accepts, call: Checkout API > Orders > Process Upsellreference

This allows the customer to purchase the upsell without re-entering their payment information.

If the customer declines an upsell, simply move them to the next upsell page or to the final confirmation page, depending on your funnel flow.


4. Complete the Order

Once the customer has finished the full checkout and upsell sequence, call: Checkout API > Orders > Complete Order

This tells Spark CRM that the order flow is complete and immediately queues purchase autoresponders and order webhooks.


Throttling Orders via the API

The order endpoints accept an optional is_throttle flag so the caller can mark an order as throttled at the moment it is created or paid.

Field Type Required Default Description
is_throttle boolean No false When true, the order is throttled — it behaves exactly as when Spark CRM throttles an order through affiliate throttling: affiliate pixels are not fired, no affiliate commission is recorded, and the order is hidden from affiliate reports. The order remains fully visible to the merchant.

is_throttle is accepted by:

  • Checkout API > Orders > Create Lead
  • Checkout API > Orders > Process Payment
  • Checkout API > Orders > Create Order
  • Checkout API > Orders > Reprocess Payment

When omitted or false, is_throttle is a no-op and never un-throttles an order. When true, the order is throttled and counts toward the affiliate’s configured throttle rate — it does not stack on top of it. If Spark CRM’s automatic affiliate throttling is active for that affiliate, a caller-requested throttle is credited against the configured rate, so Spark CRM applies fewer of its own throttles to keep total throttling at — and never above — the configured level. If the affiliate has no throttling configured, the order is simply throttled on its own.

{
  "order_number": "ORD-123456",
  "is_throttle": true,
  "payment": {
    "method": "card",
    "card_number": "4111111111111111",
    "card_exp": "12/30",
    "card_cvv": "123"
  }
}

The response includes the resulting is_throttled value so you can confirm the order was throttled.


Summary

A basic DTC funnel should follow this sequence:

Step Action Endpoint
1 Account owner retrieves the API token Settings > API Tokens
2 Create the lead once the customer email is collected Checkout API > Orders > Create Lead
3 Process the initial checkout purchase Checkout API > Orders > Process Payment
4 Process each accepted one-click upsell Checkout API > Orders > Process Upsell
5 Complete the order after the checkout and upsell flow Checkout API > Orders > Complete Order

Navigation

Type to search…

↑↓ navigate↵ selectEsc close