Skip to content

Transactions (Payment)

The Transactions (Payment) push acts on an order's payments in Shopify. It captures an authorisation, voids one, records a payment taken outside Shopify, or refunds a payment. Each record makes one transaction against one order.

On a push connector, select Transactions (Payment) as the Shopify Import Type.

What Each Kind Does

Kind decides the transaction. It is required, and IMan accepts it in any letter case:

Kind Does Shopify mutation
capture Captures an authorised payment, in full or in part orderCapture
void Voids an authorisation transactionVoid
sale Records a payment taken outside Shopify, such as by bank transfer, against the order's balance orderCreateManualPayment
refund Refunds a payment back to the customer refundCreate

Shopify does not let an app record an authorisation. The push therefore takes no other kind.

Fields

Field Rule
Order Id Required. The order, as a numeric id or a gid
Kind Required. capture, sale, void or refund
Amount Required for capture and refund. For sale, blank pays the order's whole outstanding balance, and an amount needs a Shopify Plus store. Not used for void
Currency The amount's currency. Blank is the order's
Parent Transaction (Authorisation) Id For capture and void, the authorisation. Blank takes the order's open authorisation. For refund, the sale or capture to refund. Blank takes the order's first one that can refund the amount
Gateway For refund, blank is the parent transaction's gateway. For sale, the name of one of the store's manual payment methods. Blank is Shopify's default
Final Capture For capture, True closes the authorisation after this capture
Processed At For sale and refund, when the payment or refund happened. Blank is now
Note For refund, the refund's note
Notify Customer For refund, True emails the customer the refund
Use Bulk Operations True sends the run through bulk operations

When the record leaves out the parent, IMan reads the order's transactions to find it. A capture or void fails when the order has no open authorisation, and a refund fails when no payment can refund the amount.

A sale with a payment method the store does not have fails with Shopify's message: "Payment provider is not configured on shop."

Write-Back

IMan writes back the transaction's id, status, test and error_code, and the card's details when the payment gateway gives them. The card number comes back masked. When the record left them blank, IMan also writes back the parent it used and the amount.

Errors

A record that fails a check fails before IMan sends it:

Order 1234567890 has no open authorization to capture, and the record has no Parent Transaction Id.

A refusal from Shopify fails the record with Shopify's message.

Bulk Operations

With Use Bulk Operations on, IMan sends the run through Shopify bulk operations. Records that name the same order go in successive rounds. A refund after a capture of the same order then finds that capture. Each round reads the orders' transactions it needs, 50 orders at a time, then sends the captures, voids, payments and refunds as one operation each.

Access Scopes

The push needs write_orders. See Access Scopes.

Shopify Reference

orderCapture, transactionVoid, orderCreateManualPayment and refundCreate in Shopify's GraphQL Admin API reference.