Make Payment Gateway a LOGIC choice

For example, if we want to make a funnel with forms, we could let them buy now, or pay later, if they choose pay later, we could set the logic to have NO Payment Gateway, but if they choose Buy NOW, then we would have the payment gateway.

So a simple logic, like we do with form fields.

That would be very powerful.

We can currently do this with a calculation and a custom pricing rule.

Our calculation might look something like

total = some_calculated_total;
payLater = {{ key }} == "Pay later";

if(payLater, total, 0);

Then, in a custom pricing rule, we would set up a rule that looks like

When <myCalculation> <is answered> then <- answer>

What this all does is check if the user has selected the literal option “Pay later” in a given question. If they have, we use the total we calculate in the calculation. There are multiple ways you might need to do that, but if you’re just using a product question, you could just use a simple {{ }}. If they haven’t answered the question about how they’d like to pay or they have and they didn’t select “Pay later” then we return 0.

Then, we use a custom pricing rule that subtracts what the calculation returned. The calculation is technically always “answered” so the rule always fires. The logic for the amount we wanted to subtract was handled in our calculation; the custom pricing rule just subtracts that returned value from the form’s price.

More plainly, this means that if a user elects to pay later, the form will no longer have a price and they will not be required to pay now. If they don’t elect to pay later, the form has a price and the checkout of the connected payment account will engage.

One thing to note is that the form’s total will be 0 in submission data if you let them pay later. But, since our calculation provides the exact total used to negate the automatic pricing on the form, you can check the calculation’s value instead to determine what the user needs to pay later.

Let me know if any of this is still unclear!