# How to send ICP from Account Identifier to ledger Canister

**URL:** <https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840>\
**Category:** Language Support\
**Tags:** Motoko\
**Created:** [February 12, 2022, 3:48am UTC](https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840 "2022-02-12T03:48:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonynguyen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tonynguyen/32/5092_2.png) [@tonynguyen](https://forum.dfinity.org/u/tonynguyen)\
**Post date:** [February 12, 2022, 3:48am UTC](https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840/1 "2022-02-12T03:48:27Z")

</div>

I’m newbie on Motoko. I read docs about the Ledger Canister, dfx ledger transfer --to [account-identifier]. This transfers ICP from ledger canister account to destination(account identifier). How to transfer ICP from account identifier to Ledger Canister on Motoko?

Thanks

---

<div class="post-metadata">

**Author:** ![coin\_master](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/coin_master/32/15963_2.png) [@coin\_master](https://forum.dfinity.org/u/coin_master)\
**Post date:** [February 12, 2022, 4:13am UTC](https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840/2 "2022-02-12T04:13:01Z")

</div>

I am not an expert in motoko but you will need the nns ledger interface  
[https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/nns-ledger-10244](https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/nns-ledger-10244)  
and call the transfer method  
`transfer : ( TransferArgs, ) -> (TransferResult);`

You can find an example how to call other canisters from your actor here

> [@How to use "cowsay" project in my project?](https://forum.dfinity.org/t/how-to-use-cowsay-project-in-my-project/6473/2):
>
> : D Great to see the cow’s getting out and about! You’ll want to follow this syntax for calling to external canisters at the moment: [Calling another canister's methods - #2 by Ori](https://forum.dfinity.org/t/calling-another-canisters-methods/473/2) Where you define the canister as an actor with a matching signature to the canister you’re calling (or subtype of). You can find the signature on its listing: [https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/cowsay-10237/7igbu-3qaaa-aaaaa-qaapq-cai](https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/cowsay-10237/7igbu-3qaaa-aaaaa-qaapq-cai) So for cowsay you can build the call as follows: actor { pu…

You can use the playground to experiment.

> **[Motoko Playground - DFINITY](https://m7sm4-2iaaa-aaaab-qabra-cai.raw.ic0.app/?tag=1759972232)**
>
> A playground for the Internet Computer's native Motoko language, brought to you by DFINITY

---

<div class="post-metadata">

**Author:** ![tonynguyen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tonynguyen/32/5092_2.png) [@tonynguyen](https://forum.dfinity.org/u/tonynguyen)\
**Post date:** [February 12, 2022, 4:56am UTC](https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840/3 "2022-02-12T04:56:39Z")

</div>

Many thanks,  
let me ask commands:

# Minter

dfx identity new minter

dfx identity use minter

export MINT\_ACC=$(dfx ledger account-id)

```
# ledger

```

dfx identity use default  
export LEDGER\_ACC=$(dfx ledger account-id)

can Account Identifier(use NNS) to be the Ledger Canister account? Or The Ledger Canister account is only our developer to hold ICP to payment, convert to cycles…?

I’m not clear, hold u can explain it.  
Thanks

---

<div class="post-metadata">

**Author:** ![heyuanxun](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/heyuanxun/32/4695_2.png) [@heyuanxun](https://forum.dfinity.org/u/heyuanxun)\
**Post date:** [February 17, 2022, 2:59am UTC](https://forum.dfinity.org/t/how-to-send-icp-from-account-identifier-to-ledger-canister/10840/4 "2022-02-17T02:59:33Z")

</div>

[maybe this code can help](https://github.com/xiaoyuanxun/transfer_icp)
