> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grailpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scenario: Batch Payout

> A description of the different transaction scenarios that can occur when using batch payouts.

## Successful Transaction

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/8997257801d345396ae2979f93a072383865029dd35ce7fabf8863915708cadb-Successful_Transaction-2024-12-04-152035.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=7ff65d5a93f8bcf962143ee1c0747bc9" alt="" width="1691" height="3840" data-path="images/docs/8997257801d345396ae2979f93a072383865029dd35ce7fabf8863915708cadb-Successful_Transaction-2024-12-04-152035.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/bd362a3f108f8c7089c835345c363ef69eba36dab5d765c982fc63d35dc6e0a1-F_Successful_Transaction_Batch-2024-12-12-210944.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=b239dd49e3ce01447b9ad5443f13dfdf" alt="" width="3840" height="1369" data-path="images/docs/bd362a3f108f8c7089c835345c363ef69eba36dab5d765c982fc63d35dc6e0a1-F_Successful_Transaction_Batch-2024-12-12-210944.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Batch Payout to processor completed.
* Transaction completed.
* Processor payout.

## Cancelled Transaction Before Capture

This when a transaction is cancelled. Currently they can only be cancelled in the CAPTURE\_PENDING state.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/b7934051c5d2ad0426c8ea4a73d7942ed0721ec81df72841ad5802d4b87c7d35-Cancelled_Transaction-2024-12-04-152155.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=a1c2c0e144b3869023dff87707bd34c5" alt="" width="2226" height="3840" data-path="images/docs/b7934051c5d2ad0426c8ea4a73d7942ed0721ec81df72841ad5802d4b87c7d35-Cancelled_Transaction-2024-12-04-152155.png" />

### Flow of Funds

#### History

* Transaction started.
* Transaction cancelled.
* Transaction completed.

## Transaction Failed: NSF on Capture

This happens when the payor does not have enough funds available.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/eb782e5cf20ac8e6d34afba36d89d1b7e85ba3aa5904d34fbb2b21d929339776-Transaction_Failed_NSF-2024-12-04-152246.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=f709be05a8812f7d702a2b82b69720fa" alt="" width="2053" height="3840" data-path="images/docs/eb782e5cf20ac8e6d34afba36d89d1b7e85ba3aa5904d34fbb2b21d929339776-Transaction_Failed_NSF-2024-12-04-152246.png" />

### Flow of Funds

#### History

* Transaction started.
* Capture from payor failed.
* Transaction completed.

## Transaction Failed: NSF After Capture Before Payout

This happens when the bank allows the capture to happen then signals an NSF before the payout is completed.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/f9b5e208ecc75f781eff409c55c4ce67096565f5aa261b3187e4245d8fc536b5-Transaction_Failed_NSF_Before_Payout-2024-12-04-191509.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=67564773adbb269a2de6948ac08a3c98" alt="" width="1691" height="3840" data-path="images/docs/f9b5e208ecc75f781eff409c55c4ce67096565f5aa261b3187e4245d8fc536b5-Transaction_Failed_NSF_Before_Payout-2024-12-04-191509.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/b8bcfff9935814728779b830902322352b18499d27f8a8e9836d41778944a514-F_NSF_After_Capture_Pre_Payout-2024-12-05-214730.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=985185bfa6fb3b28305879844a022b5a" alt="" width="3840" height="1835" data-path="images/docs/b8bcfff9935814728779b830902322352b18499d27f8a8e9836d41778944a514-F_NSF_After_Capture_Pre_Payout-2024-12-05-214730.png" />

#### History

* Transaction started.
* Capture from payor completed.
* NSF signaled from bank.
* Transaction completed.

## Transaction Failed: NSF After Payout

This happens when the bank signals an NSF after the payout has completed.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/6270fa0d1f88b7a097827387f92c7c1a9bf585600e38650a8041e90d5bef7f54-Transaction_Failed_NSF_After_Payout-2024-12-04-151824.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=141504f85c57307247c59189d3828235" alt="" width="1249" height="3839" data-path="images/docs/6270fa0d1f88b7a097827387f92c7c1a9bf585600e38650a8041e90d5bef7f54-Transaction_Failed_NSF_After_Payout-2024-12-04-151824.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/522500b62676899242a1cdd0d325bbb7597f2e036713a5ae1830f26e5d0455e1-F_Batch_NSF_After_Payout-2024-12-12-220913.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=3e6335e10f26edf79eb59eff6ae7dafb" alt="" width="3840" height="1767" data-path="images/docs/522500b62676899242a1cdd0d325bbb7597f2e036713a5ae1830f26e5d0455e1-F_Batch_NSF_After_Payout-2024-12-12-220913.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Payout to payee completed.
* NSF signaled from bank.
* Clawback from Processor FBO completed.
* Transaction completed.
* Processor clawback from payee.

## Chargeback

This happens when the payor notifies the bank that they did not authorize the charge.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/9968505ca2cea5c28e890610e61f2df6be8df3d5b3a922b8074fe3986840b296-Transaction_Chargeback-2024-12-05-190842.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=b654de87a02ff0e0a50a5c9aeb4dd630" alt="" width="1249" height="3839" data-path="images/docs/9968505ca2cea5c28e890610e61f2df6be8df3d5b3a922b8074fe3986840b296-Transaction_Chargeback-2024-12-05-190842.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/d8a39becd031d418a6cb43a326c5dba57bef6448da9b90aa06e8c6e02f5717b8-Untitled_diagram-2024-12-12-221610.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=547e71babae83e65aea5d82268fe7bd8" alt="" width="3840" height="1966" data-path="images/docs/d8a39becd031d418a6cb43a326c5dba57bef6448da9b90aa06e8c6e02f5717b8-Untitled_diagram-2024-12-12-221610.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Payout to payee completed.
* Payor initiates chargeback.
* Funds returned to payor.
* Clawback from Processor FBO completed.
* Transaction completed.
* Processor clawback from payee.

## Refund

This happens when the payee issues a refund.

### States

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/567fd287827294724d0121b27903d3f714ec1642df1e40daaf4ffc6106407957-Transaction_Refund-2024-12-05-191355.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=3df705f8aa3f33f3753b668825245669" alt="" width="1437" height="3840" data-path="images/docs/567fd287827294724d0121b27903d3f714ec1642df1e40daaf4ffc6106407957-Transaction_Refund-2024-12-05-191355.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/460ead2f673fd7b3cd64f3fb142a802bf7ccce8b3fda02cb1a8d54d9b7f37e97-F_Refund-2024-12-13-115319.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=d53b0ef2a5e00367bfd498a67f1873b5" alt="" width="3840" height="1966" data-path="images/docs/460ead2f673fd7b3cd64f3fb142a802bf7ccce8b3fda02cb1a8d54d9b7f37e97-F_Refund-2024-12-13-115319.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Payout to payee completed.
* Payee initiates refund.
* Clawback from payee completed.
* Funds returned to payor.
* Transaction completed.

  <img src="https://mintcdn.com/grail/1tZmnKdSNoOD7QQT/images/1280x720.png?fit=max&auto=format&n=1tZmnKdSNoOD7QQT&q=85&s=2078e787d59b89324118f66053c6f56c" alt="1280x720 Pn" width="3840" height="870" data-path="images/1280x720.png" />
