> For the complete documentation index, see [llms.txt](https://mobilecoin.gitbook.io/full-service-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobilecoin.gitbook.io/full-service-api/usage/getting-started/sending-mobilecoin.md).

# Sending MobileCoin

The last step in developing your Wallet Interface is to connect to the [build and submit transaction](/full-service-api/api-endpoints/v2/transaction/transaction/build_and_submit_transaction.md) endpoint. Sending transactions enables the Exchange to send MOB to customers, as well as to transfer MOB between accounts that the Exchange controls.

{% hint style="info" %}
For all transactions, the input txos will be selected automatically unless the input txos are specified during the transaction build step. This is generally not recommended and users should let input txos be automatically selected.
{% endhint %}

Review the initial balance of your account by calling [`get_account_status`](/full-service-api/api-endpoints/v2/account/account/get_account_status.md) with your `account_id` generated from the [Create an Account section](/full-service-api/usage/getting-started/receive-mob.md).

Since you are running a test that doesn't require you to review the [transaction proposal](/full-service-api/glossary/transaction-proposal.md) before submitting it to the [ledger](/full-service-api/glossary/ledger.md), call the convenience method [`build_and_submit_transaction`](/full-service-api/api-endpoints/v2/transaction/transaction/build_and_submit_transaction.md) to send [MOB](/full-service-api/glossary/mob.md) to a [public address](/full-service-api/glossary/public-address.md). Keep note of the `transaction_log_id` from the response, as we will need for the next step.

{% tabs %}
{% tab title="Javascript" %}

```javascript
async function buildAndSubmitTransaction() {
 const response = await fetch('http://127.0.0.1:9090/wallet/v2', {
   method: 'POST',
   body: `{
     "method": "build_and_submit_transaction",
     "params": {
         "account_id": "1f32a...",
         "recipient_public_address": "3yNzpvKEpis...",
         "amount": {"value": "1000000000", "token_id": "0"}
     },
     "id": 1,
     "jsonrpc": "2.0"
   }`,
   headers: {
     'Content-Type': 'application/json'
   }
 });
 return await response.json();
}

buildAndSubmitTransaction().then((response) => {
 console.log(response);
});
```

{% endtab %}

{% tab title="Python" %}

```python
from mobilecoin.client import ClientSync, Amount
client = ClientSync()
transaction_log, tx_proposal = client.build_and_submit_transaction(
    account_id='1f32a...',
    amount=Amount.from_display_units(1.0, 'MOB'),
    to_address='3yNzpvKEpis...',
)
```

{% endtab %}
{% endtabs %}

To verify whether the [transaction](/full-service-api/glossary/transaction.md) was successful, call [`get_transaction_log`](/full-service-api/api-endpoints/v2/transaction/transaction-log/get_transaction_log.md) with the `transaction_log_id` from the previous step. The response will have a field called `status` which should say `succeeded` once the [transaction](/full-service-api/glossary/transaction.md) clears on the [blockchain](/full-service-api/glossary/blockchain.md).

{% tabs %}
{% tab title="Javascript" %}

```javascript
async function getTransactionLog() {
 const response = await fetch('http://127.0.0.1:9090/wallet/v2', {
   method: 'POST',
   body: `{
     "method": "get_transaction_log",
     "params": {
         "transaction_log_id": "ewvvf4...1f32a"
     },
     "id": 1,
     "jsonrpc": "2.0"
   }`,
   headers: {
     'Content-Type': 'application/json'
   }
 });
 return await response.json();
}

getTransactionLog().then((response) => {
 console.log(response);
});
```

{% endtab %}

{% tab title="Python" %}

```python
from mobilecoin.client import ClientSync, Amount
client = ClientSync()
transaction_log = client.get_transaction_log(
    transaction_log_id='ewvvf4...'
)
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
[Transactions](/full-service-api/glossary/transaction.md) typically get processed by [consensus](/full-service-api/glossary/consensus-protocol.md) and are added to the [blockchain](/full-service-api/glossary/blockchain.md) in a few seconds. Once a block has appeared on the [blockchain](/full-service-api/glossary/blockchain.md), it is finalized and does not require waiting for a certain number of [blocks](/full-service-api/glossary/block.md) to pass (unlike many other cryptocurrencies).
{% endhint %}

Congratulations, you just sent your first [transaction](/full-service-api/glossary/transaction.md)!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mobilecoin.gitbook.io/full-service-api/usage/getting-started/sending-mobilecoin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
