# Disbursement
source: https://developer.mastercard.com/mastercard-send-account-info/documentation/use-cases/disbursement/index.md

This example shows how the API can be used when a mobile gig app user withdraws their gig earnings to a card. It is based on the graphical [Withdraw balance as gig worker or content creator](https://developer.mastercard.com/mastercard-send-experience-design-guide/documentation/design/disbursements/withdraw-balance-as-gig-worker/) flow in the Mastercard Send Experience Design Guide.

### Scenario {#scenario}

* John Doe (the Recipient) is a gig worker who uses a mobile gig app to find work and receive his earnings. He chooses to withdraw his $635.25 USD earnings (account balance).
* John has already added his receiving card account details to his app account.
* You (the Transaction Initiator) provide the app and use the Mastercard Send APIs to disburse the funds to the card account.

Successful API requests result in a 200 response. If requests fail API validation, Mastercard Send returns a 4xx error message with the appropriate [error code](https://developer.mastercard.com/mastercard-send-account-info/documentation/code-and-formats/index.md#error-codes).

## Check a new card {#check-a-new-card}

If John adds a new receiving card to the app, use an [Account Info PUT](https://developer.mastercard.com/mastercard-send-account-info/documentation/api-reference/index.md) request to check that card account. Example sequence:
Diagram mastercard-send-sequence-account-info-disbursement-1

Example request payload:
* JSON
* XML

```JSON
{
  "account_info": {
    "account_uri": "pan:5102589999999939;exp=2071-02;cvc=123",
    "payment_type": "BDB",
    "enhanced_response": "true"
  }
}
```

```XML
<account_info>
   <account_uri>pan:5102589999999939;exp=2071-02;cvc=123</account_uri>
   <payment_type>BDB</payment_type>
   <enhanced_response>true</enhanced_response>
</account_info>
```

These success response fields show that John's card can receive disbursements and also the estimated funds availability time frame following each disbursement:
* JSON
* XML

```JSON
    "receiving_eligibility": {
      "eligible": true
    },
    "funds_availability": "IMMEDIATE",
```

```XML
   <receiving_eligibility>
      <eligible>true</eligible>
   </receiving_eligibility>
   <funds_availability>IMMEDIATE</funds_availability>
```

Using the response information, your app can:

* Notify John that the card can be used to receive disbursements.
* Provide the estimated funds availability time frame so that John knows when he is likely to see the funds in his account for each disbursement to this card.
* Provide textual or graphical information about the card account in the user interface (e.g. brand, type, and institution) to enhance the experience, such as show an issuer-specific card image.

## Check a disbursement {#check-a-disbursement}

When John initiates the $635.25 USD disbursement, use an [Account Info PUT](https://developer.mastercard.com/mastercard-send-account-info/documentation/api-reference/index.md) request to check that his receiving card account is eligible for that disbursement. Example sequence:
Diagram mastercard-send-sequence-account-info-disbursement-2

Example request payload:
* JSON
* XML

```JSON
{
  "account_info": {
    "account_uri": "pan:5102589999999939;exp=2071-02",
    "amount": "63525",
    "currency": "USD",
    "payment_type": "BDB"
  }
}
```

```XML
<account_info>
   <account_uri>pan:5102589999999939;exp=2071-02</account_uri>
   <amount>63525</amount> 
   <currency>USD</currency>
   <payment_type>BDB</payment_type>
</account_info>
```

These success response fields show that John's card can receive this disbursement:
* JSON
* XML

```JSON
    "receiving_eligibility": {
      "eligible": true
    },
```

```XML
   <receiving_eligibility>
      <eligible>true</eligible>
   </receiving_eligibility>
```

Your app can continue with the disbursement flow.

You can use the [Mastercard Send Disbursements](https://developer.mastercard.com/mastercard-send-disbursements/documentation/) service to disburse the funds to John's receiving account.
