In this section, we will cover a more comprehensive example in an e-commerce retail setting that further expands on all the remaining Transactions API concepts.
Suppose you’re a furniture retailer and your customer is purchasing the following items:
A couch for $300,
A rug for $400,
A coffee table for $200, and
A standing lamp for $100
The customer completed the Flex Pay checkout journey and accepted a Flex Pay financing offer for a $1,000 order for the 4 items above.
Authorizing a transaction
💡 After the customer completed the Flex Pay checkout journey, you submit an authorization request for $1,000.00. In the Transaction response object, you can find the transaction id and the remaining_amount of $1,000.00 available for capture. |
Authorization Sample
Voiding a transaction
In the event you need to void an already authorized transaction, such as when the customer is cancelling an item before it is fulfilled, or you are certain that an item is out of stock and cannot be fulfilled, you can submit a POST request to the /v1/{transaction_id}/void endpoint. You may fully or partially void a transaction by specifying an amount in the request, but it must be less than or equal to the remaining_amount available in the Transaction object.
When the void request is successfully processed, an updated Transaction object is returned in the response, with the remaining_amount updated to reflect the latest void event. Note that once an amount is voided, it is permanently deducted from the remaining_amount and you can no longer capture against the amount voided.
Void Sample
Capturing a transaction
First Capture Sample
Second Capture Sample
Authorization Expiration
Each transaction has an authorization_expiration timestamp. If there is any uncaptured amount in the transaction by the time the authorization expires, all remaining_amount will automatically be voided and updated to $0.00. Any subsequent capture requests submitted will be declined. Therefore, we recommend you check the authorization_expiration timestamp and use it as a reference before fulfilling the remaining items in the order.
Authorization Sample
Refunding a transaction
Refund Sample
Disbursement process
At the end of the transaction period, Flex Pay aggregates all transaction events to arrive at a net disbursement amount to be paid out to your designated bank account. The net disbursement amount is calculated by adding up all captured amounts and subtracting all refunded amounts during the period. On the following business day, Flex Pay and its lending partners will initiate ACH transfers to disburse the funds to you. Depending on the processing time of your financial institution, the funds may arrive at your bank account within a few business days.
Note: if during a given transaction period, the net disbursement amount is negative (meaning there were more refunds than captures during the period), the negative net disbursement balance will be carried over to the next transaction period and subtracted from next period’s net disbursement amount.