# How to pass another canister as actor-constructor-argument?

**URL:** https://forum.dfinity.org/t/how-to-pass-another-canister-as-actor-constructor-argument/6233
**Category:** Developers
**Created:** [July 31, 2021, 6:03pm UTC](https://forum.dfinity.org/t/how-to-pass-another-canister-as-actor-constructor-argument/6233 "2021-07-31T18:03:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shalexbas](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/shalexbas/32/2139_2.png) [@shalexbas](https://forum.dfinity.org/u/shalexbas)
#### Post date: [July 31, 2021, 6:03pm UTC](https://forum.dfinity.org/t/how-to-pass-another-canister-as-actor-constructor-argument/6233/1 "2021-07-31T18:03:45Z")

</div>

Hey,  
I played a bit with examples from [Payment-Channel-Example](https://github.com/DFINITY-Education/blockchain-and-cryptocurrency/blob/156c6cf4310e2eb836d0574b94f10c5838281689/src/Main.mo#L12)  
There an [actor type](https://github.com/DFINITY-Education/blockchain-and-cryptocurrency/blob/156c6cf4310e2eb836d0574b94f10c5838281689/src/Types.mo#L33) is expected in constructor of the payment-actor. I have following questions:

- How to pass a different already existing canister as constructor argument?

- Is it possible to define a default constructor argument in dfx.json for an motoko actor?

Thanks

---

<div class="post-metadata">

### Author: ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)
#### Post date: [July 31, 2021, 7:04pm UTC](https://forum.dfinity.org/t/how-to-pass-another-canister-as-actor-constructor-argument/6233/2 "2021-07-31T19:04:45Z")

</div>

> [@shalexbas](#):
>
> (“rkp4c-7iaaa-aaaaa-aaaca-cai”)

Try `(principal "rkp4c-7iaaa-aaaaa-aaaca-cai")`

---

<div class="post-metadata">

### Author: ![shalexbas](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/shalexbas/32/2139_2.png) [@shalexbas](https://forum.dfinity.org/u/shalexbas)
#### Post date: [July 31, 2021, 7:29pm UTC](https://forum.dfinity.org/t/how-to-pass-another-canister-as-actor-constructor-argument/6233/3 "2021-07-31T19:29:20Z")

</div>

It didn’t work with “principal” but with “service”, Thanks!

Here is the working command for others: `dfx deploy paymentchannel --argument '(service "rkp4c-7iaaa-aaaaa-aaaca-cai")'`
