Affirm-developers

How to process Affirm transactions in Magento 2

Overview

When a customer completes a checkout with Affirm as the payment method, Affirm authorizes a charge for the amount of the order. The charge enters a pending state on the customer's Affirm account. Authorized charges expire if you do not capture them before the capture deadline, which is a period specified in your partnership agreement with Affirm. If you did not define your authorization timing requirements because of inventory, pre-orders, or shipping time in your onboarding form, please contact your Client Success Manager.

After Affirm authorizes a charge, you can perform the following actions on it in Magneto 2:

Capture

Capturing a charge does the following:

  • Charges the authorized amount to the customer's Affirm account
  • Begins the customer's billing cycle
  • Triggers the transfer process of funds from Affirm to the merchant

Merchants typically capture a charge after fulfilling the order. We recommend auto-capturing if you usually fulfill orders within 5 business days so that the customer receives their purchase before their first bill.

You can configure Magento 2 to auto-capture by setting Payment Action to Authorize and Capture.

Void

If you haven't yet captured a charge, you can cancel its authorization by voiding it. Voiding a charge is irreversible and Affirm is unable to reinstate those funds.

Refund

If you've already captured a charge, you can reverse it and refund the amount to the customer's Affirm account. You can only process a refund within 120 days of capturing the charge. Refunding a charge is irreversible.

Partial refund

If you've already captured a charge, you can reverse part of the charge and refund the specified amount to the customer's Affirm account. You can only process a partial refund within 120 days of capturing the charge. Partially refunding a charge is irreversible.

Updated 5 months ago


How to process Affirm transactions in Magento 2


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.