<p>The &quot;Free order payment strategy&quot; config setting is used when submitting to the <code>commerce/payments/pay</code> form action.</p>
<p>Submitting to this form action with the setting set to &quot;Free orders complete immediately&quot;, will skip calling the gateway and just complete the free order without making a transaction.</p>
<p>You would still need to make sure that the form submitted to the controller action is still valid for the gateway used, so most developers force the use of the
&quot;Manual&quot; payment gateway for free orders, so that no form data would need to be collected.  The manual payment gateway has a gateway setting to only allow free orders. This might not be ideal though so there is another option.</p>
<p>Another way to do it would be to run Commerce 3.3 or greater and use the <code>commerce/cart/complete</code> form action, that will complete the order immediately without needing a payment form submitted.</p>
<p>This form action only works if you turn the <code>allowCheckoutWithoutPayment</code> config setting to true. The only issue with this is that with this turned on customers could submit to this form controller action for orders that still have an amount outstanding (non free orders). This lets the customer complete the order, and pay later. This might take a change to your customers’ backed order processing, email confirmations, payment reminders etc.</p>

CC BY-SA 4.0
2021-12-13T13:11:00.057Z
2021-12-13T13:17:35.580Z
2021-12-13T13:17:35.580Z
Luke Holder
<p>Since it looks like the solution does not exist yet, I ended up creating custom plugin/gateway.</p>

<p>Works same as Manual gateway with the only difference that it only approves free purchases.</p>

<p><a href="https://github.com/intoeetive/freecheckout" rel="nofollow">https://github.com/intoeetive/freecheckout</a></p>

CC BY-SA 4.0
2021-12-13T13:19:32.747Z
Manual gateway has a 'allow for free orders only' setting that can be used.
Luke Holder
CC BY-SA 3.0
2016-06-21T09:00:45.160Z
2016-06-21T09:00:45.160Z
Yuri Salimovskiy
<p>I run Craft Commerce and want people to get certain items for free, but still pass them through Commerce order system (in order to collect the emails and also perform some automation)</p>

<p>So basically they enter code and get 100% discount.</p>

<p>Now, if the person has ONLY free item in their cart, I don't want to ask them for credit card data or send to payment gateway. I want to just authorize the 'payment' of $0.00</p>

<p>I know I could use some template logic and use Manual or Dummy gateway, but I'm afraid some people will try to fool the system, so I want to make sure the 'free' gateway only works if order total is zero.</p>

<p>Does anyone know some plugin / custom gateway that I could use here?</p>

<plugin-craftcommerce>
Free orders with Craft Commerce
# Free orders with Craft Commerce

(Asked by: username_0 on 2016-06-20)

I run Craft Commerce and want people to get certain items for free, but still pass them through Commerce order system (in order to collect the emails and also perform some automation)

So basically they enter code and get 100% discount.

Now, if the person has ONLY free item in their cart, I don't want to ask them for credit card data or send to payment gateway. I want to just authorize the 'payment' of $0.00

I know I could use some template logic and use Manual or Dummy gateway, but I'm afraid some people will try to fool the system, so I want to make sure the 'free' gateway only works if order total is zero.

Does anyone know some plugin / custom gateway that I could use here?

**Tags:** plugin-craftcommerce

---

## 2 answers

### Answer by username_0 on 2016-06-21. Score: 4 | Accepted answer

Since it looks like the solution does not exist yet, I ended up creating custom plugin/gateway.

Works same as Manual gateway with the only difference that it only approves free purchases.

<https://github.com/intoeetive/freecheckout>

> **Comments:**
> **username_1**: Manual gateway has a 'allow for free orders only' setting that can be used.  

---

### Answer by username_1 on 2021-12-13. Score: 2

The "Free order payment strategy" config setting is used when submitting to the `commerce/payments/pay` form action.

Submitting to this form action with the setting set to "Free orders complete immediately", will skip calling the gateway and just complete the free order without making a transaction.

You would still need to make sure that the form submitted to the controller action is still valid for the gateway used, so most developers force the use of the
"Manual" payment gateway for free orders, so that no form data would need to be collected. The manual payment gateway has a gateway setting to only allow free orders. This might not be ideal though so there is another option.

Another way to do it would be to run Commerce 3.3 or greater and use the `commerce/cart/complete` form action, that will complete the order immediately without needing a payment form submitted.

This form action only works if you turn the `allowCheckoutWithoutPayment` config setting to true. The only issue with this is that with this turned on customers could submit to this form controller action for orders that still have an amount outstanding (non free orders). This lets the customer complete the order, and pay later. This might take a change to your customers’ backed order processing, email confirmations, payment reminders etc.


---

