> ## 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: Direct Payouts

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

## Successful Transaction

### States

<img src="https://mintcdn.com/grail/ZuMyC8V0cH_bdUtC/states-image-1.png?fit=max&auto=format&n=ZuMyC8V0cH_bdUtC&q=85&s=12d333fb73f0d5871a0485fcf059c7e7" alt="" width="4602" height="870" data-path="states-image-1.png" />

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/88a6348b474ae9d071d14d1e4b616defc9600e6b3226d7f92ee50c01dab6c83e-F_Successful_Transaction-2024-12-05-214957.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=5a0ff1b8a0e1b9617955499d0ecfdd75" alt="" width="3840" height="1531" data-path="images/docs/88a6348b474ae9d071d14d1e4b616defc9600e6b3226d7f92ee50c01dab6c83e-F_Successful_Transaction-2024-12-05-214957.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Payout to payee completed.
* Transaction completed.

## 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/a1f0d90a69f22931a4e8a15301a703da4a3fedc3516f40f04055cb9b8c191e25-F_NSF_After_Payout-2024-12-05-214614.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=4436f41694b563a64bd4585310524c17" alt="" width="3840" height="1791" data-path="images/docs/a1f0d90a69f22931a4e8a15301a703da4a3fedc3516f40f04055cb9b8c191e25-F_NSF_After_Payout-2024-12-05-214614.png" />

#### History

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

## 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/6e5fb4bcbfeba2eaab1c0ccbda8472eab38b244836ed362fed33ffcd83f48ef2-F_Chargeback-2024-12-05-213738.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=9464428dd48144a040618042cc45e9dd" alt="" width="3840" height="2050" data-path="images/docs/6e5fb4bcbfeba2eaab1c0ccbda8472eab38b244836ed362fed33ffcd83f48ef2-F_Chargeback-2024-12-05-213738.png" />

#### History

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

## 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/8c5ba90d1ae1d5824fd62f48562e68bfc90c5ec4d4efe1f738c155c17c621ea2-F_Refund-2024-12-05-214112.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=6d2b04fc0e2232f01e82e63f73bb85f5" alt="" width="3840" height="2050" data-path="images/docs/8c5ba90d1ae1d5824fd62f48562e68bfc90c5ec4d4efe1f738c155c17c621ea2-F_Refund-2024-12-05-214112.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.

## Payout Failed

This happens when the credit to the payee fails, typically because of an incorrect account/routing number.

### States

### Flow of Funds

<img src="https://mintcdn.com/grail/ZU_xKTz2ierq83xI/images/docs/517ae5811adee6dbb39c93e16a7739134f93c9856300a79bab97f51b83022519-F_Payout_Failed-2024-12-05-214429.png?fit=max&auto=format&n=ZU_xKTz2ierq83xI&q=85&s=6e595e7116650ed7991c9b8c3cfbd0c6" alt="" width="3840" height="1791" data-path="images/docs/517ae5811adee6dbb39c93e16a7739134f93c9856300a79bab97f51b83022519-F_Payout_Failed-2024-12-05-214429.png" />

#### History

* Transaction started.
* Capture from payor completed.
* Payout to payee failed.
* Funds returned to payor.
* Transaction completed.

<img src="https://mintcdn.com/grail/MpcwCInTcozPlKJv/images/Recent.png?fit=max&auto=format&n=MpcwCInTcozPlKJv&q=85&s=3103808f9bd378b5652484a18e183c62" alt="Recent Pn" width="4602" height="870" data-path="images/Recent.png" />
