Orders Overview
ClickFunnels orders enable customers to purchase products and subscriptions through funnels, manual orders and the public API.
There are different types of orders that are determined by the payment processor that was set up to make that order:
- Payments AI - An advanced clever way to get payments for your business leveraging AI.
- External Order - The order was paid outside of ClickFunnels.
A ClickFunnels customer can set up Payments AI as their payment processor. Then, orders can be paid by their users through funnels and manual order checkouts.
Alternatively, the customer can skip the registration of a payment gateway and perform payments on their own platform or payment page but still ingest the orders separately via the API. Even more so, a ClickFunnels customer can connect to an external payment provider via OAuth who will manage payments and create orders on their behalf.
In the following sections, we will explore the different order payment types, their differentiations and gotchas, as well as delve deeper into running your automations with external orders.
General Concepts
Order Invoices are the invoices issued against each Order.
Usually, an order of order_type
"one-time-order" has one payment transaction on one invoice that will make the order paid. Note that if an order has a subscription product as part of one of the line items, this order will be considered an order_type
"subscription-order". Subscription orders can have multiple invoices.
The order's line items reflect all the items that are part of the order, which can be a mix between
subscriptions and one-time products.
You can get insights into and fully manage the subscriptions' and products' lifecycles via the
respective Products::Price
and Products::Variant
endpoints.
You will notice that Orders::Invoice
also includes line items. Invoice line items are different
because invoices are a snapshot of an order, but orders can be updated to, for example, upgrading and
downgrading subscriptions. The updates will affect future invoices but not past invoices. Also, invoice line items show information about their fulfillment status and can be fulfilled via the UI or Fulfillment API.
live_mode
Orders can be created in different live modes, i.e., live_mode true
or false
. Orders and invoices in either mode behave very much alike, but they can have differences, such as live orders impacting your analytics app in ClickFunnels, but test orders have no impact on it.
payment processors
Orders can have different types of payment processors which are described below.
Payments AI Orders
Payments AI orders and invoices are distinguished by the payment_processor
property set to "payments_ai"
Payments AI orders and invoices may have varying statuses, webhook events and types. Please refer to the API reference to learn more details.
Payments AI statuses are stable and are not expected to change in the near future.
One-time orders state transitions
The flow:
- A customer requests one or more one-time sales items in an order. The one-time sales items are assigned the
pending
status. - The customer does one of the following:
- The customer pays the invoice that includes the one-time sales items. One-time sales items are assigned the
completed
status. - The customer cancels the purchase before paying. One-time sales items are assigned the
canceled
status.
- The customer pays the invoice that includes the one-time sales items. One-time sales items are assigned the
Payments AI Invoices
There are many possible flows and variations but here are some standard flows:
Invoice issued and paid on or by due date
- An upcoming invoice is issued and assigned the unpaid status.
- The invoice is paid in full and assigned the paid status.
When an invoice is paid, it may be refunded or disputed. If an invoice is disputed, you may want to suspend the subscription service until the dispute is resolved. For more information, see Pause subscriptions or the Pause a subscription operation.
Invoice issued and partially paid
- An upcoming invoice is issued and assigned the unpaid status.
- The invoice is partially paid and is assigned the partially-paid status. From the partially-paid state:
- If the customer pays the remaining amount, the invoice is assigned the paid status. This amount can be partially-refunded, or fully refunded.
- If the customer does not pay the remaining amount, the partially paid amount can be partially-refunded, or fully refunded.
Invoice issued and not paid
- An upcoming invoice is issued and assigned the unpaid status.
- The invoice is not paid on or before the due date, it retains the unpaid status for 24 hours.
- The invoice exceeds the 24 hour time-frame. The invoice is assigned the past-due status.
- The invoice is not paid within the past-due time-frame.
- The ClickFunnels merchant decides to abandon the collection of payment. Or, the autopay retry attempt limit is exceeded. The invoice is assigned the abandoned status.
External Orders (private BETA🛠️)
External orders in ClickFunnels can be created via the API. This is for you if you want to leverage ClickFunnel's superpowers (funnels, automations, CRM, courses, communities) but have payments for products happen on your platform, an external third-party platform or anywhere else that you process payments (i.e., externally to ClickFunnels).
External orders are distinguished by the payment_processor
property set to "external"
.
External orders and invoices have a simple restricted set of statuses and types, please refer to the API reference to learn more about the different properties.
🛠️ External orders have recently been launched in BETA and are under active development. New statuses, types and properties can be added, but are not expected to introduce breaking changes. Please follow the changelog to learn more about the most recent API changes for external orders. Also, let us know if you are interested in using it via the ClickFunnels support detailing your use case.
Prerequisites
- External orders are not attached to any of the existing payment systems, so you don't need to have a payment gateway set up with Payments AI. You will need an API key as described in the Getting Started guide.
- You will need to architect a solution for state transitions of your orders and invoices, most state transitions like many other fields are up to the API client to enforce and maintain, there is little automation on the API side (please refer to the API reference to learn about those).
Automating your business with external orders
Here is some common ClickFunnels functionality that you might want to use together with external orders. You will need to create and/or update related ClickFunnels API resource records, like Order and Invoice, to make use of some of the functionality.
statuses
Please keep in mind that currently external orders and invoices serve the purpose to trigger ClickFunnels functionality and not to have an elaborate payment system. So, many decisions are left up to the client. If you need some ideas on how to handle statuses, please refer to the state transitions of Payments AI orders above. If you follow this approach, you can expect the right behavior of orders and invoices internally as well as in the UI.
displayed orders
The "Current Invoice" modal will display the latest the latest invoice's data but keep in mind that the header that includes the quantity might still refer to the order line items. This is because in most cases, one invoice covers one order:
⚠️ Some analytic data (and the analytics app) might not show data as expected, since a lot of it relies on actual transaction data which is not available if you create external orders at this point.
funnels
You can still use funnels to get and squeeze leads to guide them through the purchasing process and get them click a link that will redirect them to the external payment page. Once paid, the user can be redirected back to ClickFunnels. In the meantime, the API client can create an Order
, and optionally an Orders::Invoice
record inside of ClickFunnels. Then, depending on your configurations and ClickFunnels workspace setup, you can enable the features below.
course, community and asset access
For one-time orders, to grant access to a Course, Community or Asset, you will need to create an Orders::Invoice
that has a Products::Variant
record linked to a Course, Community or Asset inside of the Order#line_items
with the status paid
, or update an existing external invoice to the status paid
.
So, one way to set this up would be:
- Create a course, community or asset in ClickFunnels.
- Link it to a ClickFunnels product in the course settings or the other way around in the product settings.
- When creating an order, add the
Products::Variant#id
to the line item following the Create Orders API reference. - For one-time orders, create its
Orders::Invoice#status
equal to"paid"
or, if you already created the invoice with a different status before, flip it to"paid"
.
fulfillments
Check our Fulfillments Example to see how to make fulfillments work with external orders.
address fields
Address fields follow synchronization rules that you have to keep in mind when creating an order with shipping and billing address fields. Syncing rules kick in, when a default address is present on the contact:
- If during your creation or update of the record
shipping_address_first_name
,shipping_address_phone_number
orshipping_address_last_name
is missing, they will all be synced from the contact's default address (this sync automation is subject to be removed in future iterations). - If the
shipping_address_country
is missing,shipping_address_street_one
,shipping_address_street_two
,shipping_address_city
,shipping_address_region
,shipping_address_country
,shipping_address_postal_code
will be synced from the contact's default address (this sync automation is subject to be removed in future iterations).
triggering confirmation emails
For one-time orders, whenever you create an invoice with the status "paid"
or update the invoice to the "paid"
status, the order's contact will receive a confirmation email:
As of this writing, no other system emails are firing by default in ClickFunnels, like for a canceled order or refunded invoice.
triggering ClickFunnels automation workflows
For one-time orders, whenever you create an invoice with the status "paid"
or update the invoice to the "paid"
status, the Contact
that is subject to the Order
will receive a confirmation email.
triggering webhook events
ClickFunnels webhook events are triggered whenever the state of an Order
or Orders::Invoice
resource is changed. For example, if your workspace has a Webhooks::Outgoing::Endpoint
created and listening for the event type orders/invoice.paid
, you can trigger this event each time you flip an Orders::Invoice
record's status
property to "paid"
.
You can trigger order-related events by changing the service_status
of the order or creating the order with a specific service_status
like completed
.
Please refer to the API webhook event types guide to see which events are available for external orders.
Updated 6 days ago