# Status flow

### Understanding the cashout lifecycle

<figure><img src="https://3883333839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff92vedEnowdVWbjM4Cmd%2Fuploads%2FwXcC1yIIMqYUXJfqrUnH%2FCashout%20status%20flow.png?alt=media&#x26;token=052152c6-a3e2-4aba-84ed-41796e43f4ab" alt=""><figcaption></figcaption></figure>

#### Status diagram explanation

<table><thead><tr><th width="131.89453125" align="center">Status</th><th>Description</th></tr></thead><tbody><tr><td align="center"><strong>DECLINED</strong></td><td>The DECLINED status is not a status by itself. It means the transaction couldn't be created because of an error with the data, the customer or the merchant configuration. No transaction will change its status from <strong>DECLINED</strong>.</td></tr><tr><td align="center"><strong>PENDING</strong></td><td>Once the cashout is in <strong>PENDING</strong> status, it means it was successfully created and that it will be send for processing soon, changing to <strong>DELIVERED</strong>. <br>It can also be manually changed to <strong>ON_HOLD</strong> or <strong>CANCELLED</strong>.</td></tr><tr><td align="center"><strong>ON_HOLD</strong></td><td>A cashout will be created with <strong>ON_HOLD</strong> status only if specified while creating the cashout with <em>on_hold: true.</em> Otherwise, it can be manually set to <strong>ON_HOLD</strong> from the Merchant Panel.<br>If a cashout is <strong>ON_HOLD</strong>, it won't be send for processing until you manually go and set it to <strong>PENDING</strong> from the Merchant Panel. It can still be <strong>CANCELLED</strong>.</td></tr><tr><td align="center"><strong>CANCELLED</strong></td><td>It means you didn't want to proceed with the cashout and it was <strong>CANCELLED</strong> through the Merchant Panel or through the Cancel Cashout Endpoint.<br><strong>Final status</strong>.</td></tr><tr><td align="center"><strong>DELIVERED</strong></td><td>As soon as the cashout is sent to the bank for processing, its status will change to <strong>DELIVERED</strong>. At which point it can't be cancelled anymore.</td></tr><tr><td align="center"><strong>COMPLETED</strong></td><td>If the cashout was successfully completed, its status will be set to <strong>COMPLETED</strong>. <strong>Final status</strong><mark style="color:red;"><strong>*</strong></mark><strong>.</strong></td></tr><tr><td align="center"><strong>REJECTED</strong></td><td><p>If the cashout was rejected by the bank, its status will be set to <strong>REJECTED</strong>.</p><p><strong>Final status</strong>.</p></td></tr></tbody></table>

&#x20;<mark style="color:red;">**\***</mark> There are cases in which the banks confirm that a payout was successfully processed and after a few days, it gets returned by the beneficiary's bank therefore the status on our platform will change to REJECTED as well. Those are corner cases but must be considered.

### Cashout status codes

In the cashout status endpoint you will receive a **`cashout_status`** code.\
Below you will find the codes and associated status:

<table data-full-width="false"><thead><tr><th width="91.44010416666669" align="center">Code</th><th width="198.140625" align="center">Meaning</th><th>Description</th></tr></thead><tbody><tr><td align="center">0</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/y7fJyYtx6M0xgJw4HuKN/Untitled%20Diagram.svg" alt="" data-size="original"> </td><td>The cashout was accepted by PandaBlue but it wasn't sent to the bank yet. It can still be Canceled.</td></tr><tr><td align="center">1</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/gYI7zIZm2YMG8xb4fk4d/COMPLETED.svg" alt="" data-size="original"> </td><td>The money reached the customer's account</td></tr><tr><td align="center">2</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/rqD9HoELsAGlblUGAASK/CANCELLED.svg" alt="" data-size="original"> </td><td>The cashout was cancelled by you</td></tr><tr><td align="center">3</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/o7oTxpRQ09hSqm4BnGFw/REJECTED.svg" alt="" data-size="original"> </td><td>The cashout was rejected <strong>by the bank</strong> due to invalid bank account, account closed, etc.</td></tr><tr><td align="center">4</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/rr9ruzWPpytL42R0xWOA/DELIVERED.svg" alt="" data-size="original"> </td><td>The cashout was sent to the bank for processing. At this point it can't be cancelled anymore</td></tr><tr><td align="center">5</td><td align="center"><img src="https://content.gitbook.com/content/f92vedEnowdVWbjM4Cmd/blobs/ZejhHI98LgV5M5YMenWD/image.png" alt=""></td><td>Cashout set to on hold by you. It won't be processed until manually changed again to Pending status</td></tr></tbody></table>
