Capture order payment upon fulfillment with Mechanic.

Mechanic is the one-tool-does-it-all automation app for Shopify. :)

Capture order payment upon fulfillment

by Isaac Bowen (team@usemechanic.com)

Short and simple. :) Upon the fulfillment of an authorized order, this task attempts to capture payment for that order.

Runs when an order is fulfilled.

15-day free trial – unlimited tasks

Documentation

For expected results, be sure to enable "Manually capture payment for orders" in Shopify, using this guide.

Please note: This task will only capture payment for orders that have the financial status "authorized". You are responsible for ensuring that fulfillment occurs within the order payment's authorization period.

Developer details

Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Gurus, everybody.

That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.

Events
when an order is fulfilled (shopify/orders/fulfilled)
Script
{% if event.preview or order.financial_status == "authorized" %}
  {
    "action": {
      "type": "shopify",
      "options": [
        "post",
        "/admin/orders/{{ order.id }}/transactions.json",
        { "transaction": { "kind": "capture" } }
      ]
    }
  }
{% endif %}
Mechanic tasks are written in Liquid, which makes them easy to write and easy to modify. Learn more about our platform.